• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

How to get Proxy Setting Information ?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Can anyone please tell that how can I get the Proxy Setting information using java ?

After java 1.5 there is one class called ProxySelector. It's select method returns the all the applicable proxies. But along with that I wanted to have "do not use proxy server for addresses beginning with" tab data as well which we configure in the Advanced Proxy Setting of IE.

Thanks in advance...

Regards,
Hetal
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you want to do with getting these setting?
Where do you want to execute this code. If you are executing on the server then what will you do knowing what a client has set as proxy url to use and all the rules on the browser?
 
Hetal Shah
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using a HTTPClient object for the desktop application with different method objects (get,post,multipartpost) for each call.

And also get the proxy information to pass to it using ProxySeltor class and set the proxy for all requests.

Now, I want to set "Do not use Proxy Server..." tab information while connecting to the server as well.

Like for example if the user has entered the wrong proxy information and at the same time if he has specified the bypass the proxy to connect to my application server then it should work.

But how I can get that information ?

Waiting for reply...

Thanks & Regards,
Hetal
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you get some connection information from the desktop client and additionally you want to use any rules he has put in his browser?
I dont know a way to do that, possibly iexplorer or other browser provide some api to get that. I am doubtful though because you have not at all started a browser instance and you want some settings from it. Additionally, how will you handle if the user has mozilla installed instead?

From the usability perspective:
This idea seems very non-intutive to me. If a user has wrongly specified something in his browser and he runs your application, he will have no idea of why you did not use the proxy for a url.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic