v2rayNG 启动后,点击测试连接,能连通(能正常代理)
v2rayNG 启动后,点击测试连接,提示:失败:Get “http://www.google.com/gen_204":context deadline exceeded (不能正常代理)
--------- beginning of main
10-08 11:54:40.435 I/GoLog (28291): loading v2ray config
10-08 11:54:40.435 I/GoLog (28291): Preparing Domain: mydomain.com:443
10-08 11:54:40.441 I/GoLog (28291): new v2ray core
10-08 11:54:40.442 I/GoLog (28291): start v2ray core
10-08 11:54:40.442 I/GoLog (28291): [Info] v2ray.com/core/app/dns: DNS: created udp client inited for 1.1.1.1:53
10-08 11:54:40.442 I/GoLog (28291): [Info] v2ray.com/core/transport/internet/tcp: listening TCP on 127.0.0.1:10808
10-08 11:54:40.443 I/GoLog (28291): [Info] v2ray.com/core/transport/internet/udp: listening UDP on 127.0.0.1:10808
10-08 11:54:40.443 I/GoLog (28291): [Info] v2ray.com/core/transport/internet/tcp: listening TCP on 127.0.0.1:10809
10-08 11:54:40.443 I/GoLog (28291): [Warning] v2ray.com/core: V2Ray 4.30.0 started
10-08 11:54:40.488 D/com.v2ray.ang(28291): [/data/app/com.v2ray.ang-dyJbCla0CMiZypo2hsW_ZQ==/lib/arm64/libtun2socks.so, --netif-ipaddr, 26.26.26.2, --netif-netmask, 255.255.255.252, --socks-server-addr, 127.0.0.1:10808, --tunmtu, 1500, --sock-path, sock_path, --enable-udprelay, --loglevel, notice]
10-08 11:54:40.493 D/com.v2ray.ang(28291): Process[pid=28325, hasExited=false]
10-08 11:54:40.493 D/com.v2ray.ang(28291): /data/user/0/com.v2ray.ang/files/sock_path
10-08 11:54:40.504 I/tun2socks(28325): NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.130
10-08 11:54:40.549 D/com.v2ray.ang(28291): sendFd tries: 0
10-08 11:54:40.550 I/tun2socks(28325): NOTICE(tun2socks): entering event loop
10-08 11:54:40.557 I/GoLog (28291): Prepare Result:
10-08 11:54:40.557 I/GoLog (28291): Domain: mydomain.com
10-08 11:54:40.557 I/GoLog (28291): Port: 443
10-08 11:54:40.557 I/GoLog (28291): IPs: [1*.1*0.9*.1*2]
10-08 11:54:50.345 I/GoLog (28291): [Info] v2ray.com/core/app/dispatcher: default route for tcp:www.google.com:80
10-08 11:54:50.346 I/GoLog (28291): [Info] v2ray.com/core/transport/internet/websocket: creating connection to tcp:mydomain.com:443
10-08 11:54:50.578 I/GoLog (28291): Using Prepared: 1*.1*0.9*.1*2
10-08 11:54:51.086 I/GoLog (28291): [Info] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:www.google.com:80 via tcp:mydomain.com:443
10-08 11:55:02.343 I/GoLog (28291): [Info] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > context deadline exceeded
10-08 11:55:02.344 D/com.v2ray.ang(28291): measureV2rayDelay: Get "http://www.google.com/gen_204": io: read/write on closed pipe
10-08 11:55:05.863 I/GoLog (28291): [Info] v2ray.com/core/app/dispatcher: default route for tcp:www.google.com:80
10-08 11:55:05.863 I/GoLog (28291): [Info] v2ray.com/core/transport/internet/websocket: creating connection to tcp:mydomain.com:443
10-08 11:55:06.054 I/GoLog (28291): Using Prepared: 1*.1*0.9*.1*2
10-08 11:55:06.425 I/GoLog (28291): [Info] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:www.google.com:80 via tcp:mydomain.com:443
10-08 11:55:17.862 D/com.v2ray.ang(28291): measureV2rayDelay: Get "http://www.google.com/gen_204": context deadline exceeded
10-08 11:55:17.862 I/GoLog (28291): [Info] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > context deadline exceeded
10-08 11:55:33.162 D/com.v2ray.ang(28291): tun2socks destroy
10-08 11:55:33.163 I/tun2socks(28325): NOTICE(tun2socks): termination requested
10-08 11:55:33.163 I/tun2socks(28325): NOTICE(tun2socks): tearing down
10-08 11:55:33.163 I/tun2socks(28325): NOTICE(tun2socks): Free TCP connections
10-08 11:55:33.163 I/tun2socks(28325): NOTICE(tun2socks): exiting
--------- beginning of system
安卓手机型号:红米K30 4G版
https://www.mi.com/redmik30/specs
Linux
Linux os-01 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
v2ray配置:ws+tls+nginx
nginx 配置:
server {
listen 443 ssl;
ssl_certificate /etc/ssl/mydomain/mydomain.com_chain.crt;
ssl_certificate_key /etc/ssl/mydomain/mydomain.com_key.key;
server_name mydomain.com;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location /api {
proxy_redirect off;
proxy_pass http://127.0.0.1:10086;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
服务端版本 v4.30.0 :
# systemctl status v2ray
● v2ray.service - V2Ray Service
Loaded: loaded (/etc/systemd/system/v2ray.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/v2ray.service.d
└─10-donot_touch_single_conf.conf
Active: active (running) since Thu 2020-10-08 03:45:21 UTC; 59min ago
Docs: https://www.v2fly.org/
Main PID: 13858 (v2ray)
Tasks: 6 (limit: 4936)
Memory: 11.6M
CGroup: /system.slice/v2ray.service
└─13858 /usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json
Oct 08 03:45:21 os-01 systemd[1]: Started V2Ray Service.
Oct 08 03:45:21 os-01 v2ray[13858]: V2Ray 4.30.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.15.2 linux/amd64)
Oct 08 03:45:21 os-01 v2ray[13858]: A unified platform for anti-censorship.
Oct 08 03:45:21 os-01 v2ray[13858]: 2020/10/08 03:45:21 [Info] v2ray.com/core/common/platform/ctlcmd: <v2ctl message>
Oct 08 03:45:21 os-01 v2ray[13858]: v2ctl> Read config: /usr/local/etc/v2ray/config.json
客户端测试连接对应的服务端错误日志:
2020/10/08 03:55:02 11*.1*7.*9.1*0:48042 rejected v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 654 33 29 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/10/08 03:55:17 11*.1*7.*9.1*0:48044 rejected v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 654 33 21 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
服务端配置:
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbounds": [{
"port": 10086,
"listen": "127.0.0.1",
"protocol": "vmess",
"settings": {
"clients": [{
"id": "my_id",
//"level": 1,
"alertId": 64
}]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/api"
}
}
}],
"outbounds": [{
"protocol": "freedom",
"settings": {}
}, {
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}],
"routing": {
"rules": [{
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "blocked"
}]
}
}
原先服务端 v4.27.x版本与安卓客户端v1.3.x能正常代理,换了主机服务端 v4.30.0(同样尝试过 v.4.28, v.4.29),安卓客户端 v1.4.7(同样尝试过 v1.3.3, 1.4.x)均无法正常代理;
安卓客户端手机时间和服务器偏移量很小,基本是同步的(只是时区不同,服务器时区是 UTC,客户端GTM+8,和时区应该没关系,客户端设置UTC时区,同样不能正常代理)
Windows、Linux客户端都能正常代理访问
安卓客户端配置信息:



VMess: Invalid User
可能的原因:
客户端和服务器端的用户 ID 不匹配;
客户端和服务器端的用户 alterId 不匹配;
客户端与服务器的时间不匹配,误差不能超过90秒钟;
https://www.v2fly.org/guide/faq.html#v2ray-%E4%BD%BF%E7%94%A8%E7%9B%B8%E5%85%B3
pro 表示同样的问题,感觉和手机有关系
VMess: Invalid User
可能的原因:客户端和服务器端的用户 ID 不匹配;
客户端和服务器端的用户 alterId 不匹配;
客户端与服务器的时间不匹配,误差不能超过90秒钟;
https://www.v2fly.org/guide/faq.html#v2ray-%E4%BD%BF%E7%94%A8%E7%9B%B8%E5%85%B3
ID匹配
alertId匹配
服务器与客户端时间误差不超过90s
Windows与Linux正常代理
是否代理域名了?域名到期了?
I have same problem, after android v2rayNG update to 1.4.13(core 4.32.1) , i can connect to server with mobile date but when i switch to wifi i have this error:
Fail to detect internet connection: context deadline exceeded
i do this test:
碰到相同问题,请问楼主有解决吗?谢谢
Hi,
No, I could not fix the problem in this version.
I just went back to the previous version, but although I disabled the automatic update of Google Play, it still updates to this version after a while and it crashes
Thank you for reply, I reset my phone,it worked
2021年1月30日 下午2:45,"xobserver" notifications@github.com写道:
Hi,
No, I could not fix the problem in this version.
I just went back to the previous version, but although I disabled the
automatic update of Google Play, it still updates to this version after a
while and it crashes—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/2dust/v2rayNG/issues/654#issuecomment-770167997, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGDEV2JZLHDKUK3MYY543S4OTHFANCNFSM4SIICXDQ
.
Most helpful comment
ID匹配
alertId匹配
服务器与客户端时间误差不超过90s
Windows与Linux正常代理