armeria icon indicating copy to clipboard operation
armeria copied to clipboard

Consider making `ProxySelector.getDefault()` the default `ProxyConfig`

Open jrhee17 opened this issue 2 years ago • 2 comments

Because this is already the default when JDK's proxy is used. By using ProxySelector.getDefault() by default, we can reduce user confusion.

One thing to note is DefaultProxySelector#select has some privileged/synchronized calls even for non-proxy calls, so we may need to consider whether there will be a performance hit.

jrhee17 avatar Oct 19 '23 08:10 jrhee17

Today I was trying to debug some outgoing calls by settings http.proxyHost and HTTP_HOST variables. I realized Armeria's clients doesn't comply by default. I think it would be a nice addition to support it by default so it makes devs lives easier.

I feel like performance hit can be omitted if there is no proxy configuration? If there is a proxy config, I expect users would have already updated their client settings.

Dogacel avatar Feb 20 '25 15:02 Dogacel

It's been a while since I created this issue - looking at this issue again, I agree it's probably reasonable to make this the default behavior 👍

jrhee17 avatar Feb 21 '25 02:02 jrhee17