• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

How to remove proxy settings?

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used this code to set my server to access urls via a proxy server:

System.setProperty("http.proxyHost", "127.0.0.1");
System.setProperty("http.proxyPort", "8010");

How do I make the application lose the proxy settings so it just connects directly?

I've tried...
System.setProperty("http.proxyHost", "");
System.setProperty("http.proxyPort", "");

And...
Properties systemSettings = System.getProperties();
systemSettings.put("proxySet", "false");
systemSettings.remove("http.proxyHost");
systemSettings.remove("http.proxyPort");
Authenticator.setDefault(null);

...but the application still tries to use the proxy. Can anyone advise?

Thanks,
James
 
Looky! I'm being abducted by space aliens! Me and this tiny ad!
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic