Skip to content
This repository has been archived by the owner on Jan 3, 2021. It is now read-only.

最近一两个月,最新版 V2ray, 使用火狐访问谷歌,一直遇到如下问题。 #56

Closed
zw963 opened this issue Oct 23, 2020 · 5 comments

Comments

@zw963
Copy link

zw963 commented Oct 23, 2020

image

image

image

短时间内,立即 Ctrl + R 重新刷新一定会好, 就是第一次不行, 很奇怪。

在升级到 4.26.0 之前无此问题,但个人不确定是因为最近 GFW 升级还是版本升级造成的,
但是同样地配置,从来没动过。

下面是我的配置:

服务端:

{
    "log": {
        "access": "/var/log/v2ray/access.log",
        "error": "/var/log/v2ray/error.log",
        "loglevel": "warning"
    },
    "dns": {
        "servers": [
            "https+local://dns.google/dns-query"
        ]
    },
    "inbounds": [
        {
            "protocol": "vmess",
            "port": 22334,
            "settings": {
                "clients": [
                    {
                        "id": "some_id",
                        "alterId": 4
                    }
                ]
            },
            "streamSettings": {
                "network": "quic",
                "quicSettings": {
                    "header": {
                        "type": "wechat-video"
                    }
                }
            }
        },
        {
            "protocol": "shadowsocks",
            "port": 22335, // 监听端口
            "settings": {
                "method": "chacha20-ietf-poly1305",
                "password": "some_password"
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "settings": {}
        },
        {
            "tag": "block",
            "protocol": "blackhole",
            "settings": {}
        }
    ],
    "routing": {
        "rules": [
            {
                "type": "field",
                "ip": [
                    "geoip:private"
                ],
                "outboundTag": "block"
            }
        ]
    },
    "policy": {
        "levels": {
            "0": {
                "bufferSize": 1024
            }
        }
    }
}

下面是路由器端,我使用透明代理

{
    // "log": {
    //     "loglevel": "info"
    // },
    "dns": {
        "hosts": {
            // "baidu.com": "127.0.0.1"
        },
        "servers": [
            {
                "address": "localhost",
                "port": 53,
                "domains": [
                    "geosite:cn"
                ],
                "expectIPs": [
                    "geoip:cn"
                ]
            },
            {
                "address": "https://dns.google/dns-query",
                "domains": [
                    "geosite:geolocation-!cn"
                ]
            }
        ]
    },
    "routing": {
        "domainStrategy": "IPIfNonMatch",
        "rules": [
            {
                "type": "field",
                "inboundTag": "dns-inbound",
                "outboundTag": "dns-outbound"
            },
            {
                "type": "field",
                "domain": [
                    "dns.google"
                ],
                "outboundTag": "proxy"
            },
            {
                "type": "field",
                "ip": [
                    "8.8.8.8/32",
                    "8.8.4.4/32",
                    "1.1.1.1/32",
                    "1.0.0.1/32"
                ],
                "outboundTag": "proxy"
            },
            {
                "type": "field",
                "domain": [
                    "geosite:category-ads"
                ],
                "outboundTag": "block"
            },
            {
                "type": "field",
                "domain": [
                    "geosite:cn"
                ],
                "outboundTag": "direct"
            },
            {
                "type": "field",
                "ip": [
                    "geoip:cn",
                    "geoip:private" // 似乎这个不需要?
                ],
                "outboundTag": "direct"
            },
            {
                "type": "field",
                "protocol":[
                    "bittorrent"
                ],
                "outboundTag": "direct"
            }
        ]
    },
    "inbounds": [
        {
            "protocol": "dokodemo-door",
            "port": 1081, // 监听端口
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls"
                ]
            },
            "settings": {
                "network": "tcp,udp",
                "followRedirect": true // 这里要为 true 才能接受来自 iptables 的流量
            }
        },
        {
            "protocol": "dokodemo-door",
            "port": 65053,
            "tag": "dns-inbound",
            "settings": {
                "address": "8.8.4.4",
                "port": 53,
                "network": "tcp,udp"
            }
        },
        {
            "protocol": "socks", // 入口协议为 SOCKS 5
            "port": 1080, // 监听端口
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls"
                ]
            },
            "settings": {
                "auth": "noauth"  //socks的认证设置,noauth 代表不认证,由于 socks 通常在客户端使用,所以这里不认证
            }
        },
        {
            "protocol": "http",
            "port": 3128,
            "settings": {
                "timeout": 0
            }
        }
    ],
    "outbounds": [
        {
            "tag": "proxy",
            "protocol": "vmess", // 出口协议
            "settings": {
                "vnext": [
                    {
                        "address": "server_ip", // 服务器地址,请修改为你自己的服务器 IP 或域名
                        "port": 22334,  // 服务器端口
                        "users": [
                            {
                                "id": "my_id",  // 用户 ID,必须与服务器端配置相同
                                "alterId": 4 // 此处的值也应当与服务器相同
                            }
                        ]
                    }
                ],
                "domainStrategy": "UseIP"
            },
            "streamSettings": {
                "network": "quic",  // 默认值是 tcp
                "quicSettings": {
                    "header": {
                        "type": "wechat-video"
                    }
                },
                "sockopt": {
                    "tproxy": "redirect",
                    "mark": 255
                }
            },
            "mux": {"enabled": true}
        },
        {
            "tag": "dns-outbound",
            "protocol": "dns",
            "settings": {
                "address": "8.8.4.4",
                "port": 53
            }
        },
        {
            "tag": "direct",
            "protocol": "freedom",
            "streamSettings": {
                "network": "tcp",  // 这是默认值
                "sockopt": {
                    "mark": 255
                }
            }
        },
        {
            "tag": "block",
            "protocol": "blackhole",
            "settings": {
                "response": {
                    "type": "http"
                }
            }
        }
    ],
    "policy": {
        "levels": {
            "0": {
                "bufferSize": 4
            }
        }
    }
}

谢谢!

@zw963
Copy link
Author

zw963 commented Oct 26, 2020

下面是当我得到上面 Google 400 页面时,在浏览器 client 端,抓取到的 debug 日志, 谢谢。

2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] [4224644714] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.50.2:47192
2020/10/26 06:20:22 [Info] [4224644714] v2ray.com/core/proxy/dokodemo: received request for 192.168.50.2:47192
2020/10/26 06:20:22 [Info] [4224644714] v2ray.com/core/app/dispatcher: default route for udp:172.217.161.132:443
2020/10/26 06:20:22 [Info] [4224644714] v2ray.com/core/common/mux: dispatching request to udp:172.217.161.132:443
2020/10/26 06:20:22 192.168.50.2:47192 accepted udp:172.217.161.132:443 [proxy] 
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:22 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:24 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.24.78:443
2020/10/26 06:20:24 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.24.78:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.24.78:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.24.78:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:64.233.189.154:443
2020/10/26 06:20:35 [Debug] [2240281899] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.50.2:45652
2020/10/26 06:20:35 [Info] [2240281899] v2ray.com/core/proxy/dokodemo: received request for 192.168.50.2:45652
2020/10/26 06:20:35 [Info] [2240281899] v2ray.com/core/app/dispatcher: default route for udp:64.233.189.154:443
2020/10/26 06:20:35 [Info] [2240281899] v2ray.com/core/common/mux: dispatching request to udp:64.233.189.154:443
2020/10/26 06:20:35 192.168.50.2:45652 accepted udp:64.233.189.154:443 [proxy] 
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:64.233.189.154:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:64.233.189.154:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:64.233.189.154:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:35 [Debug] [3145826259] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.50.2:51663
2020/10/26 06:20:35 [Info] [3145826259] v2ray.com/core/proxy/dokodemo: received request for 192.168.50.2:51663
2020/10/26 06:20:35 [Info] [3145826259] v2ray.com/core/app/dispatcher: default route for udp:172.217.161.132:443
2020/10/26 06:20:35 [Info] [3145826259] v2ray.com/core/common/mux: dispatching request to udp:172.217.161.132:443
2020/10/26 06:20:35 192.168.50.2:51663 accepted udp:172.217.161.132:443 [proxy] 
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.31.227:443
2020/10/26 06:20:35 192.168.50.2:52623 accepted udp:172.217.31.227:443 [proxy] 
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.31.227:443
2020/10/26 06:20:35 [Debug] [1222504673] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.50.2:52623
2020/10/26 06:20:35 [Info] [1222504673] v2ray.com/core/proxy/dokodemo: received request for 192.168.50.2:52623
2020/10/26 06:20:35 [Info] [1222504673] v2ray.com/core/app/dispatcher: default route for udp:172.217.31.227:443
2020/10/26 06:20:35 [Info] [1222504673] v2ray.com/core/common/mux: dispatching request to udp:172.217.31.227:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.31.227:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.31.227:443
2020/10/26 06:20:35 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:172.217.161.132:443
2020/10/26 06:20:38 [Debug] [1866682317] v2ray.com/core/proxy/dokodemo: processing connection from: 127.0.0.1:36623
2020/10/26 06:20:38 [Info] [1866682317] v2ray.com/core/proxy/dokodemo: received request for 127.0.0.1:36623
2020/10/26 06:20:38 [Info] [1866682317] v2ray.com/core/app/dispatcher: taking detour [dns-outbound] for [udp:8.8.4.4:53]
2020/10/26 06:20:38 [Info] [1866682317] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.4.4:53
2020/10/26 06:20:38 127.0.0.1:36623 accepted udp:8.8.4.4:53 [dns-outbound] 
2020/10/26 06:20:38 [Debug] v2ray.com/core/app/dns: domain alt8-mtalk.google.com matches following rules: [geosite:geolocation-!cn(DNS idx:1)]
2020/10/26 06:20:38 [Debug] v2ray.com/core/app/dns: domain alt8-mtalk.google.com uses following DNS first: [DOH//dns.google]
2020/10/26 06:20:38 [Info] v2ray.com/core/app/dns: DOH//dns.google querying: alt8-mtalk.google.com.
2020/10/26 06:20:38 [Info] v2ray.com/core/app/dns: DOH//dns.google got answer: alt8-mtalk.google.com. TypeA -> [142.250.111.188] 123.97827ms

@zw963
Copy link
Author

zw963 commented Nov 2, 2020

可能是我浏览器问题。

@zw963 zw963 closed this as completed Nov 2, 2020
@zw963
Copy link
Author

zw963 commented Dec 23, 2020

嘿,我已经确认,的确与浏览器有关,当我在 Firefox 浏览器下(无论 nightly, 还是 stable), 尝试打开 http3, about:config => network.http.http3.enabled Set: true, 就会频繁出现这个问题。

所以,这个是不是一个值得修复的问题呢?

@ghost
Copy link

ghost commented Dec 23, 2020

嘿,我已经确认,的确与浏览器有关,当我在 Firefox 浏览器下(无论 nightly, 还是 stable), 尝试打开 http3, about:config => network.http.http3.enabled Set: true, 就会频繁出现这个问题。

所以,这个是不是一个值得修复的问题呢?

在firefox里打开这个选项相当于强制让所有网站尽量使用http3连接了。如果对应网站仅支持quic但是不支持http3的话,那肯定是400啊。不是v2ray这个软件的问题,和软件无关。
现在你知道为什么这么长时间没有人回复你的问题了吗。

@ghost
Copy link

ghost commented Dec 23, 2020

这个跟v2ray没有关系,v2ray只是在这件事中充当了一个按原样转发内容的代理的用途。数据包在出口(也就是服务器)原来是什么样,还是什么样。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant