2dust / v2rayNG

A V2Ray client for Android, support Xray core and v2fly core
https://1.2345345.xyz
GNU General Public License v3.0
36.09k stars 5.51k forks source link

V2rayNG 启动服务后 test ping 正常,且不报错,但没有数据 #2121

Closed ym3000 closed 1 year ago

ym3000 commented 1 year ago

这个问题在我翻了其他人的 issues 之后已经解决了,方法在此 https://github.com/2dust/v2rayNG/issues/1685#issuecomment-1416800931 但还是觉得有必要反馈一下

问题描述: V2rayNG 启动服务后,test ping 正常,且不报错,但没有数据。同一套配置在 PC 端的 xray-core 和 V2rayN 使用正常 解决方法: 在 V2rayNG 的设置中,把 远程 DNS 的默认值 1.1.1.1 改成 tls://dns.googletls://dns.cloudflare 。如果用 ip 表示,无论 8.8.8.8 还是 1.1.1.1 都会出现上面的问题。

上述改动不影响我的其他 vps,即:远程 DNS 设置无论写成 8.8.8.8 还是 tls://dns.cloudflare 它们都能正常工作。 只有当前出问题这台 vps 必须使用 tls://dns.* 这种形式。而当前这台以前工作正常。最近修改了配置,在其中加入了 cloudflare-warp,结果它在 V2rayNG 下就无法工作了,而 PC 端依然工作正常。

几个新的疑问:

  1. 一定要把 ip 改成 tls://dns.* 这种形式才能解决问题,是什么原理?
  2. 考虑到是我改了服务器配置后才出现的问题,难道还是 config.json 里有什么错误?

下面附上服务端和客户端的 config.json,以便大佬指正。个人信息用空格   代替,并非配置错误。

服务端配置: { "inbounds": [ { "listen": "127.0.0.1", "port": 50000, "protocol": "vless", "settings": { "clients": [ { "id": "   " } ], "decryption": "none" }, "streamSettings": { "network": "grpc", "grpcSettings": { "serviceName": "   ", "multiMode": true } } } ], "outbounds": [ { "tag": "warp", "protocol": "socks", "settings": { "servers": [ { "address": "127.0.0.1", "port": 40000, "users": [] } ] } }, { "tag": "direct", "protocol": "freedom" } ], "routing": { "rules": [ { "type": "field", "outboundTag": "warp", "domain": [ "openai.com" ] } ] } }

xray-core 客户端配置: { "inbounds": [ { "port":   , "listen": "127.0.0.1", "protocol": "socks", "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ], "routeOnly": false }, "settings": { "auth": "noauth", "udp": true, "allowTransparent": false } } ], "outbounds": [ { "protocol": "vless", "settings": { "vnext": [ { "address": "   ", "port": 443, "users": [ { "id": " ", "alterId": 0, "security": "auto", "encryption": "none", "flow": "" } ] } ] }, "streamSettings": { "network": "grpc", "security": "tls", "tlsSettings": { "allowInsecure": false }, "grpcSettings": { "serviceName": "   ", "multiMode": true, "idle_timeout": 60, "health_check_timeout": 20, "permit_without_stream": false, "initial_windows_size": 0 } }, "mux": { "enabled": false, "concurrency": -1 } } ] }

Rickion commented 1 year ago

Same issue. but changing DNS server to tls://dns.google or tls://dns.cloudflare does not help.

log on server(VPS): and keep looping this

2023/03/24 20:29:42 172.xx.xx.66:0 accepted udp:1.1.1.1:53 [warp]
2023/03/24 20:29:45 172.xx.xx.31:0 accepted udp:1.1.1.1:53 [warp]
2023/03/24 20:52:35 172.xx.xx.31:0 accepted udp:8.8.8.8:53 [warp]
2023/03/24 20:52:37 172.xx.xx.66:0 accepted udp:8.8.8.8:53 [warp]
2023/03/24 20:52:40 172.xx.xx.15:0 accepted udp:8.8.8.8:53 [warp]
Rickion commented 1 year ago

Same issue. but changing DNS server to tls://dns.google or tls://dns.cloudflare does not help.

log on server(VPS): and keep looping this

2023/03/24 20:29:42 172.xx.xx.66:0 accepted udp:1.1.1.1:53 [warp]
2023/03/24 20:29:45 172.xx.xx.31:0 accepted udp:1.1.1.1:53 [warp]
2023/03/24 20:52:35 172.xx.xx.31:0 accepted udp:8.8.8.8:53 [warp]
2023/03/24 20:52:37 172.xx.xx.66:0 accepted udp:8.8.8.8:53 [warp]
2023/03/24 20:52:40 172.xx.xx.15:0 accepted udp:8.8.8.8:53 [warp]

This happened after I configured my VPS server with warp (Add a SOCKS protocol then route some traffic into it with a tag). The v2ray client changed nothing. It works well on my PC, but not with v2rayNG.

P.S. I tried another app, SagerNet, and it works well. (Simply exported the full JSON config and imported it into SagerNet, without making any changes.)

Shrink9 commented 1 year ago

这个问题在我翻了其他人的 issues 之后已经解决了,方法在此 #1685 (comment) 但还是觉得有必要反馈一下

问题描述: V2rayNG 启动服务后,test ping 正常,且不报错,但没有数据。同一套配置在 PC 端的 xray-core 和 V2rayN 使用正常 解决方法: 在 V2rayNG 的设置中,把 远程 DNS 的默认值 1.1.1.1 改成 tls://dns.googletls://dns.cloudflare 。如果用 ip 表示,无论 8.8.8.8 还是 1.1.1.1 都会出现上面的问题。

上述改动不影响我的其他 vps,即:远程 DNS 设置无论写成 8.8.8.8 还是 tls://dns.cloudflare 它们都能正常工作。 只有当前出问题这台 vps 必须使用 tls://dns.* 这种形式。而当前这台以前工作正常。最近修改了配置,在其中加入了 cloudflare-warp,结果它在 V2rayNG 下就无法工作了,而 PC 端依然工作正常。

几个新的疑问:

  1. 一定要把 ip 改成 tls://dns.* 这种形式才能解决问题,是什么原理?
  2. 考虑到是我改了服务器配置后才出现的问题,难道还是 config.json 里有什么错误?

下面附上服务端和客户端的 config.json,以便大佬指正。个人信息用空格   代替,并非配置错误。

服务端配置: { "inbounds": [ { "listen": "127.0.0.1", "port": 50000, "protocol": "vless", "settings": { "clients": [ { "id": "   " } ], "decryption": "none" }, "streamSettings": { "network": "grpc", "grpcSettings": { "serviceName": "   ", "multiMode": true } } } ], "outbounds": [ { "tag": "warp", "protocol": "socks", "settings": { "servers": [ { "address": "127.0.0.1", "port": 40000, "users": [] } ] } }, { "tag": "direct", "protocol": "freedom" } ], "routing": { "rules": [ { "type": "field", "outboundTag": "warp", "domain": [ "openai.com" ] } ] } }

xray-core 客户端配置: { "inbounds": [ { "port":   , "listen": "127.0.0.1", "protocol": "socks", "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ], "routeOnly": false }, "settings": { "auth": "noauth", "udp": true, "allowTransparent": false } } ], "outbounds": [ { "protocol": "vless", "settings": { "vnext": [ { "address": "   ", "port": 443, "users": [ { "id": " ", "alterId": 0, "security": "auto", "encryption": "none", "flow": "" } ] } ] }, "streamSettings": { "network": "grpc", "security": "tls", "tlsSettings": { "allowInsecure": false }, "grpcSettings": { "serviceName": "   ", "multiMode": true, "idle_timeout": 60, "health_check_timeout": 20, "permit_without_stream": false, "initial_windows_size": 0 } }, "mux": { "enabled": false, "concurrency": -1 } } ] }

大佬你好,我和你一样的问题,但是我按照你说的把远程DNS改为tls://dns.google或者tls://dns.cloudflare之后还是被openai给block了。