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

[fix]When using a proxy with WebSocket, the DNS resolution should be performed within the proxy server. #4974

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lvxiao1
Copy link
Contributor

@lvxiao1 lvxiao1 commented Dec 3, 2024

Some exchanges use DNS and CDN technologies. If the domain name is resolved locally, it will return the IP address of the nearest server to the exchange from the local network. In this case, the SOCKS client will pass this IP to the proxy server, and the proxy server will attempt to connect using this IP, leading to a timeout. The best approach is to have the proxy server handle the DNS resolution.

Here is an analysis of part of the Netty source code:

  1. Bootstrap.java
    image
    image
    2.Socks5ProxyHandler.java
    image

@lvxiao1
Copy link
Contributor Author

lvxiao1 commented Dec 3, 2024

@timmolter please check

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.

1 participant