MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
427 stars 51 forks source link

Ability to dynamically change Proxy #2809

Open zattu1 opened 1 year ago

zattu1 commented 1 year ago

Is there a way to change the browser proxy dynamically without restarting webview2Core? If not, please create a method.

AB#42249878

nishitha-burman commented 1 year ago

Hi @zattu1,

Can you please provide more details about the scenarios you are trying to address?

Thank you

zattu1 commented 1 year ago

Hi @nishitha-burman, Currently, there is no other way to specify the proxy at the command line when the browser is started. I would like to have a function or mechanism that allows me to change the proxy at any time while the browser is running.

nishitha-burman commented 1 year ago

Hi @zattu1,

You should be able to use CoreWebView2EnvironmentOptions > AdditionalBrowserArguments to specify proxy options however this does not support dynamically changing the proxy at any time while the browser is running. Here are some threads where this was discussed: https://github.com/MicrosoftEdge/WebView2Feedback/issues/132 and https://github.com/MicrosoftEdge/WebView2Feedback/issues/193

I have added this to our backlog to support dynamically changing the proxy. Can you provide scenarios/examples of when/why you would like to do this?

Thank you

zattu1 commented 1 year ago

@nishitha-burman You want to temporarily change the Proxy in the UI when you want to connect to an overseas VPN.