简体   繁体   中英

Delphi/C#: WebBrowser socks5 proxy (with username/password auth)

How to use SOCKS 5 proxy with login/password in WebBrowser (IE 8/9)?

In Delphi I tried something like this:

var
  PIInfo: PInternetProxyInfo;
begin
  New(PIInfo);
  PIInfo^.dwAccessType := INTERNET_OPEN_TYPE_PROXY;
  PIInfo^.lpszProxy := PChar('socks=127.0.0.1:1080');
  PIInfo^.lpszProxyBypass := PChar('');
  UrlMkSetSessionOption(INTERNET_OPTION_PROXY, piinfo, SizeOf(Internet_Proxy_Info), 0);
  Dispose(PIInfo);
  WebBrowser1.Navigate('http://www.google.com');
end;

but looks like it works only if proxy doesn't require login/password authentication.

Bsalsa的嵌入式Web浏览器使您可以指定代理用户名/密码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM