Last active
June 22, 2023 12:23
-
-
Save et2010/5d6edeeb284e33343d0a to your computer and use it in GitHub Desktop.
socks proxy settings for emacs url package.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq url-gateway-method 'socks) | |
(setq socks-server '("Default server" "127.0.0.1" 1080 5)) |
I have tried this, it worked.
;;----------------------------------------------------------------------------
;; proxy setting for url-retrieve, used by eww, w3m...
;;----------------------------------------------------------------------------
(setq url-proxy-services
'(("no_proxy" . "^.*example.com")
("https" . "localhost:1087")
("http" . "localhost:1087")
;; socks not working, @see url-default-find-proxy-for-url
;; ("socks5" . "localhost:1080")
))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got sock5 proxy client(Qv2ray) running in the background, when I want to use it in the terminal, I'll use proxychains cmd, I got socks5 127.0.0.1 1080 in my proxychains.conf file, when I want to use it in my browser, I got SwitchyOmega extension and set it to socks5 127.0.0.1 1080.
I tried this gist in my emacs/spacemacs, it doesn't work at all.
BTW: How can I check if it is using socks proxy? Currently, when I install a package, it hangs and failed to install it, so I believe my emacs is not using the proxy. (When I use
proxychains emacs
in terminal, it installs pacakge very quickly)