Page 1 of 1

Proxies overwrite each other

Posted: Thu Nov 03, 2022 10:42 am
by micmorozov
In two tabs I dynamically create two browsers and in CEF_AFTERCREATED for each I specify my proxies and call UpdatePreferences.
The problem is that the browser created by the second overwrites the proxy settings of the first and vice versa.

Browsers are created at the same time. If you create with an interval, then there is no problem.

It feels like
task TempTask := TCefUpdatePrefsTask.Create(self); the second browser overwrites the task of the first.

Can't find solutions. Please advise how to proceed.
Thanks

Re: Proxies overwrite each other

Posted: Fri Nov 04, 2022 8:59 pm
by salvadordf
All the browsers that share the same request context also share the same proxy settings. By default, all the browsers share the global request context and the same proxy settings.

Try creating independent browsers with different request contexts (TCefRequestContextRef) as you can see in the MDIBrowser demo :
https://github.com/salvadordf/CEF4Delphi/blob/b1cbe9382c1df54d7a98a4838ba96142deec3a75/demos/Delphi_VCL/MDIBrowser/uChildForm.pas#L218

Re: Proxies overwrite each other

Posted: Mon Nov 14, 2022 3:41 am
by micmorozov
Thanks, it helped!