Hello,
I'd like to add proxy support to wxWebView, i.e. allow setting a specific
proxy to use instead of doing whatever it does by default (which, I think,
is not using any proxy at all under Linux and using the default proxy
configured at the OS level under Windows and Mac).
This was trivial with WebKit GTK and relatively simple with Edge (except
that it has to be set before calling Create() there, but we can live with
this). Unfortunately things are much worse under Mac, where the currently
used WKWebView doesn't support setting proxy at all, or at least not until
the very latest/yet unreleased OS versions.
AFAICS for an application which needs to use wxWebView with a custom proxy
under Mac there are only 2 choices:
1. Resurrect the old UIWebView-based wxWebView version, which doesn't
officially support setting proxy neither but where you could define
a custom URL protocol that would forward the requests via a proxy
(this hack doesn't work with WKWebView which does network stuff out
of process).
2. Use CEF-based wxWebView implementation, i.e. trying to revive this PR:
https://github.com/wxWidgets/wxWidgets/pull/706
Neither seems very appealing, but unless someone knows of another
solution, I'm going to have to choose between these ones. Out of those, it
seems like (1) ought to be simpler, i.e. it looks like it should be
possible to add the old code removed in 4df334cec4 (macOS/iOS: Use
WKWebView for wxWebView Implementation, 2020-11-09) as a new backend, which
could be used by people who really need to use a proxy. But there were, of
course, many changes to wxWebView since then that are only implemented in
the new, WKWebView-based, version, so it's probably not going to be trivial
neither.
OTOH making CEF backend work is probably going to be even worse, as it's
probably even more out of date compared to the other backends. But I don't
really know and would appreciate any insights from people who do, i.e.
mostly Tobias, I guess.
And, of course, if Stefan knows of some magic way to set proxy for
WKWebView, it would be ideal, but after looking at many discussions about
this being impossible, I'm afraid it really is.
Thanks in advance for your thoughts!
VZ