webmacs icon indicating copy to clipboard operation
webmacs copied to clipboard

add proxy support

Open parkouss opened this issue 5 years ago • 5 comments

It would be really nice to have support for proxies, I need to investigate a bit on how to do that. But webmacs is mainly using qnetworkmanager, and I guess there is some code built in Qt for that. Probably there is only glue code required to add the support.

parkouss avatar Aug 29 '18 11:08 parkouss

@FirstLoveLife could you try by setting the global environment variables http_proxy and https_proxy? export http_proxy=socks5://host:port export https_proxy=socks5://host:port

It might work out of the box, though dns requests won't be proxied I think.

parkouss avatar Aug 31 '18 08:08 parkouss

I have git pull, activated the two lines in .zshrc and source it just now. But still cannot connect to google.com.

FirstLoveLife avatar Aug 31 '18 08:08 FirstLoveLife

ok, thanks - could you try with the branch "proxy" please (PR #62) ?

Please set the following in your config file:

from webmacs import variables variables.set("proxy", "socks5://host:port") variables.set("proxy-dns-requests", True)

And tell me if that works. Note that you should also be able to use the system env var - in such case you only have to define the proxy-dns-requests variable.

parkouss avatar Sep 01 '18 04:09 parkouss

Sorry for the late reply(I was busy recently)

I have put the three lines you gave into ~/webmacs/init/__init__.py, but still cannot connect to google(only white background occurs)

(venv) ~/dev/webmacs >>> python -m webmacs.main                                                                                                                                           ±[●●][proxy]
                                               
[0903/175442.355978:WARNING:stack_trace_posix.cc(699)] Failed to open file: /home/firstlove/#8706824 (deleted)
  Error: No such file or directory
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

FirstLoveLife avatar Sep 03 '18 09:09 FirstLoveLife

Hmm. Is it working for you with qutebrowser, with the webengine backend? If yes, with which config options?

parkouss avatar Sep 03 '18 14:09 parkouss