john li
2004-12-21 00:44:19 UTC
Hello,
In my testing to ues WinInet API for HTTP proxy setting, I cannot get it
work.
If I set up my IE use non-proxy and in code, I set proxy connection and even
I *intentionally* set it to wrong IP address, it still works. Why? Here is
some snippet code. Any suggestion is appreciated.
//my ie has no proxy config. I want to use my own proxy connection.
hSession=InternetOpen(_T("my own test"),
INTERNET_OPEN_TYPE_PROXY,
_T("http=http://10.11.25.22:3129"),
NULL,
0);
hConnect = ::InternetConnect(hSession, szUrl,
INTERNET_DEFAULT_HTTPS_PORT, "", "",
INTERNET_SERVICE_HTTP, 0, 0) ;
...
in this case, I am still able to connect to http server in my code, which
confuses me. Looks like my program still uses ie connection setting instead
of mine. Did i miss something?
thanks,
John
In my testing to ues WinInet API for HTTP proxy setting, I cannot get it
work.
If I set up my IE use non-proxy and in code, I set proxy connection and even
I *intentionally* set it to wrong IP address, it still works. Why? Here is
some snippet code. Any suggestion is appreciated.
//my ie has no proxy config. I want to use my own proxy connection.
hSession=InternetOpen(_T("my own test"),
INTERNET_OPEN_TYPE_PROXY,
_T("http=http://10.11.25.22:3129"),
NULL,
0);
hConnect = ::InternetConnect(hSession, szUrl,
INTERNET_DEFAULT_HTTPS_PORT, "", "",
INTERNET_SERVICE_HTTP, 0, 0) ;
...
in this case, I am still able to connect to http server in my code, which
confuses me. Looks like my program still uses ie connection setting instead
of mine. Did i miss something?
thanks,
John