2dust / v2rayNG

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

1.1.15 域名解析异常 #247

Closed HeXis-YS closed 3 years ago

HeXis-YS commented 4 years ago

在提出问题前请先自行排除服务器端问题,同时也请通过搜索确认是否有人提出过相同问题。

预期行为

可以正常访问网站

实际行为

无法通过域名访问网站,但IP直接访问可以。通过http代理访问正常。该问题只在1.1.15版本出现,1.1.14正常。

复现方法

使用自定义配置文件,配置文件在PC端(v2rayN 3.5, v2ray-core 4.22.1)以及1.1.14版本测试没有问题

日志信息

--------- beginning of main
01-27 03:22:54.782 W/com.v2ray.ang(11912): resources.arsc in APK '/data/app/com.baidu.BaiduMap-nezSY7ajmv8c3ODNDE9Sig==/base.apk' is compressed.
01-27 03:23:18.434 E/com.v2ray.ang(17928): Not starting debugger since process cannot load the jdwp agent.
01-27 03:23:26.244 I/GoLog   (17978): loading v2ray config
01-27 03:23:26.244 I/GoLog   (17978): Preparing Domain: 198.41.214.201:443
01-27 03:23:26.245 I/GoLog   (17978): Prepare Result:
01-27 03:23:26.245 I/GoLog   (17978):  Domain: 198.41.214.201
01-27 03:23:26.245 I/GoLog   (17978):  Port: 443
01-27 03:23:26.245 I/GoLog   (17978):  IPs: [198.41.214.201]
01-27 03:23:26.933 I/GoLog   (17978): new v2ray core
01-27 03:23:26.934 I/GoLog   (17978): [Debug] v2ray.com/core/app/log: Logger started
01-27 03:23:26.981 I/GoLog   (17978): [Info] v2ray.com/core/app/dns: DNS: created udp client inited for 1.1.1.1:53
01-27 03:23:26.982 I/GoLog   (17978): [Info] v2ray.com/core/app/dns: DNS: created udp client inited for 119.29.29.29:53
01-27 03:23:27.093 I/GoLog   (17978): start v2ray core
01-27 03:23:27.094 I/GoLog   (17978): [Debug] v2ray.com/core/app/proxyman/inbound: creating stream worker on 127.0.0.1:10808
01-27 03:23:27.094 I/GoLog   (17978): [Debug] v2ray.com/core/app/proxyman/inbound: creating stream worker on 127.0.0.1:10809
01-27 03:23:27.095 I/GoLog   (17978): [Info] v2ray.com/core/transport/internet/tcp: listening TCP on 127.0.0.1:10808
01-27 03:23:27.096 I/GoLog   (17978): [Info] v2ray.com/core/transport/internet/udp: listening UDP on 127.0.0.1:10808
01-27 03:23:27.096 I/GoLog   (17978): [Info] v2ray.com/core/transport/internet/tcp: listening TCP on 127.0.0.1:10809
01-27 03:23:27.096 I/GoLog   (17978): [Warning] v2ray.com/core: V2Ray 4.22.1 started
01-27 03:23:27.096 D/com.v2ray.ang(17978): m,1500 a,26.26.26.1,30 r,0.0.0.0,0
01-27 03:23:27.189 D/com.v2ray.ang(17978): [/data/app/com.v2ray.ang-Mavs-CY3bGnVSfXUE_Pl-w==/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]
01-27 03:23:27.194 D/com.v2ray.ang(17978): Process[pid=18017, hasExited=false]
01-27 03:23:27.195 D/com.v2ray.ang(17978): /data/user/0/com.v2ray.ang/files/sock_path
01-27 03:23:27.229 D/tun2socks(18017): NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.130
01-27 03:23:27.250 D/com.v2ray.ang(17978): sendFd tries: 0
01-27 03:23:27.253 D/tun2socks(18017): NOTICE(tun2socks): entering event loop
01-27 03:23:28.263 I/GoLog   (17978): [Info] [3225384113] v2ray.com/core/proxy/socks: TCP Connect request to tcp:36.155.240.148:14000
01-27 03:23:28.324 I/GoLog   (17978): Not Using Prepared: tcp,36.155.240.148:14000
01-27 03:23:28.324 I/GoLog   (17978): [Info] [3225384113] v2ray.com/core/app/dispatcher: taking detour [direct] for [tcp:36.155.240.148:14000]
01-27 03:23:28.324 I/GoLog   (17978): [Info] [3225384113] v2ray.com/core/proxy/freedom: opening connection to tcp:36.155.240.148:14000
01-27 03:23:28.324 I/GoLog   (17978): [Info] [3225384113] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:36.155.240.148:14000
01-27 03:23:28.324 I/GoLog   (17978): tcp:127.0.0.1:41490 accepted tcp:36.155.240.148:14000 [direct] 
01-27 03:23:29.862 I/GoLog   (17978): Not Using Prepared: udp,192.168.1.1:53
01-27 03:23:29.862 I/GoLog   (17978): [Info] [2233690212] v2ray.com/core/proxy/socks: client UDP connection from udp:127.0.0.1:53317
01-27 03:23:29.862 I/GoLog   (17978): [Debug] [2233690212] v2ray.com/core/proxy/socks: send packet to udp:192.168.1.1:53 with 28 bytes
01-27 03:23:29.862 I/GoLog   (17978): [Debug] [2233690212] v2ray.com/core/transport/internet/udp: dispatch request to: udp:192.168.1.1:53
01-27 03:23:29.862 I/GoLog   (17978): [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:192.168.1.1:53
01-27 03:23:29.862 I/GoLog   (17978): [Info] [2233690212] v2ray.com/core/app/dispatcher: taking detour [direct] for [udp:192.168.1.1:53]
01-27 03:23:29.862 I/GoLog   (17978): [Info] [2233690212] v2ray.com/core/proxy/freedom: opening connection to udp:192.168.1.1:53
01-27 03:23:29.862 I/GoLog   (17978): udp:127.0.0.1:53317 accepted udp:192.168.1.1:53 [direct] 
01-27 03:23:29.865 I/GoLog   (17978): Not Using Prepared: udp,192.168.1.1:53
01-27 03:23:29.865 I/GoLog   (17978): [Info] [3146080084] v2ray.com/core/proxy/socks: client UDP connection from udp:127.0.0.1:35170
01-27 03:23:29.865 I/GoLog   (17978): [Debug] [3146080084] v2ray.com/core/proxy/socks: send packet to udp:192.168.1.1:53 with 41 bytes
01-27 03:23:29.865 I/GoLog   (17978): [Debug] [3146080084] v2ray.com/core/transport/internet/udp: dispatch request to: udp:192.168.1.1:53
01-27 03:23:29.865 I/GoLog   (17978): [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:192.168.1.1:53
01-27 03:23:29.865 I/GoLog   (17978): [Info] [3146080084] v2ray.com/core/app/dispatcher: taking detour [direct] for [udp:192.168.1.1:53]
01-27 03:23:29.865 I/GoLog   (17978): [Info] [3146080084] v2ray.com/core/proxy/freedom: opening connection to udp:192.168.1.1:53
01-27 03:23:29.866 I/GoLog   (17978): udp:127.0.0.1:35170 accepted udp:192.168.1.1:53 [direct] 
01-27 03:23:29.873 I/GoLog   (17978): [Debug] [3146080084] v2ray.com/core/proxy/socks: writing back UDP response with 105 bytes
01-27 03:23:29.877 I/GoLog   (17978): [Debug] [2233690212] v2ray.com/core/proxy/socks: writing back UDP response with 44 bytes
01-27 03:23:29.883 I/GoLog   (17978): [Info] [159290768] v2ray.com/core/proxy/socks: TCP Connect request to tcp:185.199.109.154:443
01-27 03:23:29.883 I/GoLog   (17978): [Info] [159290768] v2ray.com/core/app/dispatcher: sniffed domain: github.githubassets.com
01-27 03:23:29.883 I/GoLog   (17978): [Info] [159290768] v2ray.com/core/app/dispatcher: taking detour [vmess-out] for [tcp:github.githubassets.com:443]
01-27 03:23:29.883 I/GoLog   (17978): [Info] [159290768] v2ray.com/core/transport/internet/websocket: creating connection to tcp:198.41.214.201:443
01-27 03:23:29.883 I/GoLog   (17978): tcp:127.0.0.1:41496 accepted tcp:185.199.109.154:443 [vmess-out] 
01-27 03:23:29.887 I/GoLog   (17978): [Info] [1058918030] v2ray.com/core/proxy/socks: TCP Connect request to tcp:52.74.223.119:443
01-27 03:23:29.887 I/GoLog   (17978): [Info] [562937515] v2ray.com/core/proxy/socks: TCP Connect request to tcp:52.74.223.119:443
01-27 03:23:29.889 I/GoLog   (17978): tcp:127.0.0.1:41504 accepted tcp:52.74.223.119:443 [vmess-out] 
01-27 03:23:29.889 I/GoLog   (17978): [Info] [1058918030] v2ray.com/core/app/dispatcher: sniffed domain: github.com
01-27 03:23:29.889 I/GoLog   (17978): [Info] [1058918030] v2ray.com/core/app/dispatcher: taking detour [vmess-out] for [tcp:github.com:443]
01-27 03:23:29.889 I/GoLog   (17978): [Info] [1058918030] v2ray.com/core/transport/internet/websocket: creating connection to tcp:198.41.208.162:443
01-27 03:23:29.889 I/GoLog   (17978): tcp:127.0.0.1:41500 accepted tcp:52.74.223.119:443 [vmess-out] 
01-27 03:23:29.889 I/GoLog   (17978): [Info] [562937515] v2ray.com/core/app/dispatcher: sniffed domain: github.com
01-27 03:23:29.889 I/GoLog   (17978): [Info] [562937515] v2ray.com/core/app/dispatcher: taking detour [vmess-out] for [tcp:github.com:443]
01-27 03:23:29.889 I/GoLog   (17978): [Info] [562937515] v2ray.com/core/transport/internet/websocket: creating connection to tcp:198.41.221.31:443
01-27 03:23:29.916 I/GoLog   (17978): Not Using Prepared: tcp,198.41.208.162:443
01-27 03:23:29.916 I/GoLog   (17978): Not Using Prepared: tcp,198.41.221.31:443
01-27 03:23:29.956 I/GoLog   (17978): Using Prepared: 198.41.214.201
01-27 03:23:30.170 I/GoLog   (17978): [Info] [159290768] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:github.githubassets.com:443 via tcp:198.41.214.201:443
01-27 03:23:30.190 I/GoLog   (17978): [Info] [1058918030] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:github.com:443 via tcp:198.41.208.162:443
01-27 03:23:30.434 I/GoLog   (17978): [Info] [562937515] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:github.com:443 via tcp:198.41.221.31:443
01-27 03:23:32.209 I/GoLog   (17978): [Info] [658766719] v2ray.com/core/proxy/socks: client UDP connection from udp:127.0.0.1:41443
01-27 03:23:32.209 I/GoLog   (17978): [Debug] [658766719] v2ray.com/core/proxy/socks: send packet to udp:8.8.8.8:53 with 28 bytes
01-27 03:23:32.209 I/GoLog   (17978): [Debug] [658766719] v2ray.com/core/transport/internet/udp: dispatch request to: udp:8.8.8.8:53
01-27 03:23:32.209 I/GoLog   (17978): [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:8.8.8.8:53
01-27 03:23:32.209 I/GoLog   (17978): [Info] [658766719] v2ray.com/core/app/dispatcher: taking detour [vmess-out] for [udp:8.8.8.8:53]
01-27 03:23:32.209 I/GoLog   (17978): [Info] [658766719] v2ray.com/core/transport/internet/websocket: creating connection to tcp:198.41.214.201:443
01-27 03:23:32.209 I/GoLog   (17978): udp:127.0.0.1:41443 accepted udp:8.8.8.8:53 [vmess-out] 
01-27 03:23:32.252 I/GoLog   (17978): Using Prepared: 198.41.214.201
01-27 03:23:32.800 I/GoLog   (17978): [Info] [658766719] v2ray.com/core/proxy/vmess/outbound: tunneling request to udp:8.8.8.8:53 via tcp:198.41.214.201:443
01-27 03:23:33.016 I/GoLog   (17978): [Debug] [658766719] v2ray.com/core/proxy/socks: writing back UDP response with 44 bytes
01-27 03:23:35.325 D/com.v2ray.ang(17978): tun2socks destroy
01-27 03:23:35.325 D/tun2socks(18017): NOTICE(tun2socks): termination requested
01-27 03:23:35.325 D/tun2socks(18017): NOTICE(tun2socks): tearing down
01-27 03:23:35.325 D/tun2socks(18017): NOTICE(tun2socks): Free TCP connections
01-27 03:23:35.325 D/tun2socks(18017): NOTICE(tun2socks): exiting
01-27 03:23:35.326 I/GoLog   (17978): [Debug] v2ray.com/core/app/log: Logger closing

环境信息

SM-G9750 Android 10

额外信息(可选)

客户端配置文件

{
    "log": {
        "loglevel": "debug"
    },
    "dns": {
        "hosts": {
            "domain:googleapis.cn": "googleapis.com"
        },
        "servers": [
            "1.1.1.1",
            "119.29.29.29"
        ]
    },
    "routing": {
        "domainStrategy": "IPIfNonMatch",
        "rules": [
            {
                "type": "field",
                "domain": [
                    "geosite:geolocation-!cn",
                    "geosite:speedtest",
                    "domain:googleapis.cn"
                ],
                "outboundTag": "vmess-out"
            },
            {
                "type": "field",
                "ip": [
                    "1.1.1.1",
                    "8.8.8.8"
                ],
                "outboundTag": "vmess-out"
            },
            {
                "type": "field",
                "domain": [
                    "geosite:cn"
                ],
                "outboundTag": "direct"
            },
            {
                "type": "field",
                "ip": [
                    "0.0.0.0/8",
                    "10.0.0.0/8",
                    "100.64.0.0/10",
                    "127.0.0.0/8",
                    "169.254.0.0/16",
                    "172.16.0.0/12",
                    "192.0.0.0/24",
                    "192.0.2.0/24",
                    "192.168.0.0/16",
                    "198.18.0.0/15",
                    "198.51.100.0/24",
                    "203.0.113.0/24",
                    "::1/128",
                    "fc00::/7",
                    "fe80::/10",
                    "geoip:cn",
                    "119.29.29.29"
                ],
                "outboundTag": "direct"
            }
        ]
    },
    "policy": {
        "levels": {
            "1": {
                "uplinkOnly": 10,
                "bufferSize": 4096
            }
        }
    },
    "inbounds": [
        {
            "port": 10808,
            "listen": "127.0.0.1",
            "protocol": "socks",
            "settings": {
                "auth": "noauth",
                "udp": true,
                "userLevel": 1
            },
            "tag": "socks-in",
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls"
                ]
            }
        },
        {
            "listen": "127.0.0.1",
            "port": 10809,
            "protocol": "http",
            "settings": {
                "timeout": 0,
                "userLevel": 1
            },
            "tag": "http-in",
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls"
                ]
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "vmess",
            "settings": {
                "vnext": [
                    {
                        "address": "a.a.a.a",
                        "port": 443,
                        "users": [
                            {
                                "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                                "alterId": 4,
                                "security": "aes-128-gcm",
                                "level": 1
                            }
                        ]
                    },
                    {
                        "address": "b.b.b.b",
                        "port": 443,
                        "users": [
                            {
                                "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                                "alterId": 4,
                                "security": "aes-128-gcm",
                                "level": 1
                            }
                        ]
                    },
                    {
                        "address": "c.c.c.c",
                        "port": 443,
                        "users": [
                            {
                                "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                                "alterId": 4,
                                "security": "aes-128-gcm",
                                "level": 1
                            }
                        ]
                    }
                ]
            },
            "tag": "vmess-out",
            "streamSettings": {
                "network": "ws",
                "security": "tls",
                "tlssettings": {
                    "serverName": "classified.host.com",
                    "allowInsecure": false,
                    "allowInsecureCiphers": false
                },
                "wssettings": {
                    "connectionReuse": true,
                    "headers": {
                        "User-Agent": "user-agent",
                        "Host": "classified.host.com",
                        "Accept-Encoding": "none",
                        "Pragma": "no-cache"
                    },
                    "path": "/path"
                }
            },
            "mux": {
                "enabled": true,
                "concurrency": 8
            }
        },
        {
            "protocol": "freedom",
            "tag": "direct"
        }
    ],
    "transport": {
        "sockopt": {
            "tcpFastOpen": true
        }
    }
}
ghost commented 4 years ago

左转https://github.com/2dust/v2rayN/issues

Maincine commented 1 year ago

我解决了这个问题 可以把服务端的配置文件的dns 1.1.1.1修改下 修改成8.8.8.8 你可以试下