Punchey
01-27-2004, 07:17 AM
I use some in-app routines to retrieve various dynamic information from my website such as the most recent version number, current special offers, etc. But I'm having trouble with a proxy issue.
To detect proxy settings, I lookup "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" and read in the "Proxy Enable" value. If enabled, I read the "ProxyServer" string which normally contains either a hostname or an ip : port pair. Normally my app reads in the proxy's IP or hostname, connects to it, and then submits the HTTP request to it. But here's the trouble I'm having:
An app called "AdSubtract" which filters HTTP traffic for banner ads sets itself up as the proxy server for the machine, filters the traffic, and then forwards all traffic to the actual proxy server. It does this by replacing the actual proxy entry in the registry with its own hostname. This worked in the previous version where it used a hostname like "adsubtract". My app would connect to this hostname sucessfully and everything was properly forwarded. But in the latest version, AdSubtract now places "localhost:<port>" (where <port> is a port number the application uses) in the registry. This doesn't seem to resolve properly and my app can never establish a connection whith this "address". I'm kinda new to this whole thing, is there something I'm missing? Any tips? Thanks!
To detect proxy settings, I lookup "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" and read in the "Proxy Enable" value. If enabled, I read the "ProxyServer" string which normally contains either a hostname or an ip : port pair. Normally my app reads in the proxy's IP or hostname, connects to it, and then submits the HTTP request to it. But here's the trouble I'm having:
An app called "AdSubtract" which filters HTTP traffic for banner ads sets itself up as the proxy server for the machine, filters the traffic, and then forwards all traffic to the actual proxy server. It does this by replacing the actual proxy entry in the registry with its own hostname. This worked in the previous version where it used a hostname like "adsubtract". My app would connect to this hostname sucessfully and everything was properly forwarded. But in the latest version, AdSubtract now places "localhost:<port>" (where <port> is a port number the application uses) in the registry. This doesn't seem to resolve properly and my app can never establish a connection whith this "address". I'm kinda new to this whole thing, is there something I'm missing? Any tips? Thanks!