Comments (13)
Fri May 8 15:29:57 2020 daemon.err trojan[13821]: [2020-05-08 15:29:57] [INFO] 192.168.24.18:61804 requested connection to 2001:19f0:7001:3b6:5400:ff:fe5b:133b:443
Fri May 8 15:29:57 2020 daemon.err trojan[13821]: [2020-05-08 15:29:57] [INFO] 192.168.24.18:61804 disconnected, 2216 bytes received, 547 bytes sent, lasted for 0 seconds
Fri May 8 15:30:44 2020 daemon.err trojan[13821]: [2020-05-08 15:30:44] [INFO] 127.0.0.1:57444 requested connection to 2001:19f0:7001:03b6:5400:00ff:fe5b:133b:443
Fri May 8 15:31:45 2020 daemon.err trojan[13821]: [2020-05-08 15:31:45] [INFO] 127.0.0.1:57444 disconnected, 0 bytes received, 0 bytes sent, lasted for 61 seconds
上边是我用chrome访问的
下边是ipt2socks访问的
同一个目的地址
from ipt2socks.
日志日志。
from ipt2socks.
-v/--verbose 日志
from ipt2socks.
另外你的 ip6tables 规则发来看下
from ipt2socks.
ip6tables -t mangle -N REDSOCKS
ip6tables -t mangle -A REDSOCKS -p tcp -j TPROXY --on-ip ::1 --on-port 1234 --tproxy-mark 0x01/0x01
ip6tables -t mangle -A REDSOCKS -p udp -j TPROXY --on-ip ::1 --on-port 1234 --tproxy-mark 0x01/0x01
ip6tables -t mangle -N REDSOCKS_MARK
ip6tables -t mangle -A REDSOCKS_MARK -j MARK --set-mark 1
ip6tables -t mangle -A PREROUTING -m set --match-set gfwlist6 dst -j REDSOCKS
ip6tables -t mangle -A OUTPUT -m set --match-set gfwlist6 dst -j REDSOCKS_MARK
ip -6 rule add fwmark 1 lookup 100
ip -6 route add local default dev lo table 100
[tcp_socks5_recv_authresp_cb] recv from 127.0.0.1#1080, nrecv:2
2020-05-08 10:45:49 INF: [tcp_socks5_send_proxyreq_cb] send to 127.0.0.1#1080, nsend:22
2020-05-08 10:45:49 INF: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080, nrecv:10
2020-05-08 10:45:55 INF: [tcp_tproxy_accept_cb] source socket address: 2408:8207:18a5:25a0:d0e0:e5d9:e7d5:a4#53300
2020-05-08 10:45:55 INF: [tcp_tproxy_accept_cb] target socket address: 2001:4860:4860::8844#443
2020-05-08 10:45:55 INF: [tcp_tproxy_accept_cb] try to connect to 127.0.0.1#1080 ...
2020-05-08 10:45:55 INF: [tcp_socks5_connect_cb] connect to 127.0.0.1#1080 succeeded
2020-05-08 10:45:55 INF: [tcp_socks5_send_authreq_cb] send to 127.0.0.1#1080, nsend:3
2020-05-08 10:45:55 INF: [tcp_socks5_recv_authresp_cb] recv from 127.0.0.1#1080, nrecv:2
2020-05-08 10:45:55 INF: [tcp_socks5_send_proxyreq_cb] send to 127.0.0.1#1080, nsend:22
2020-05-08 10:45:55 INF: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080, nrecv:10
2020-05-08 10:45:56 ERR: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080: connection is closed
2020-05-08 10:45:58 INF: [udp_socks5_context_timeout_cb] context will be released, reason: timeout
2020-05-08 10:45:58 INF: [udp_socks5_context_timeout_cb] context will be released, reason: timeout
2020-05-08 10:45:58 ERR: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080: connection is closed
2020-05-08 10:45:58 INF: [tcp_tproxy_accept_cb] source socket address: 2408:8207:18a5:25a0:9d1b:bef9:a857:3811#60769
2020-05-08 10:45:58 INF: [tcp_tproxy_accept_cb] target socket address: 2404:6800:4004:80f::200e#443
2020-05-08 10:45:58 INF: [tcp_tproxy_accept_cb] try to connect to 127.0.0.1#1080 ...
2020-05-08 10:45:58 INF: [tcp_socks5_connect_cb] connect to 127.0.0.1#1080 succeeded
2020-05-08 10:45:58 INF: [tcp_socks5_send_authreq_cb] send to 127.0.0.1#1080, nsend:3
2020-05-08 10:45:58 INF: [tcp_socks5_recv_authresp_cb] recv from 127.0.0.1#1080, nrecv:2
2020-05-08 10:45:58 INF: [tcp_socks5_send_proxyreq_cb] send to 127.0.0.1#1080, nsend:22
2020-05-08 10:45:58 INF: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080, nrecv:10
2020-05-08 10:45:58 INF: [udp_socks5_context_timeout_cb] context will be released, reason: timeout
2020-05-08 10:45:58 INF: [udp_socks5_context_timeout_cb] context will be released, reason: timeout
2020-05-08 10:46:00 INF: [tcp_tproxy_accept_cb] source socket address: 192.168.24.16#53954
2020-05-08 10:46:00 INF: [tcp_tproxy_accept_cb] target socket address: 172.217.174.116#80
2020-05-08 10:46:00 INF: [tcp_tproxy_accept_cb] try to connect to 127.0.0.1#1080 ...
2020-05-08 10:46:00 INF: [tcp_socks5_connect_cb] connect to 127.0.0.1#1080 succeeded
2020-05-08 10:46:00 INF: [tcp_socks5_send_authreq_cb] send to 127.0.0.1#1080, nsend:3
2020-05-08 10:46:00 INF: [tcp_socks5_recv_authresp_cb] recv from 127.0.0.1#1080, nrecv:2
2020-05-08 10:46:00 INF: [tcp_socks5_send_proxyreq_cb] send to 127.0.0.1#1080, nsend:10
2020-05-08 10:46:00 INF: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080, nrecv:10
2020-05-08 10:46:00 INF: [tcp_socks5_recv_proxyresp_cb] tunnel is ready, start forwarding ...
2020-05-08 10:46:00 ERR: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080: connection is closed
2020-05-08 10:46:00 INF: [tcp_stream_payload_forward_cb] recv FIN from socks5 stream, release ctx
2020-05-08 10:46:00 INF: [tcp_tproxy_accept_cb] source socket address: 192.168.24.16#53959
2020-05-08 10:46:00 INF: [tcp_tproxy_accept_cb] target socket address: 172.217.174.116#80
2020-05-08 10:46:00 INF: [tcp_tproxy_accept_cb] try to connect to 127.0.0.1#1080 ...
2020-05-08 10:46:00 INF: [tcp_socks5_connect_cb] connect to 127.0.0.1#1080 succeeded
2020-05-08 10:46:00 INF: [tcp_socks5_send_authreq_cb] send to 127.0.0.1#1080, nsend:3
2020-05-08 10:46:00 INF: [tcp_socks5_recv_authresp_cb] recv from 127.0.0.1#1080, nrecv:2
2020-05-08 10:46:00 INF: [tcp_socks5_send_proxyreq_cb] send to 127.0.0.1#1080, nsend:10
2020-05-08 10:46:00 INF: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080, nrecv:10
2020-05-08 10:46:00 INF: [tcp_socks5_recv_proxyresp_cb] tunnel is ready, start forwarding ...
2020-05-08 10:46:00 ERR: [tcp_stream_payload_forward_cb] recv from client stream: (null)
2020-05-08 10:46:01 ERR: [tcp_stream_payload_forward_cb] recv from client stream: (null)
2020-05-08 10:46:01 INF: [tcp_tproxy_accept_cb] source socket address: 192.168.24.16#53963
2020-05-08 10:46:01 INF: [tcp_tproxy_accept_cb] target socket address: 172.217.174.116#80
2020-05-08 10:46:01 INF: [tcp_tproxy_accept_cb] try to connect to 127.0.0.1#1080 ...
2020-05-08 10:46:01 INF: [tcp_socks5_connect_cb] connect to 127.0.0.1#1080 succeeded
2020-05-08 10:46:01 INF: [tcp_socks5_send_authreq_cb] send to 127.0.0.1#1080, nsend:3
2020-05-08 10:46:01 INF: [tcp_socks5_recv_authresp_cb] recv from 127.0.0.1#1080, nrecv:2
2020-05-08 10:46:01 INF: [tcp_socks5_send_proxyreq_cb] send to 127.0.0.1#1080, nsend:10
2020-05-08 10:46:01 INF: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080, nrecv:10
2020-05-08 10:46:01 INF: [tcp_socks5_recv_proxyresp_cb] tunnel is ready, start forwarding ...
2020-05-08 10:46:01 ERR: [tcp_stream_payload_forward_cb] recv from client stream: (null)
^C
from ipt2socks.
看日志完全没啥问题啊,你看下上游socks5服务器的日志,是不是socks5服务器不支持v6转发。
from ipt2socks.
[tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080: connection is closed
这是上游 socks5 服务器关闭了连接,看下socks5的详细日志。
from ipt2socks.
2020-05-08 10:45:55 INF: [tcp_tproxy_accept_cb] source socket address: 2408:8207:18a5:25a0:d0e0:e5d9:e7d5:a4#53300
2020-05-08 10:45:55 INF: [tcp_tproxy_accept_cb] target socket address: 2001:4860:4860::8844#443
2020-05-08 10:45:55 INF: [tcp_tproxy_accept_cb] try to connect to 127.0.0.1#1080 ...
2020-05-08 10:45:55 INF: [tcp_socks5_connect_cb] connect to 127.0.0.1#1080 succeeded
2020-05-08 10:45:55 INF: [tcp_socks5_send_authreq_cb] send to 127.0.0.1#1080, nsend:3
2020-05-08 10:45:55 INF: [tcp_socks5_recv_authresp_cb] recv from 127.0.0.1#1080, nrecv:2
2020-05-08 10:45:55 INF: [tcp_socks5_send_proxyreq_cb] send to 127.0.0.1#1080, nsend:22
2020-05-08 10:45:55 INF: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080, nrecv:10
2020-05-08 10:45:56 ERR: [tcp_socks5_recv_proxyresp_cb] recv from 127.0.0.1#1080: connection is closed
从这个日志可以看出,recv_proxyresp_cb 里面,socks5 服务器应该返回总共 22 字节的 reponse,但是只收到了 10 字节,然后 socks5 服务器直接就关了连接。所以要查看 socks5 服务器是否不支持 ipv6.
ipv4代理请求(proxyreq)和代理响应(proxyresp)都是10字节。你可以从你给的日志中观察的到。
ipv6代理请求(proxyreq)和代理响应(proxyresp)都是22字节,但是你的socks5服务器只返回了10字节。
这显然是有问题的。
from ipt2socks.
作为对比,我使用chrome,指定sock5的代理,访问同一个ipv6地址就是可以的。
from ipt2socks.
都说了,给我日志。不过,隐约能感觉到问题在哪里了。晚上有时间改一下,看下是否是猜想的这样。
from ipt2socks.
作为对比,我使用chrome,指定sock5的代理,访问同一个ipv6地址就是可以的。
嗯,如果是这样的话,那确实是 ipt2socks 的问题,而且之前的版本也有这个问题。。
from ipt2socks.
ok,有时间我在解决。感谢提出.
from ipt2socks.
已更新,应该是没问题了。有时间你再试下。给我个反馈哈。
UPDATE: 再更新下,发现1.1.1版本的udp有个bug。1.1.2已修正。
from ipt2socks.
Related Issues (20)
- 是否能承受高负载转发 HOT 1
- How can I forward ipt2socks TPROXY port to a subnet? HOT 2
- 建议增加dns to socks5这里的功能 HOT 3
- linux
- 请各位大佬帮我看看为什么用ipt2socks转UDP出错,xray转就没问题 HOT 5
- '-b' 参数不起作用 HOT 4
- Can't forward UDP to a sub-net with tproxy HOT 4
- 编译环境有问题 HOT 8
- 可否加入代理链的支持? HOT 1
- 能否加入 socks4 协议支持? HOT 8
- [Question] How can I forward traffic across network namespaces with ipt2socks? HOT 3
- 在speedtest.net测试单线程峰值速度更高 HOT 28
- Is "really" transparent proxy? HOT 3
- ERROR: package/feeds/helloworld/ipt2socks failed to build. HOT 4
- nftables全局代理配置寻求帮助 HOT 16
- 为什么ipt2socks需要udp 443的端口监听呢? HOT 9
- 当socks服务开在本地服务器时,则会陷入socks循环请求(iptables规则死循环) HOT 3
- UDP报文经过代理后目标IP和端口都变成0 (上游socks5的udp实现不正确) HOT 14
- ERR: [udp_socks5_recv_tcpmessage_cb] recv unknown msg from socks5 server, release ctx HOT 16
- 使用TPROXY代理UDP时,上级的SOCKSIP只有为127.0.0.1时能够正常工作 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipt2socks.