Skip to content

Conversation

@Xmader
Copy link

@Xmader Xmader commented Oct 14, 2019

merge code from Outline

@iMrDJAi
Copy link

iMrDJAi commented Apr 1, 2021

Is that for UDP associate? actually it won't work.
I been testing it, the UDP associate will only work if you disable the UDP relay and the transparent DNS (See this comment by @bemasc ambrop72/badvpn#71 (comment)):

socksServerAddress, // The UDP relay has the same address and port as the SOCKS server.

Just like that:

    startTun2Socks(
        tunFd,
        VPN_INTERFACE_MTU,
        mPrivateAddress.mRouter,
        VPN_INTERFACE_NETMASK,
        VPN_IPV6_NULL,
        socksServerAddress,
-       socksServerAddress,  // The UDP relay has the same address and port as the SOCKS server.
+       null,
        String.format("%s:%d", DNS_RESOLVER_IP, DNS_RESOLVER_PORT),
-       true /* transparent DNS */,
+       false,
        true /* socks5 UDP Enabled */);

@iMrDJAi
Copy link

iMrDJAi commented Jun 9, 2021

I have published a working version that supports SOCKS v5 UDP associate based on your implementation:
https://github.com/iMrDJAi/cordova-plugin-tun2socks-udp-associate

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants