Rewrite proxying to use a java.net.ProxySelector. This will ensure it happens correctly and automatically every time, which it doesn't at present, without any further code being required. Remove said code.
Log in to post a comment.