Jump to content
Sign in to follow this  
softtouch

Proxy for TEdgeBrowser/Webview2?

Recommended Posts

I need to use the TEdgeBrowser/WebView2 with Delphi 11.1, and I have to use different proxies based on the url I want to access.

I cannot find any example or description about how to use proxies with the TEdgeBrowser.

I cant use the system proxy settings, thats important.

Does anybody has a clue?

Share this post


Link to post

The WebView2 API doesn't have any interface to use custom proxy settings but you can use the Chromium command line switches.

If you use TEdgeBrowser then you will have to create an ICoreWebView2EnvironmentOptions instance with those switches and pass it as a parameter in CreateCoreWebView2EnvironmentWithOptions.

 

However, if you decide to use WebView4Delphi then all this is already implemented and you only have to set the GlobalWebView2Loader.ProxySettings properties.

 

At this time, any WebView2 wrapper will only allow you to set the proxy settings once. If your application needs to change the proxy settings multiple times at run-time then you need to use CEF4Delphi.

Share this post


Link to post
22 minutes ago, Fr0sT.Brutal said:

I doubt it's possible. Neither Chrome can do this nor all Chromium clones I know (like Opera)

Sorry for the shameless promotion but BriskBard allows you to set any proxy. :classic_cool:

  • Like 2

Share this post


Link to post
6 hours ago, salvadordf said:

Sorry for the shameless promotion but BriskBard allows you to set any proxy. :classic_cool:

Really impressive, you seem to revive all-in-one approach of good old Opera!

  • Thanks 1

Share this post


Link to post

I use now cef4delphi, and this allows me to set a proxy, so my issue is resolved with hits.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×