|
Rank: Member Groups: Member
Joined: 2/18/2020 Posts: 10
|
Hello Creating an Engine: Quote:EO.WebEngine.Engine _engine = EO.WebEngine.Engine.Create("TEST"); _engine.Start(); Adding a Proxy Settings (which theHost and thePort are target proxy settings): Quote:_engine.Options.Proxy = new EO.Base.ProxyInfo(O.Base.ProxyType.HTTP, "theHost", "thePort"); Then Creating a ThreadRunner in Console: Quote:ThreadRunner thread = new ThreadRunner("NewThread", _engine); WebView web = thread.CreateWebView(); And Sending a Request or Loading a Url then. The proxy server is running properly. Tested with several other applications. But with the same settings as above, the EO Engine is not passing any data to the proxy gate. For about 100 tries, it only worked 2 times. Anything wrong here?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Please check if you are using the latest build. We have just fixed a proxy issue in build 2020.0.53. Previous builds such as .33 and .25 have problems with proxy.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 2/18/2020 Posts: 10
|
The version that is used is "2020.0.53", so it is the latest one.
Is there any way or event to check if the proxy is running properly or has any error?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Have you treid to set engine.Proxy before you call engine.Start?
|
|
Rank: Member Groups: Member
Joined: 2/18/2020 Posts: 10
|
Yes, I have set the proxy before starting the engine, but still, it is not working.
Also, I need to change the proxy settings after a time elapsed. so If I must set it just before starting the engine (that also not worked) is not a good solution.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, You CAN set the proxy any time. However because setting proxy is asynchronous, there is a time delay between when you set the proxy and when the setting actually takes effect. So if you set the proxy and then immediately try to load something, then most likely those resources will be loaded with settings between the proxy is set. If you still have problems, you can try to isolate the problem into a test project and send the test project to us. See here for more details: https://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
Is there any way to change proxies between one page load and the next? Also, you wrote that setting the proxy is asynchronous. Is there any way to await when the proxy has completed being set?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
BenjaminSimpson1989 wrote:Is there any way to change proxies between one page load and the next? Also, you wrote that setting the proxy is asynchronous. Is there any way to await when the proxy has completed being set? There is no way to wait for the proxy has completed being set. If you wish to guarantee that, the only way is to completely shutdown the engine and restart the engine.
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
It used to be that once the proxy was set, you'd be able to change to another proxy but it would still be stuck on the first proxy. The only way to really change it was to restart the engine. Is this still happening or can we change the proxy without restarting the engine?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
You can change the proxy without restarting the engine. However because the change is asynchronous, so there is no guarantee that it will immediately take effect for the next request. For example, it may take effect for the next next request instead.
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
I'm getting the following exception when trying to change the proxy and load the new URL: This WebView either has already been destroyed or is being destroyed.
Code: C#
wb.Engine.Stop(false);
wb.Engine.Options.Proxy = newProxy;
wb.Engine.Start();
wb.LoadUrlAndWait("about:blank");
wb.LoadUrlAndWait("https://ipinfo.io/");
wb.Engine.AllowRestart is already true.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Once the engine stops, all WebViews are destroyed. You will need to recreate those WebView before you can use them again.
Thanks!
|
|