|
Rank: Newbie Groups: Member
Joined: 4/7/2016 Posts: 4
|
Good day, is EO.Webbrowser threadsafe? Does is support https and socks5 proxies? Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, You can either use the WebView with UI or without UI. When you use it with UI, everything is driven by your UI thread. When you use it without UI, you would need to use a ThreadRunner to drive it: http://www.essentialobjects.com/doc/webbrowser/start/webview_no_ui.aspxThis means you can not call the WebView's method in any arbitary threads. It does support https and socks5 proxies. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 4/7/2016 Posts: 4
|
Many thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/7/2016 Posts: 4
|
Is there a way to set proxy per thread? Trying like this, but has no effect:
Code: C#
void runInThread()
{
var threadRunner = new ThreadRunner();
var webView = threadRunner.CreateWebView();
threadRunner.Send(() =>
{
EO.WebBrowser.Runtime.Proxy = new EO.Base.ProxyInfo(EO.Base.ProxyType.Socks5, "171.25.204.31", 51775);
webView.LoadUrlAndWait("https://httpbin.org/ip");
MessageBox.Show(webView.GetText());
});
}
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
No. The lowest level you can set proxy is per engine: http://essentialobjects.com/doc/webbrowser/advanced/engine.aspxIf that is not sufficient for you, it is possible for you to replace the network layer completely with your own code through custom resource handler: http://www.essentialobjects.com/doc/webbrowser/advanced/resource_handler.aspxOnce you replace the network layer with your own code, you can implement whatever proxy logic in your own code. We would not recommend this method though since the browser engine's resource loader is well optimized, as such you may run into performance issue if you choose to intercept all requests. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 4/7/2016 Posts: 4
|
Thanks again!
|
|