v2ray
v2ray copied to clipboard
国内访问正常,国外无法访问
以下是我的配置和日志 我只更改了outbound部分 如果用v2rayng访问是正常的 "outbounds": [{ "protocol": "vmess", "settings": { "vnext": [ { "address": "自己的ip", "port": 17845, "users": [ { "id": “自己的uid", "alterId": 64 } ] } ] }, "streamSettings": { "network": "mkcp", "kcpSettings": { "uplinkCapacity": 5, "downlinkCapacity": 100, "congestion": true, "header": { "type": "none" } } }, "tag": "proxy" },
以下是service.log V2Ray 4.18.0 (Po) 20190228 A unified platform for anti-censorship. Configuration OK. [Info]: Starting v2ray service. [Info]: v2ray service is running. ( PID: 9608 ) [Info]: Clean nat proxy iptables rules. [Info]: Create proxy iptables chains. [Info]: Proxy all APP's TCP network. [Info]: Proxy softap0 WiFi guest's TCP network. [Info]: Block illegal visit.
以下是debug
- iptables -w 100 -t nat -N V2RAY
- iptables -w 100 -t nat -A V2RAY -d 0.0.0.0/8 -j RETURN
- iptables -w 100 -t nat -A V2RAY -d 10.0.0.0/8 -j RETURN
- iptables -w 100 -t nat -A V2RAY -d 127.0.0.0/8 -j RETURN
- iptables -w 100 -t nat -A V2RAY -d 169.254.0.0/16 -j RETURN
- iptables -w 100 -t nat -A V2RAY -d 172.16.0.0/12 -j RETURN
- iptables -w 100 -t nat -A V2RAY -d 192.168.0.0/16 -j RETURN
- iptables -w 100 -t nat -A V2RAY -d 224.0.0.0/4 -j RETURN
- iptables -w 100 -t nat -A V2RAY -d 240.0.0.0/4 -j RETURN
- iptables -w 100 -t nat -A V2RAY -p tcp -j REDIRECT --to-ports 65535
- true
- proxy_app_tcp_iptables
- iptables -w 100 -t nat -N APP_TCP_PROXY
- iptables -w 100 -t nat -A APP_TCP_PROXY -m owner --uid-owner 3003 -j RETURN
- '[' pick '=' pick ']'
- '[' 0 '=' 0 ']'
- echo '[Info]: Proxy all APP'''s TCP network.' [Info]: Proxy all APP's TCP network.
- iptables -w 100 -t nat -A APP_TCP_PROXY -m owner ! --uid-owner 3003 -j V2RAY
- iptables -w 100 -t nat -A OUTPUT -p tcp -j APP_TCP_PROXY
- true
- proxy_guest_tcp_iptables
- iptables -w 100 -t nat -N GUEST_TCP_PROXY
- echo '[Info]: Proxy softap0 WiFi guest'''s TCP network.' [Info]: Proxy softap0 WiFi guest's TCP network.
- iptables -w 100 -t nat -A GUEST_TCP_PROXY -i softap0 -j V2RAY
- iptables -w 100 -t nat -A PREROUTING -p tcp -j GUEST_TCP_PROXY
- filter_proxy_iptables
- true
- echo '[Info]: Block illegal visit.' [Info]: Block illegal visit.
- iptables -w 100 -t filter -N PROTECT_V2RAY
- iptables -w 100 -t filter -A PROTECT_V2RAY -i lo -j RETURN
- iptables -w 100 -t filter -A PROTECT_V2RAY -i softap0 -j RETURN
- iptables -w 100 -t filter -A PROTECT_V2RAY -p tcp --dport 65535 -j DROP
- iptables -w 100 -t filter -A PROTECT_V2RAY -p udp --dport 65535 -j DROP
- iptables -w 100 -t filter -A INPUT -j PROTECT_V2RAY
同样的问题 我观察到日志中有 2019/05/22 00:51:08 [Info] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled 2019/05/22 00:51:08 [Info] v2ray.com/core/transport/internet/udp: failed to handle UDP input > io: read/write on closed pipe 日志时间较系统时间慢8h 服务端日志 2019/05/21 20:50:29 [Info] [4273901811] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: connection ends > io: read/write on closed pipe 2019/05/21 20:50:29 [Info] [4273901811] v2ray.com/core/app/proxyman/inbound: failed to close connection > v2ray.com/core/transport/internet/kcp: Connection closed. 2019/05/21 20:50:29 [Info] [4181378400] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled 2019/05/21 20:50:29 [Info] [4181378400] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: connection ends > io: read/write on closed pipe 2019/05/21 20:50:29 [Info] [4181378400] v2ray.com/core/app/proxyman/inbound: failed to close connection > v2ray.com/core/transport/internet/kcp: Connection closed. 2019/05/21 20:50:29 [Info] [1059110459] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled 2019/05/21 20:50:29 [Info] [1059110459] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: connection ends > io: read/write on closed pipe 2019/05/21 20:50:29 [Info] [1059110459] v2ray.com/core/app/proxyman/inbound: failed to close connection > v2ray.com/core/transport/internet/kcp: Connection closed. 是否是因为系统时间问题导致v2ray close the pipe?
@sjz123321 我的log也是GMT时间,不是这个问题。看这个log,你这是频繁的连接断开啊。
我做代理的iptables规则的时候,只考虑了outbound用tcp连接的情况,kcp用的是udp连接,可能跟这个有关,有空我再想办法看看
我做代理的iptables规则的时候,只考虑了outbound用tcp连接的情况,kcp用的是udp连接,可能跟这个有关,有空我再想办法看看
我感觉你记错了。你的iptables做透明代理,只代理了tcp没代理udp。outbound根本就没用iptables做限制啊。
经过我这里测试,使用mKCP+动态端口成功。
我做代理的iptables规则的时候,只考虑了outbound用tcp连接的情况,kcp用的是udp连接,可能跟这个有关,有空我再想办法看看
我感觉你记错了。你的iptables做透明代理,只代理了tcp没代理udp。outbound根本就没用iptables做限制啊。
经过我这里测试,使用mKCP+动态端口成功。
是的,透明代理只代理了tcp协议,udp协议的代理搞不出来。
我做代理的iptables规则的时候,只考虑了outbound用tcp连接的情况,kcp用的是udp连接,可能跟这个有关,有空我再想办法看看
我感觉你记错了。你的iptables做透明代理,只代理了tcp没代理udp。outbound根本就没用iptables做限制啊。 经过我这里测试,使用mKCP+动态端口成功。
是的,透明代理只代理了tcp协议,udp协议的代理搞不出来。
我改了改试了一下,不知道为什么老说failed to handle UDP input。大概是我没写对吧。
请问如何绕过中国大陆的地址呢,就是用PAC模式来连接
@RezaFeng v2ray自带了这个功能。具体请参考 v2ray.com 提供的说明。