v2ray icon indicating copy to clipboard operation
v2ray copied to clipboard

cloudflare 域名解析没问题 在外面ping 也已经生效 总是卡在域名当前解析这一步

Open mrzzcn opened this issue 4 years ago • 20 comments

你的域名: xxx 未解析到: xxx

 你的域名当前解析到: 

备注...如果你的域名是使用 Cloudflare 解析的话..在 Status 那里点一下那图标..让它变

你的域名当前解析到: 后面是空白,不知道咋回事啊

mrzzcn avatar Sep 17 '19 09:09 mrzzcn

就是安装的时候不要cloudflare,本来那个图标是黄色的,安装的时候点一下,让他变成灰色,安装完成再点一下变成红色就可以了。

148i avatar Sep 18 '19 07:09 148i

就是安装的时候不要cloudflare,本来那个图标是黄色的,安装的时候点一下,让他变成灰色,安装完成再点一下变成红色就可以了。

操作步骤正确,并没有解析成功,重建VPS过了这一步,不过总是连不上

mrzzcn avatar Sep 18 '19 14:09 mrzzcn

使用cloudflare中转流量的前提条件是: 1.在vps能用nginx成功搭建一个用ssl访问的网站。 2.成功安装v2ray并设定websocket的secret key。 3.设置某个路径(也就是在v2ray设置的secret key)的访问流量转发到v2ray。(例如访问 example.com/v2ray)时转发流量到v2ray的本地监听端口处理。

然后你需要确定通过浏览器直接访问这个路径能看到bad request提示,才能开启cloudflare转发流量。

ghost avatar Sep 20 '19 03:09 ghost

贴份nginx配置,如果是debian系列系统通过apt安装的,拿过去修改需要绑定的域名对应域名的ssl证书路径,还有v2ray本地监听端口以及路径,并删除注释后可以直接用:

server { listen 80 default; #80端口监听(可单独设置在一个http选项中) listen 443 ssl http2; #443端口ipv4监听 listen [::]:443 ssl http2; #443端口ipv6监听 server_name example.com; #域名1 server_name www.example.com; #域名2(可选) root /var/www/website1; #网站根目录 index index.html index.php index.htm; client_max_body_size 10240M;

    ssl_certificate "/etc/nginx/ssl/server.crt"; //证书位置
    ssl_certificate_key "/etc/nginx/ssl/server.key"; //密钥位置
    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout  10m;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_protocols TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    include /etc/nginx/default.d/*.conf;

    location / {
    try_files $uri $uri/ /index.php$is_args$args;
    }

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }

    location ~ \.php$ {
    fastcgi_pass 127.0.0.1:9000; //php-fpm-sock链接方式
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    include fastcgi_params;
}

location /v2ray { proxy_redirect off; proxy_pass http://127.0.0.1:10000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; } }

ghost avatar Sep 20 '19 03:09 ghost

如果你使用是cloudflare转发流量,转发后觉得效果不理想的话,可以把配置文件的ip更改为1.0.0.1试试(也就是指向cloudflare的dnsip,一般来说这是最优路径的)

ghost avatar Sep 20 '19 04:09 ghost

@mrzzcn 你在 VPS 上 PING 一下这个域名,看看能不能解析?

233boy avatar Sep 22 '19 01:09 233boy

我也遇到同样的问题。

vovoci avatar Sep 22 '19 04:09 vovoci

@mrzzcn 你在 VPS 上 PING 一下这个域名,看看能不能解析?

我的情况是VPS ping不通这个域名,直接到localhost(127.0.0.1)去了

vovoci avatar Sep 22 '19 05:09 vovoci

@mrzzcn 你在 VPS 上 PING 一下这个域名,看看能不能解析?

我的情况是VPS ping不通这个域名,直接到localhost(127.0.0.1)去了

@vovoci 如果,VPS 解析不出来这个域名,那么肯定不行

233boy avatar Sep 22 '19 06:09 233boy

@mrzzcn 你在 VPS 上 PING 一下这个域名,看看能不能解析?

我的情况是VPS ping不通这个域名,直接到localhost(127.0.0.1)去了

@vovoci 如果,VPS 解析不出来这个域名,那么肯定不行

我按照以前的步骤始终不行,OS也重装了。用的 https://git.io/v2ray.sh)这个脚本。在域名解析那步过不去。以前用脚本跟着提示设置就行了。

vovoci avatar Sep 22 '19 12:09 vovoci

域名管理那里的DNS服务器改成CF提供的DNS了么?如果没改,CF任何设置都不会生效。跟服务器是否重建一点关系都没有。

Michaol avatar Sep 23 '19 12:09 Michaol

贴份nginx配置,如果是debian系列系统通过apt安装的,拿过去修改需要绑定的域名对应域名的ssl证书路径,还有v2ray本地监听端口以及路径,并删除注释后可以直接用:

server { listen 80 default; #80端口监听(可单独设置在一个http选项中) listen 443 ssl http2; #443端口ipv4监听 listen [::]:443 ssl http2; #443端口ipv6监听 server_name example.com; #域名1 server_name www.example.com; #域名2(可选) root /var/www/website1; #网站根目录 index index.html index.php index.htm; client_max_body_size 10240M;

    ssl_certificate "/etc/nginx/ssl/server.crt"; //证书位置
    ssl_certificate_key "/etc/nginx/ssl/server.key"; //密钥位置
    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout  10m;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_protocols TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    include /etc/nginx/default.d/*.conf;

    location / {
    try_files $uri $uri/ /index.php$is_args$args;
    }

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }

    location ~ \.php$ {
    fastcgi_pass 127.0.0.1:9000; //php-fpm-sock链接方式
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    include fastcgi_params;
}

location /v2ray { proxy_redirect off; proxy_pass http://127.0.0.1:10000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; } }

你好 照着你的安装了nginx和php 配完之后怎么测试是否配置成功了呢 用v2rayng还是上不去。。。

Lelouch-Lamperoge avatar Sep 25 '19 06:09 Lelouch-Lamperoge

我刚刚重装了一下centos7,然后用的git.io/v2ray.sh一键脚本,没问题啊。我是搬瓦工vps,用ws+tls+cdn。也是cloudflare。

148i avatar Sep 25 '19 13:09 148i

不使用cloudfare,使用godaddy默认解析会有问题吗?

cyxcw1 avatar Sep 28 '19 07:09 cyxcw1

不使用cloudfare,使用godaddy默认解析会有问题吗?

那CF的所有设置都不会生效,也不会跑他们的CDN啊。很简单的道理啊,难道星巴克会给你做一杯瑞幸咖啡?但是你可以拿星巴克的杯子去装瑞幸的咖啡。

Michaol avatar Sep 28 '19 09:09 Michaol

不使用cloudfare,使用godaddy默认解析会有问题吗?

那CF的所有设置都不会生效,也不会跑他们的CDN啊。很简单的道理啊,难道星巴克会给你做一杯瑞幸咖啡?但是你可以拿星巴克的杯子去装瑞幸的咖啡。

我没有使用CF的其他服务哦,只使用域名解析,godaddy是不是可以一样替代的?反正我现在就是连不上,奇怪. HTTP/2 WS+TLS都试过了

cyxcw1 avatar Sep 28 '19 09:09 cyxcw1

不使用cloudfare,使用godaddy默认解析会有问题吗?

那CF的所有设置都不会生效,也不会跑他们的CDN啊。很简单的道理啊,难道星巴克会给你做一杯瑞幸咖啡?但是你可以拿星巴克的杯子去装瑞幸的咖啡。

我没有使用CF的其他服务哦,只使用域名解析,godaddy是不是可以一样替代的?反正我现在就是连不上,奇怪. HTTP/2 WS+TLS都试过了

IP连得上域名才怪了。你必须吧godaddy的DNS换成CF提供的DNS,并且稍等数分钟后,直到你ping域名显示CF的DNS这样才正式启用了CF的服务。

Michaol avatar Sep 28 '19 15:09 Michaol

CloudFare的DNS已经把Proxy status点成灰色了,为什么还是解析不到自己的IP地址?还是显示这样: 备注...如果你的域名是使用 Cloudflare 解析的话..在 Status 那里点一下那图标..让它变灰

  • 在本机直接Ping域名出来的IP地址是正确的VPS的IP地址;
  • 在VPS直接Ping域名出来的IP地址是正确的VPS的IP地址; PIC__11

更新2019年10月30日: 执行v2ray uninstall后再执行v2ray install重新安装服务端,在一开始就选择4#协议就不会出现上面出现的问题,这只是临时因对办法。如果安装后修改协议,我还是会出现上面的问题。

Huaweidev avatar Oct 30 '19 07:10 Huaweidev

我今天也是这样,第一次安装协议1,后来卸载安装协议4一直报这个错,后来把v2ray用自带脚本卸载,然后重启vps,重试就成功了

pro4jhu avatar Dec 07 '19 07:12 pro4jhu

我的更离谱,dns解析记录没什么问题,但是用Windows命令行ping域名一直都是“找不到主机”。解析记录设置如下: Snipaste_2022-05-24_22-51-29

RookieTerry avatar May 24 '22 14:05 RookieTerry