[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

Getting the proxy Auto-config details from VC++ application

Hi,
  We have a VC++ application which runs on a client machine and we need to know the Proxy Settings to connect to the remote Server.  We require to findout this Info. based ont the default browser of the Client PC. To our knwoledge the IE stores the Proxy Info  in the registry and the Netscape stores in the Pref.js file (for each user profile)  .  
   If the Client Browser Settings are ProxyAutoConfiguration then a URL has to be specified which is a Java Script code.
So in all these above settings our application need to know the
Proxy config . Is their any method to read the pref.js  and as well any way to get the proxy settings from When auto configuration is set.

  the sample  Java script file for Auto config would look like this
    Function proxyinfo(url,host)
    {
        return "PROXY 192.168.1.1:8080, DIRECT"
    }
   
Any response in this regard is highly appreciated.


0
Madhura122398
Asked:
Madhura122398
  • 2
1 Solution
 
jhanceCommented:
So what is your question??  You have already answered it yourself.  The IE settings are in the registry and the Navigator settings are in the prefs.js.  

For IE, read it from the registry.

For Navigator, open the right prefs.js and parse the prefs.js for the information you need.  If you are looking for an interface or API supplied by Navigator to get this information, it doesn't exist.
0
 
Madhura122398Author Commented:
When auto-config preference is set, the java script file would be in a remote server(specified in the URL), which gets executed when the user tries to access internet. That java script file would be in the format as given above.  
So, the question is how to run that java script file?
0
 
jhanceCommented:
Netscape runs it's own choice of prefs.js file and all you can do it edit that file to change the setting.
0
 
dxdingCommented:
i am looking for source code of proxy server program. can you give me some source code to demostrate how to build own proxy server?
if you have proxy server sample code, please contact me at:dxding@hotmail.com. i really need it.
thanks.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now