Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fully support UDP #20

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

fully support UDP #20

wants to merge 4 commits into from

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.

None yet

2 participants