Welcome Guest Search | Active Topics | Sign In | Register

2 questions about EO.Webbrowser Options
Standard_user
Posted: Thursday, April 7, 2016 7:59:07 AM
Rank: Newbie
Groups: Member

Joined: 4/7/2016
Posts: 4
Good day,
is EO.Webbrowser threadsafe? Does is support https and socks5 proxies? Thanks.
eo_support
Posted: Thursday, April 7, 2016 8:28:01 AM
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.aspx

This means you can not call the WebView's method in any arbitary threads.

It does support https and socks5 proxies.

Thanks
Standard_user
Posted: Thursday, April 7, 2016 9:59:55 AM
Rank: Newbie
Groups: Member

Joined: 4/7/2016
Posts: 4
Many thanks!
Standard_user
Posted: Thursday, April 7, 2016 2:04:47 PM
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());
            });

        }
eo_support
Posted: Thursday, April 7, 2016 2:26:12 PM
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.aspx

If 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.aspx

Once 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
Standard_user
Posted: Thursday, April 7, 2016 2:27:30 PM
Rank: Newbie
Groups: Member

Joined: 4/7/2016
Posts: 4
Thanks again!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.