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
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Proxy
The current version of WebView2 doesn't allow you to set the proxy settings so we have to use the Chromium command line switches.
GlobalWebView2Loader.ProxySettings is used to add these 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
GlobalWebView2Loader.ProxySettings is used to add these command line switches :
- if GlobalWebView2Loader.ProxySettings.NoProxyServer is TRUE then "--no-proxy-server" is added.
- if GlobalWebView2Loader.ProxySettings.AutoDetect is TRUE then "--proxy-auto-detect" is added.
- if you set some value to GlobalWebView2Loader.ProxySettings.Server then "--proxy-server" is added with that value.
- if you set some value to GlobalWebView2Loader.ProxySettings.ByPassList then "--proxy-bypass-list" is added with that value.
- if you set some value to GlobalWebView2Loader.ProxySettings.PacUrl then "--proxy-pac-url" is added with that value.
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
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Proxy
Please download WebView4Delphi again from GitHub.
I just fixed an issue assigning values to the proxy settings.
I just fixed an issue assigning values to the proxy settings.
Re: Proxy
Thank you.salvadordf wrote: Fri Jan 14, 2022 8:49 am I just fixed an issue assigning values to the proxy settings.
It was possible to set the proxy server only during initialization.
It didn't work after initialization.
Maybe I'm doing something wrong?
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Proxy
WebView2 has more limitations than CEF and at this moment we can't do that.
We can only configure it with a proxy before the GlobalWebView2Loader.StartWebView2 call.
We can only configure it with a proxy before the GlobalWebView2Loader.StartWebView2 call.
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Proxy
Try adding the username and password to the URL in the GlobalWebView2Loader.ProxySettings.Server property :
Code: Select all
http://<user>:<pass>@<host>:<port>/