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

When using udp connection, some VPS servers can fail due to IP conversion. #14

Closed
grasstractor opened this issue Feb 20, 2023 · 1 comment

Comments

@grasstractor
Copy link

I know that UDP connections should use the DST.ADDR and DST.PORT returned by the server to establish a new UDP connection to send data, but building a socks5 server using the servers of some cloud server providers creates a problem:
The VPS provided by these cloud servers use an internal IP(like 10.0.2.*) and an external IP, and they are bound together through the firewall of the cloud provider. In the VPS, only the internal IP can be accessed, so when building the socks5 server, it cannot listen to the external IP and can only return the internal IP to the client. The client then cannot establish a connection properly. This problem does not exist when using TCP.
So I think the best solution to this problem is to set a parameter on the server side to allow custom return of UDP address.

@txthinking
Copy link
Owner

NewClassicServer(internal IP and port, external IP, username, password, tcpTimeout, udpTimeout)

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

No branches or pull requests

2 participants