Open lanyeeee opened 1 month ago
I tried Luakit, a browser based on Webkit2gtk. Starting from version 2.3.4, it uses Webkit2gtk 4.1
.
I installed a fresh Ubuntu 24.04 and directly installed luakit 2.3.6
via apt. I noticed that luakit 2.3.6
automatically detects and uses the system proxy. Does this mean that Webkit2gtk 4.1
has the capability to automatically detect and use the system proxy, right? Or did I misunderstand something?
The reason I tested Luakit on Ubuntu 24.04
instead of Ubuntu 22.04
in my previous comment is that Ubuntu 24.04
provides version 2.3.6
of Luakit through apt, which allows me to avoid manually compiling Luakit.
However, when I went back to Ubuntu 22.04
, manually compiled and ran Luakit, the system proxy issue reappeared.
So I went back to Ubuntu 24.04
again, try to reproduce the issue, it was gone.
Now the issue is now quite clear—it is a problem with webkit2gtk4.1
on Ubuntu 22.04
.
I’m not entirely sure why, but since libwebkit2gtk4.1
is built-in on Ubuntu 24.04
and has to be manually installed on Ubuntu 22.04
, that could be the reason, perhaps?
Describe the bug
I noticed that the
latest wry
already supports manually setting a proxy. This feature is not supported inwebkit2gtk4.0
but is available in4.1
. After testing, I confirmed that the manual proxy setting feature inlatest wry
works properly. However,latest wry
can not automatically use the system proxy, it either requires users to manually specify the proxy or does not use any proxy at all. The software I am developing relies on this automatic proxy feature.Steps To Reproduce
To reproduce this issue on Ubuntu 22.04, follow these steps:
Cargo.toml
:main.rs
:http://127.0.0.1:7890
).If you downgrade to
wry = "=0.24.11"
inCargo.toml
, the issue does not occur, and the proxy works as expected.This issue persists in the latest version (
wry 0.45.0
) as well. To reproduce this issue in thelatest wry
is basically the same as the steps above, except that the contents ofmain.rs
andCargo.toml
are different.Modify
Cargo.toml
:Modify
main.rs
:After running it you will see the same error as above in the webview. And to resolve this in
latest wry
is very simple. Just set the proxy manually. Change the code inmain.rs
to the following:Expected behavior
I expect the
latest wry
can automatically use the system proxy when no manual proxy is configured, just as it did in versionv0.24.11
.But now
latest wry
either requires users to manually specify the proxy or does not use any proxy at all, lacking the option to automatically use the system proxy.Is the inability to automatically use the proxy a problem with
webkit2gtk4.1
itself? Canwry
automatically use the system proxy?Screenshots
Platform and Versions (please complete the following information):
Additional context