Welcome Guest Search | Active Topics | Sign In | Register

Proxy is not working Options
Red Olive
Posted: Tuesday, February 18, 2020 6:48:06 AM
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?
eo_support
Posted: Tuesday, February 18, 2020 9:08:02 AM
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!
Red Olive
Posted: Wednesday, February 19, 2020 12:38:12 AM
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?
eo_support
Posted: Wednesday, February 19, 2020 8:31:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Have you treid to set engine.Proxy before you call engine.Start?
Red Olive
Posted: Saturday, February 22, 2020 1:00:20 AM
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.
eo_support
Posted: Monday, February 24, 2020 9:21:19 AM
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.aspx

Thanks!
BenjaminSimpson1989
Posted: Thursday, June 4, 2020 3:07:28 PM
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?
eo_support
Posted: Thursday, June 4, 2020 5:30:21 PM
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.
BenjaminSimpson1989
Posted: Friday, June 5, 2020 4:45:50 AM
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?
eo_support
Posted: Friday, June 5, 2020 8:30:05 AM
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.
BenjaminSimpson1989
Posted: Monday, May 30, 2022 10:52:37 AM
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.
eo_support
Posted: Tuesday, May 31, 2022 10:33:57 AM
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!


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.