v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.3k stars 8.94k forks source link

无法用公司无线wifi使用v2ray,其他方式(如联通4G等)可以使用 #1976

Closed kknd12 closed 4 years ago

kknd12 commented 4 years ago

提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。 除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。 如果你遇到的问题不是 V2Ray 的 bug,比如你不清楚要如何配置,请使用Discussion进行讨论。

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) server 4.21.1 client 4.7.3 2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 使用chrome通过vmess上google.com。 通过公司的wifi(上海移动宽带)就不行,偶尔能上一次,很快不行了。 但使用其他方式连入internet(如联通4G,联通宽带,移动4G)可以一直使用,无问题。 3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) 客户端有这样的报错: v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe 4) 你期待看到的正确表现是怎样的? 正常上google.com 5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

{ "outbound": { "streamSettings": null, "tag": null, "protocol": "freedom", "mux": null, "settings": null }, "log": { "access": "/var/log/v2ray/access.log", "loglevel": "info", "error": "/var/log/v2ray/error.log" }, "outboundDetour": [ { "tag": "direct", "protocol": "freedom", "settings": null }, { "tag": "blocked", "protocol": "blackhole", "settings": null } ], "inbound": { "streamSettings": { "network": "mkcp", "kcpSettings": { "uplinkCapacity": 5, "downlinkCapacity": 100, "congestion": true, "header": { "type": "none" } } }, "settings": { "ip": null, "udp": true, "clients": [ { "alterId": xxx, "security": "aes-128-gcm", "id": "xxxxxxxxxxxxxxxxxx" } ], "detour": { "to": "dynamicPort" }, "auth": null }, "protocol": "vmess", "port": xxxx, "listen": null }, "inboundDetour": [ { "port": "10000-20000", "tag": "dynamicPort", "protocol": "vmess", "allocate": { "refresh": 5, "concurrency": 2, "strategy": "random" }, "settings": { "default": { "alterId": xx, "level": 1 } } } ], "routing": { "settings": { "rules": [ { "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" ], "domain": null, "type": "field", "port": null, "outboundTag": "blocked" }, { "domain": [ "fr.a2dfp.net", "m.fr.a2dfp.net", ...... "c1.zxxds.net", "rt.udmserve.net", "www.stickylogic.com", "www.winaproduct.com" ], "type": "field", "outboundTag": "direct" } ], "domainStrategy": null }, "strategy": "rules" }, "dns": null }

客户端配置:

{ "outbound": { "streamSettings": { "network": "mkcp", "kcpSettings": { "uplinkCapacity": 5, "downlinkCapacity": 100, "congestion": true, "header": { "type": "none" } } }, "tag": "agentout", "protocol": "vmess", "mux": null, "settings": { "vnext": [ { "users": [ { "alterId": xxx, "security": "aes-128-gcm", "id": "xxxxxxxxxx" } ], "port": xxxx, "address": "xxxxxxxxxxxxx" } ] } }, "log": { "access": "", "loglevel": "info", "error": "" }, "outboundDetour": [ { "tag": "direct", "protocol": "freedom", "settings": { "response": null } }, { "tag": "blockout", "protocol": "blackhole", "settings": { "response": { "type": "http" } } } ], "inbound": { "streamSettings": null, "settings": { "ip": "127.0.0.1", "udp": true, "clients": null, "auth": "noauth" }, "protocol": "socks", "port": 1080, "listen": "0.0.0.0" }, "inboundDetour": null, "routing": { "settings": { "rules": [ { "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" ], "domain": null, "type": "field", "port": null, "outboundTag": "direct" }, { "type": "chinaip", "outboundTag": "direct" }, { "type": "chinasites", "outboundTag": "direct" } ], "domainStrategy": "IPIfNonMatch" }, "strategy": "rules" }, "dns": null } }

6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

2019/10/28 12:08:51 [Info] [3360134489] v2ray.com/core/proxy/vmess/inbound: received request for tcp:www.instagram.com:443 2019/10/28 12:08:51 [Info] [3360134489] v2ray.com/core/app/dispatcher: default route for tcp:www.instagram.com:443 2019/10/28 12:08:51 [Info] [3360134489] v2ray.com/core/proxy/freedom: opening connection to tcp:www.instagram.com:443 2019/10/28 12:08:51 [Info] [3360134489] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:www.instagram.com:443 2019/10/28 12:08:53 [Info] v2ray.com/core/transport/internet/kcp: #7944 terminating connection to 120.253.140.10:61613 2019/10/28 12:09:22 [Info] v2ray.com/core/transport/internet/kcp: #7946 closing connection to 120.253.140.10:61532 2019/10/28 12:09:23 [Info] [3360134489] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: connection ends > context canceled 2019/10/28 12:09:23 [Info] [3360134489] v2ray.com/core/app/proxyman/inbound: failed to close connection > v2ray.com/core/transport/internet/kcp: Connection closed. 2019/10/28 12:09:23 [Info] [3360134489] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled

客户端错误日志:

2019/10/28 20:08:20 [Info] [3773133715] v2ray.com/core/proxy/socks: TCP Connect request to tcp:www.instagram.com:443 2019/10/28 20:08:20 [Info] v2ray.com/core/app/router: looking for IP for domain: www.instagram.com 2019/10/28 20:08:20 tcp:127.0.0.1:57471 accepted tcp:www.instagram.com:443 2019/10/28 20:08:20 [Info] [3773133715] v2ray.com/core/app/dispatcher: default route for tcp:www.instagram.com:443 2019/10/28 20:08:20 [Info] v2ray.com/core/transport/internet/kcp: dialing mKCP to udp:149.248.38.72:11436 2019/10/28 20:08:20 [Info] v2ray.com/core/transport/internet/kcp: #7945 creating connection to 149.248.38.72:11436 2019/10/28 20:08:20 [Info] [3773133715] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:www.instagram.com:443 via tcp:149.248.38.72:11436 2019/10/28 20:08:27 [Info] v2ray.com/core/transport/internet/kcp: #7943 terminating connection to 149.248.38.72:19960 2019/10/28 20:08:30 [Info] v2ray.com/core/transport/internet/kcp: #7944 closing connection to 149.248.38.72:7783 2019/10/28 20:08:30 [Info] [1322779193] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > context canceled 2019/10/28 20:08:30 [Info] [1322779193] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > context canceled 2019/10/28 20:08:38 [Info] v2ray.com/core/transport/internet/kcp: #7944 terminating connection to 149.248.38.72:7783 2019/10/28 20:08:50 [Info] v2ray.com/core/transport/internet/kcp: #7945 closing connection to 149.248.38.72:11436 2019/10/28 20:08:50 [Info] v2ray.com/core/transport/internet/kcp: #7945 closing connection to 149.248.38.72:11436 2019/10/28 20:08:50 [Info] [3773133715] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: failed to read response header > EOF 2019/10/28 20:08:50 [Info] [3773133715] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe

7) 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。

2019/10/28 12:06:51 120.253.140.10:62490 accepted tcp:www.google.com:443 2019/10/28 12:08:18 120.253.140.10:61613 accepted tcp:www.google.com:443 2019/10/28 12:08:51 120.253.140.10:61532 accepted tcp:www.instagram.com:443

8) 其它相关的配置文件(如 Nginx)和相关日志。

9) 如果 V2Ray 无法启动,请附上 --test 输出。

通常的命令为 /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json。请按实际情况修改。

10) 如果 V2Ray 服务运行不正常,请附上 journal 日志。

通常的命令为 journalctl -u v2ray

请预览一下你填的内容再提交。

kslr commented 4 years ago

请不要使用移动宽带或者使用vmess

kknd12 commented 4 years ago

从error.log记录的时间看上去我在chrome提交地址的时刻,服务器端没有相应,过了1、2分钟后,服务器端才有反应,这时候客户端已经关闭连接了。 而正常的时候,服务器端很快就有相应了,比如下面的: client: 2019/10/28 20:17:02 tcp:127.0.0.1:57554 accepted tcp:scontent-sea1-1.cdninstagram.com:443 2019/10/28 20:17:02 [Info] [1326564384] v2ray.com/core/app/dispatcher: default route for tcp:scontent-sea1-1.cdninstagram.com:443 2019/10/28 20:17:02 [Info] v2ray.com/core/transport/internet/kcp: dialing mKCP to udp:149.248.38.72:10911 2019/10/28 20:17:02 [Info] v2ray.com/core/transport/internet/kcp: #4459 creating connection to 149.248.38.72:10911 2019/10/28 20:17:02 [Info] [1326564384] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:scontent-sea1-1.cdninstagram.com:443 via tcp:149.248.38.72:10911 2019/10/28 20:17:03 [Info] v2ray.com/core/transport/internet/kcp: #4459 closing connection to 149.248.38.72:10911 2019/10/28 20:17:03 [Info] [1326564384] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > context canceled 2019/10/28 20:17:03 [Info] [1326564384] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > context canceled

server: 2019/10/28 12:17:00 [Info] [2517351297] v2ray.com/core/proxy/vmess/inbound: received request for tcp:www.instagram.com:443 2019/10/28 12:17:00 [Info] [2517351297] v2ray.com/core/app/dispatcher: default route for tcp:www.instagram.com:443 2019/10/28 12:17:00 [Info] [2517351297] v2ray.com/core/proxy/freedom: opening connection to tcp:www.instagram.com:443 2019/10/28 12:17:00 [Info] [2517351297] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:www.instagram.com:443 2019/10/28 12:17:02 [Info] v2ray.com/core/transport/internet/kcp: #4458 creating connection to 120.253.140.10:55685 2019/10/28 12:17:02 [Info] [2770948578] v2ray.com/core/proxy/vmess/inbound: received request for tcp:scontent-sea1-1.cdninstagram.com:443 2019/10/28 12:17:02 [Info] [2770948578] v2ray.com/core/app/dispatcher: default route for tcp:scontent-sea1-1.cdninstagram.com:443 2019/10/28 12:17:02 [Info] [2770948578] v2ray.com/core/proxy/freedom: opening connection to tcp:scontent-sea1-1.cdninstagram.com:443 2019/10/28 12:17:02 [Info] [2770948578] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:scontent-sea1-1.cdninstagram.com:443