-
Notifications
You must be signed in to change notification settings - Fork 607
How does the tun2socks support iOS? #90
Comments
It's not supported in this project. It can probably be coded by utilizing the iOS VPN API. I can't offer any help with Apple support. |
OK, thank you, I'll try to build the tun2socks into an iOS app. |
Hello @ambrop72 , I have a question, what's the difference between SocksUdpGwClient.c and udpGw? On client side, do I need to compile the udgGw folder? Why not forward UDP directly to a socks5 server which supports UDP also? It doesn't need a udpGw running on server side then. I found the shadowsocks project is using badvpn tun2socks module to forward tcp/udp packets to shadowsocks server directly, no need of updGw. https://github.com/shadowsocks/tun2socks-iOS/tree/experiment/tun2socks |
Not all SOCKS servers support UDP and SOCKS UDP performance is often subpar. The existing solution is to do it through a custom TCP protocol with a helper program on the remote side (udpgw). SocksUdpGwClient is the code in tun2socks which implements the client side of this protocol, and udpgw is the remote program which proxies between tun2socks and actual UDP. SOCKS UDP support was implemented in pull request #71 which I plan to merge soon after I fix of its some limitations. |
I find the code in #71 , it's not good idea to use the UDP_ASSOCIATE command to remote, it's better to send UDP packet direct to the local UDP socks server, like shadowsocks.
|
@yzou shadowsocks-libev implements SOCKS5-UDP in a simplified way that allows the behavior you describe. However, SOCKS5 servers in general are not required to offer a fixed UDP server on a known port. For tun2socks to be compatible with SOCKS5 servers other than shadowsocks-libev, it needs to use UDP_ASSOCIATE. |
@yzou Did you manage to support tun2socks in IOS ? |
I'm trying to make it more stable on iOS. |
@yzou Sounds cool. Tun2Socks required fileDescriptor. How did you fetch it from VPN (I belive NEPacketTunnelProvider) ? |
Hello,
I need tun2socks feature on iOS, how to build it for iOS app?
Did someone builds it for iOS before?
The text was updated successfully, but these errors were encountered: