Welcome Guest Search | Active Topics | Sign In | Register

how to use proxy in EO.WebBrowser c# Options
samisoft
Posted: Tuesday, April 24, 2018 6:34:45 AM
Rank: Newbie
Groups: Member

Joined: 4/24/2018
Posts: 2
im will set proxy & port in this browser , but this code not work. pleace help me to slove this.


EO.WebEngine.Engine engine1 = EO.WebEngine.Engine.Create("test");

ProxyInfo proxy = new ProxyInfo(ProxyType.HTTP, "178.32.181.66", 3128);
engine1.Options.Proxy = proxy;

EO.WebBrowser.ThreadRunner threadRunner = new EO.WebBrowser.ThreadRunner();
EO.WebBrowser.WebView webView1 = threadRunner.CreateWebView();

webView1.Engine = engine1;
webControl1.WebView = webView1;

webControl1.WebView.LoadUrl("https://google.com");
eo_support
Posted: Tuesday, April 24, 2018 10:41:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

You should not mix up a ThreadRunner and a WebControl. ThreadRunner is for creating a WebView without UI, WebControl is for hosting a WebView with UI. So if your WebView is visible, then first you need to remove your ThreadRunner code.

Second you need to make sure your WebView is NOT created before you set the WebView's Engine property. Setting the WebView's Engine property after the WebView has already been created will raise an exception.

Thanks!
samisoft
Posted: Tuesday, April 24, 2018 11:53:22 AM
Rank: Newbie
Groups: Member

Joined: 4/24/2018
Posts: 2
thank you , editted code :

EO.WebEngine.Engine engine1 = EO.WebEngine.Engine.Create("test");

ProxyInfo proxy = new ProxyInfo(ProxyType.HTTP, "92.222.79.39", 8181);
engine1.Options.Proxy = proxy;

EO.WebBrowser.WebView webView1 = new EO.WebBrowser.WebView();
webView1.Engine = engine1;


webControl1.WebView = webView1;

webControl1.WebView.LoadUrl("http://google.com");


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.