hmgle / graftcp

A flexible tool for redirecting a given program's TCP traffic to SOCKS5 or HTTP proxy.
GNU General Public License v3.0
2.1k stars 173 forks source link

IPv6 redirect Support? #10

Closed azure9 closed 3 years ago

azure9 commented 5 years ago

Do you have plan support ipv6 proxy?

hmgle commented 5 years ago

It does support IPv6. This line: https://github.com/hmgle/graftcp/blob/db56ea4a31359d8b9adcd57b24f1feadb5ed6a83/graftcp-local/local.go#L178

will call net.Dial that support IPv6.

But if your local network or ISP does not support IPv6, the remote IPv6 proxy is unable to be reached.

azure9 commented 5 years ago

Seems the graftcp part not hijack ipv6 flow, e.g. you can setup a shadowsocks server using shadowsocks-libev, and the flow won't be redirect by graftcp while at same time IPv4 works fine.

hmgle commented 5 years ago

Oh, I see. This line https://github.com/hmgle/graftcp/blob/db56ea4a31359d8b9adcd57b24f1feadb5ed6a83/graftcp.h#L40 s_addr is IPv4 only. Thank you for your feedback.

hmgle commented 5 years ago

IPv4/IPv6 dual-stack feature is under development on the ipv6 branch.