Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Two proxies in the same application
- salvadordf
- Posts: 4082
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Two proxies in the same application
CEF doesn't have a "clear cache" function, not even when you use cache in memory.
You can use TChromium.ReloadIgnoreCache to reload the web page ignoring the cache.
You can use TChromium.ReloadIgnoreCache to reload the web page ignoring the cache.
Re: Two proxies in the same application
Hello. Still stuck at this problem
But I have an idea now
Can I change requestcontext of browser at runtime?
But I have an idea now
Can I change requestcontext of browser at runtime?
- salvadordf
- Posts: 4082
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Two proxies in the same application
Hi,
You can change the proxy settings and some preferences at run-time but the request conquest can only be assigned when you create the browser.
CEF doesn't allow to change the request context after the browser has been created.
These are the code comments about request contexts in the CEF sources.
https://github.com/chromiumembedded/cef ... ext_capi.h
You can change the proxy settings and some preferences at run-time but the request conquest can only be assigned when you create the browser.
CEF doesn't allow to change the request context after the browser has been created.
These are the code comments about request contexts in the CEF sources.
https://github.com/chromiumembedded/cef ... ext_capi.h
Code: Select all
///
// A request context provides request handling for a set of related browser or
// URL request objects. A request context can be specified when creating a new
// browser via the cef_browser_host_t static factory functions or when creating
// a new URL request via the cef_urlrequest_t static factory functions. Browser
// objects with different request contexts will never be hosted in the same
// render process. Browser objects with the same request context may or may not
// be hosted in the same render process depending on the process model. Browser
// objects created indirectly via the JavaScript window.open function or
// targeted links will share the same render process and the same request
// context as the source browser. When running in single-process mode there is
// only a single render process (the main process) and so all browsers created
// in single-process mode will share the same request context. This will be the
// first request context passed into a cef_browser_host_t static factory
// function and all other request context objects will be ignored.
///
Re: Two proxies in the same application
There is a problem with socks proxy, if a proxy for example port 68 does not work, what could be the problem?
- salvadordf
- Posts: 4082
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Two proxies in the same application
Chromium has some limitations with that kind of proxies.
Try Chrome or Chromium to see if they work with that proxy configuration.
Try Chrome or Chromium to see if they work with that proxy configuration.
Re: Two proxies in the same application
Code: Select all
TCefRequestContextRef.New(PtchCache, 'en', True, True, True, False);
With one browser changed so..
Code: Select all
CookiesPatch:= TCefCookieManagerRef.Global(CefBack);
CookiesPatch.SetStoragePath(ExtractFilePath(Application.ExeName) + 'Cookies_1', True, CefBack);
- salvadordf
- Posts: 4082
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Two proxies in the same application
I've never done that but try this :
Call TChromium.Browser.Host.RequestContext.GetDefaultCookieManager(nil) to get the ICefCookieManager for that browser.
Then try calling ICefCookieManager.SetStoragePath but I'm not sure it can be changed after the TChromium is fully initialized.
Call TChromium.Browser.Host.RequestContext.GetDefaultCookieManager(nil) to get the ICefCookieManager for that browser.
Then try calling ICefCookieManager.SetStoragePath but I'm not sure it can be changed after the TChromium is fully initialized.
Re: Two proxies in the same application
It seems to me or SOCKS with authorization does not work?
- salvadordf
- Posts: 4082
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Two proxies in the same application
Please, provide all the details you can about that issue and some code to test it.
I'm busy these days but I'll take a look as soon as I can.
I'm busy these days but I'll take a look as soon as I can.
Re: Two proxies in the same application
If you remove the authorization (username and password) then it works.
You do not have the required permissions to view the files attached to this post.