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

Respect TTL of a DNS record for proxy config. #5843

Open
minwoox opened this issue Jul 29, 2024 · 1 comment · May be fixed by #5960
Open

Respect TTL of a DNS record for proxy config. #5843

minwoox opened this issue Jul 29, 2024 · 1 comment · May be fixed by #5960
Labels

Comments

@minwoox
Copy link
Member

minwoox commented Jul 29, 2024

The methods in ProxyConfig take an InetSocketAddress as an argument. e.g. ProxyConfig.connect(InetSocketAddress)
InetSocketAddress resolves the address only once when it's created so it doesn't respect TTL of a DNS record, thus the client will keep sending the request to the old proxy.
We can probably take an Endpoint instead of InetSocketAddress and reimplement it to respect the TTL in the client.

@chickenchickenlove
Copy link
Contributor

chickenchickenlove commented Oct 27, 2024

@minwoox -nim,
I open a new PR.
When you have time, could you please take a look? 🙇‍♂️

My idea is very simple.
Whenever client try to send a request via proxy,
They get proxyConfig from ProxyConfigSelector.

Thus, If scheduler update InetSocketAddress instance periodically,
Client can get refreshed InetSocketAddress if it wants.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants