Setting Internet Explorer / Windows to use a Socks5 proxy in C#

依然范特西╮ 提交于 2019-12-11 15:34:51

问题


This is driving me nuts.

I'm making a SSH Tunnelling application, and need to be able to automatically force the system to use HTTP & Socks5 proxies, and have the changes take effect instantly. HTTP proxies are now taken care of perfectly by the PoshHTTP class , but I can't figure out how to do the same with SOCKS5.

I've already tried forcing the changes in the registry, but they don't take effect instantly and it's just not reliable. In most cases I had to open internet options > lan settings before the settings would take effect, so the user may as well have set the proxy up manually by this point.

Is there a way to do this that I'm missing ? It would be amazing if I could just modify poshHTTP to do this, but I don't have high hopes.

Please help.. I did search like mad for days before posting but I'm running out of ideas and this app needs to be launched ASAP. Thanks!

I'm willing to Pay $50USD for a workable c# solution, that takes effect immediately (Paid via PayPal only)


回答1:


That really dependes on what kind of socks5 authentication type it's required

have youtried this? http://code.msdn.microsoft.com/windowsdesktop/CSWebBrowserWithProxy-c8535715#content

Other places you could look at are http://www.codeproject.com/Articles/336/SOCKS-Proxy-SSL-Tunnel and http://www.codeproject.com/Articles/5954/C-class-for-connecting-via-a-SOCKS5-Proxy-Server



来源:https://stackoverflow.com/questions/8832641/setting-internet-explorer-windows-to-use-a-socks5-proxy-in-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!