VMess + QUIC节点 VPN模式无法使用
想连接的节点是vmess + quic的, 服务器端是xray。
VPN模式选择该节点, 然后测试链接会提示context deadline exceeded。
仅代理模式下, 测试链接没问题。
试过将服务器ip加入直连列表, 未解决问题。
预期行为
能正常使用VPN模式经代理连接网络。
实际行为
VPN模式无法连接。
复现方法
- 创建一个
streamSettings和下面一样的服务器。
"streamSettings": {
"network": "quic",
"security": "tls",
"tlsSettings": {
"serverName": "blablabla.com",
"rejectUnknownSni": false,
"disableSystemRoot": false,
"certificates": [
{
"ocspStapling": 3600,
"oneTimeLoading": false,
"usage": "encipherment",
"certificateFile": "/disk/blabla/fullchain.pem",
"keyFile": "/disk/blabla/privkey.pem"
}
]
},
"quicSettings": {
"security": "aes-128-gcm",
"key": "1145141919810",
"header": {
"type": "utp"
}
}
}
- 在
v2rayNG以VPN模式连接该服务器。 - 测试网络连接。
日志信息
通过v2rayNG内置Logcat获取的日志, 日志级别为debug。
--------- beginning of main
05-01 12:19:32.029 I/GoLog (31954): Not Using Prepared: udp,-数据删除-:6882
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "dns": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "hosts": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "domain:googleapis.cn": "googleapis.com"
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "servers": [
05-01 12:19:33.940 D/com.v2ray.ang(31954): "1.1.1.1"
05-01 12:19:33.940 D/com.v2ray.ang(31954): ]
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "inbounds": [
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "listen": "127.0.0.1",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "port": 10808,
05-01 12:19:33.940 D/com.v2ray.ang(31954): "protocol": "socks",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "settings": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "auth": "noauth",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "udp": true,
05-01 12:19:33.940 D/com.v2ray.ang(31954): "userLevel": 8
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "sniffing": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "destOverride": [
05-01 12:19:33.940 D/com.v2ray.ang(31954): "http",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "tls"
05-01 12:19:33.940 D/com.v2ray.ang(31954): ],
05-01 12:19:33.940 D/com.v2ray.ang(31954): "enabled": true
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "tag": "socks"
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "listen": "127.0.0.1",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "port": 10809,
05-01 12:19:33.940 D/com.v2ray.ang(31954): "protocol": "http",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "settings": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "userLevel": 8
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "tag": "http"
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.940 D/com.v2ray.ang(31954): ],
05-01 12:19:33.940 D/com.v2ray.ang(31954): "log": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "loglevel": "debug"
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "outbounds": [
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "mux": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "concurrency": 8,
05-01 12:19:33.940 D/com.v2ray.ang(31954): "enabled": false
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "protocol": "vmess",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "settings": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "vnext": [
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "address": "-数据删除-",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "port": 6882,
05-01 12:19:33.940 D/com.v2ray.ang(31954): "users": [
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "alterId": 0,
05-01 12:19:33.940 D/com.v2ray.ang(31954): "encryption": "",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "flow": "",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "id": "-数据删除-",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "level": 8,
05-01 12:19:33.940 D/com.v2ray.ang(31954): "security": "auto"
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.940 D/com.v2ray.ang(31954): ]
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.940 D/com.v2ray.ang(31954): ]
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "streamSettings": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "network": "quic",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "quicSettings": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "header": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "type": "utp"
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "key": "-数据删除-",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "security": "aes-128-gcm"
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "security": "tls",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "tlsSettings": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "allowInsecure": false,
05-01 12:19:33.940 D/com.v2ray.ang(31954): "serverName": "-数据删除-"
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "tag": "proxy"
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "protocol": "freedom",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "settings": {},
05-01 12:19:33.940 D/com.v2ray.ang(31954): "tag": "direct"
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "protocol": "blackhole",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "settings": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "response": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "type": "http"
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.940 D/com.v2ray.ang(31954): },
05-01 12:19:33.940 D/com.v2ray.ang(31954): "tag": "block"
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.940 D/com.v2ray.ang(31954): ],
05-01 12:19:33.940 D/com.v2ray.ang(31954): "routing": {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "domainMatcher": "mph",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "domainStrategy": "IPIfNonMatch",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "rules": [
05-01 12:19:33.940 D/com.v2ray.ang(31954): {
05-01 12:19:33.940 D/com.v2ray.ang(31954): "ip": [
05-01 12:19:33.940 D/com.v2ray.ang(31954): "1.1.1.1"
05-01 12:19:33.940 D/com.v2ray.ang(31954): ],
05-01 12:19:33.940 D/com.v2ray.ang(31954): "outboundTag": "proxy",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "port": "53",
05-01 12:19:33.940 D/com.v2ray.ang(31954): "type": "field"
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.940 D/com.v2ray.ang(31954): ]
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.940 D/com.v2ray.ang(31954): }
05-01 12:19:33.943 I/GoLog (31954): Preparing Domain: -数据删除-:6882
05-01 12:19:33.944 I/GoLog (31954): loading core config
05-01 12:19:33.946 I/GoLog (31954): new core
05-01 12:19:33.947 I/GoLog (31954): start core
05-01 12:19:33.947 I/GoLog (31954): Prepare Result:
05-01 12:19:33.947 I/GoLog (31954): Domain: -数据删除-
05-01 12:19:33.947 I/GoLog (31954): Port: 6882
05-01 12:19:33.947 I/GoLog (31954): IPs: [-数据删除-]
05-01 12:19:33.947 I/GoLog (31954): [Debug] app/log: Logger started
05-01 12:19:33.948 I/GoLog (31954): [Info] app/dns: DNS: created UDP client initialized for 1.1.1.1:53
05-01 12:19:33.948 I/GoLog (31954): [Debug] app/proxyman/inbound: creating stream worker on 127.0.0.1:10808
05-01 12:19:33.948 I/GoLog (31954): [Debug] app/proxyman/inbound: creating stream worker on 127.0.0.1:10809
05-01 12:19:33.948 I/GoLog (31954): [Info] transport/internet/tcp: listening TCP on 127.0.0.1:10808
05-01 12:19:33.950 I/GoLog (31954): [Info] transport/internet/udp: listening UDP on 127.0.0.1:10808
05-01 12:19:33.950 I/GoLog (31954): [Info] transport/internet/tcp: listening TCP on 127.0.0.1:10809
05-01 12:19:33.950 I/GoLog (31954): [Warning] core: Xray 1.5.4 started
05-01 12:19:33.976 D/com.v2ray.ang(31954): [/data/app/~~hwbOhYL0PUxV4kuONfVKzQ==/com.v2ray.ang-SqoBY6o-f1SfRt8gxKtKMg==/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]
05-01 12:19:33.979 D/com.v2ray.ang(31954): Process[pid=931, hasExited=false]
05-01 12:19:33.979 D/com.v2ray.ang(31954): /data/user/0/com.v2ray.ang/files/sock_path
05-01 12:19:34.002 I/tun2socks( 931): NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.130
05-01 12:19:34.030 D/com.v2ray.ang(31954): sendFd tries: 0
05-01 12:19:34.030 I/tun2socks( 931): NOTICE(tun2socks): entering event loop
05-01 12:19:34.178 I/GoLog (31954): [Info] [74053252] proxy/socks: TCP Connect request to tcp:118.26.252.225:443
05-01 12:19:34.179 I/GoLog (31954): [Info] [74053252] app/dispatcher: default route for tcp:118.26.252.225:443
05-01 12:19:34.179 I/GoLog (31954): tcp:127.0.0.1:55722 accepted tcp:118.26.252.225:443 [proxy]
05-01 12:19:34.183 I/GoLog (31954): [Info] [636320587] proxy/socks: client UDP connection from udp:127.0.0.1:48643
05-01 12:19:34.183 I/GoLog (31954): [Debug] [636320587] proxy/socks: send packet to udp:1.1.1.1:53 with 31 bytes
05-01 12:19:34.183 I/GoLog (31954): [Debug] [636320587] transport/internet/udp: dispatch request to: udp:1.1.1.1:53
05-01 12:19:34.183 I/GoLog (31954): [Info] transport/internet/udp: establishing new connection for udp:1.1.1.1:53
05-01 12:19:34.183 I/GoLog (31954): udp:127.0.0.1:48643 accepted udp:1.1.1.1:53 [proxy]
05-01 12:19:34.183 I/GoLog (31954): [Info] [636320587] app/dispatcher: taking detour [proxy] for [udp:1.1.1.1:53]
05-01 12:19:35.050 I/GoLog (31954): [Info] app/dispatcher: default route for tcp:www.google.com:80
05-01 12:19:39.189 I/GoLog (31954): [Info] [644789765] proxy/socks: client UDP connection from udp:127.0.0.1:56354
05-01 12:19:39.189 I/GoLog (31954): [Debug] [644789765] proxy/socks: send packet to udp:114.114.114.114:53 with 31 bytes
05-01 12:19:39.189 I/GoLog (31954): [Debug] [644789765] transport/internet/udp: dispatch request to: udp:114.114.114.114:53
05-01 12:19:39.189 I/GoLog (31954): [Info] transport/internet/udp: establishing new connection for udp:114.114.114.114:53
05-01 12:19:39.190 I/GoLog (31954): udp:127.0.0.1:56354 accepted udp:114.114.114.114:53 [proxy]
05-01 12:19:39.190 I/GoLog (31954): [Info] [644789765] app/dispatcher: default route for udp:114.114.114.114:53
05-01 12:19:41.518 I/GoLog (31954): [Info] [1076924273] proxy/socks: client UDP connection from udp:127.0.0.1:46772
05-01 12:19:41.518 I/GoLog (31954): [Debug] [1076924273] proxy/socks: send packet to udp:1.1.1.1:53 with 34 bytes
05-01 12:19:41.518 I/GoLog (31954): [Debug] [1076924273] transport/internet/udp: dispatch request to: udp:1.1.1.1:53
05-01 12:19:41.518 I/GoLog (31954): [Info] transport/internet/udp: establishing new connection for udp:1.1.1.1:53
05-01 12:19:41.518 I/GoLog (31954): [Info] [1076924273] app/dispatcher: taking detour [proxy] for [udp:1.1.1.1:53]
05-01 12:19:41.518 I/GoLog (31954): udp:127.0.0.1:46772 accepted udp:1.1.1.1:53 [proxy]
05-01 12:19:44.198 I/GoLog (31954): [Debug] [636320587] proxy/socks: send packet to udp:1.1.1.1:53 with 31 bytes
05-01 12:19:44.198 I/GoLog (31954): [Debug] [636320587] transport/internet/udp: dispatch request to: udp:1.1.1.1:53
05-01 12:19:46.527 I/GoLog (31954): [Info] [1087287619] proxy/socks: client UDP connection from udp:127.0.0.1:58865
05-01 12:19:46.527 I/GoLog (31954): [Debug] [1087287619] proxy/socks: send packet to udp:114.114.114.114:53 with 34 bytes
05-01 12:19:46.527 I/GoLog (31954): [Debug] [1087287619] transport/internet/udp: dispatch request to: udp:114.114.114.114:53
05-01 12:19:46.527 I/GoLog (31954): [Info] transport/internet/udp: establishing new connection for udp:114.114.114.114:53
05-01 12:19:46.527 I/GoLog (31954): [Info] [1087287619] app/dispatcher: default route for udp:114.114.114.114:53
05-01 12:19:46.528 I/GoLog (31954): udp:127.0.0.1:58865 accepted udp:114.114.114.114:53 [proxy]
05-01 12:19:47.052 D/com.v2ray.ang(31954): measureV2rayDelay: go.Universe$proxyerror: Get "http://www.google.com/generate_204": context deadline exceeded
05-01 12:19:49.205 I/GoLog (31954): [Debug] [644789765] proxy/socks: send packet to udp:114.114.114.114:53 with 31 bytes
05-01 12:19:49.205 I/GoLog (31954): [Debug] [644789765] transport/internet/udp: dispatch request to: udp:114.114.114.114:53
--------- beginning of system
环境信息
小米平板5 - MIUI 13.0.8 - Android 11 Samsung S9 - One UI 2.5 - Android 10
试一下最简配置 https://github.com/XTLS/Xray-examples/tree/main/VMess-QUIC
试一下最简配置 https://github.com/XTLS/Xray-examples/tree/main/VMess-QUIC
问题依旧, vpn模式会发生context deadline exceeded的情况。 仅代理模式没问题。
v2rayNG版本是1.7.4, 在google play store安装的版本。
链式代理也出现同种问题。https://github.com/2dust/v2rayNG/issues/1615#issue-1334761043
哦对了, 暂时解决方法是在使用vpn模式的时候勾选分应用代理和绕行模式, 然后把v2rayNG给勾选了。