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.
Proxy with TCEFUrlRequestClientComponent
Proxy with TCEFUrlRequestClientComponent
Hi, is there a way to use proxy list with TCEFUrlRequestClientComponent?
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Proxy with TCEFUrlRequestClientComponent
Hi,
If you call TCefUrlRequestRef.New with a "nil" request context then it will use the global request context.
If you create a browser that also uses the global request context then you can set the proxy properties in that TChromiumCore component and the url request will use those proxy settings. See the MiniBrowser demo to know how to use the proxy properties.
Alternatively, if you don't create any browser then you can also use these command line switches :
https://peter.sh/experiments/chromium-command-line-switches/
https://www.chromium.org/developers/design-documents/network-settings#TOC-Command-line-options-for-proxy-sett
https://www.linuxbabe.com/desktop-linux/configure-proxy-chromium-google-chrome-command-line
Use GlobalCEFApp.AddCustomCommandLine before the GlobalCEFApp.StartMainProcess call in the DPR file to use any command line switch.
The command line switches can only be set once before the GlobalCEFApp.StartMainProcess call and GlobalCEFApp can only be initialized once per process.
If you need to switch between several proxy settings at runtime then you need to create a browser and set the proxy setting in TChromiumCore.
If you call TCefUrlRequestRef.New with a "nil" request context then it will use the global request context.
If you create a browser that also uses the global request context then you can set the proxy properties in that TChromiumCore component and the url request will use those proxy settings. See the MiniBrowser demo to know how to use the proxy properties.
Alternatively, if you don't create any browser then you can also use these command line switches :
- --proxy-auto-detect
- --proxy-bypass-list
- --proxy-pac-url
- --proxy-server
- --no-proxy-server
https://peter.sh/experiments/chromium-command-line-switches/
https://www.chromium.org/developers/design-documents/network-settings#TOC-Command-line-options-for-proxy-sett
https://www.linuxbabe.com/desktop-linux/configure-proxy-chromium-google-chrome-command-line
Use GlobalCEFApp.AddCustomCommandLine before the GlobalCEFApp.StartMainProcess call in the DPR file to use any command line switch.
The command line switches can only be set once before the GlobalCEFApp.StartMainProcess call and GlobalCEFApp can only be initialized once per process.
If you need to switch between several proxy settings at runtime then you need to create a browser and set the proxy setting in TChromiumCore.
Re: Proxy with TCEFUrlRequestClientComponent
Thank you very much, is it possible to rewrite the proxy address in CEF via internal memory?
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Proxy with TCEFUrlRequestClientComponent
I've never tried that.