I encode my server in java, and in a day my server should connect through 5 different proxies simultaneously to other servers and collect data. However, after reading about java proxy settings using stackexchange, I see that when you install the proxy server, its effect is VM-wide, which means any network activity that .jar does, it will do it through the proxy server if somewhere else a thread sets proxy settings in the bank.
I am currently using this proxy setup method, which, according to some tests, is actually very functional and fast.
System.getProperties().put( "http.proxyHost", host );
System.getProperties().put( "http.proxyPort", port );
However, I can’t afford to have 5 jars that do the same with different proxies, I tried this, it would be a simple solution, but I can not afford to use this drum just for this, since my server is huge.
source
share