3 A minor mode to toggle proxy for Emacs. Supports HTTP proxy and socks v4, v5
4 proxy with Emacs built-in functions.
6 This minor mode =proxy-mode= is buffer locally by default. If you want globally
7 proxy in Emacs, use command =global-proxy-mode=.
10 It supports buffer-local proxy: Emacs http, and Emacs socks.
11 Not support buffer-locally shell environment variable HTTP_PROXY.
15 - Support Emacs built-in HTTP proxy
16 - Support Emacs built-in Socks v4, v5 proxy
17 - Support shell environment HTTP proxy
23 #+begin_src emacs-lisp
24 (use-package proxy-mode
26 :custom ((proxy-mode-emacs-http-proxy
27 '(("http" . "127.0.0.1:7890")
28 ("https" . "127.0.0.1:7890")
29 ;; NOTE: don't use `localhost', avoid local server like robe no response
30 ("no_proxy" . "127.0.0.1")))
31 (proxy-mode-emacs-socks-proxy '("Default server" "127.0.0.1" 7890 5)))
32 :commands (proxy-mode))
37 ** specify local host regexp
39 #+begin_src emacs-lisp
40 (setq url-gateway-local-host-regexp
41 (concat "\\`" (regexp-opt '("localhost" "127.0.0.1")) "\\'"))
46 Toggle ~proxy-mode~ minor mode with {{{kbd(M-x proxy-mode RET)}}} .