description | A minor mode to toggle proxy for Emacs. Supports HTTP proxy and socks v4, v5 proxy with Emacs built-in functions. |
owner | numbchild@gmail.com |
last change | Fri, 3 Mar 2023 07:06:24 +0000 (3 15:06 +0800) |
URL | git://repo.or.cz/proxy-mode.git |
| https://repo.or.cz/proxy-mode.git |
push URL | ssh://repo.or.cz/proxy-mode.git |
| https://repo.or.cz/proxy-mode.git (learn more) |
bundle info | proxy-mode.git downloadable bundles |
content tags
|
|
README.org
* Intro
A minor mode to toggle proxy for Emacs. Supports HTTP proxy and socks v4, v5
proxy with Emacs built-in functions.
This minor mode =proxy-mode= is buffer locally by default. If you want globally
proxy in Emacs, use command =global-proxy-mode=.
*NOTE*:
It supports buffer-local proxy: Emacs http, and Emacs socks.
Not support buffer-locally shell environment variable HTTP_PROXY.
* Features
- Support Emacs built-in HTTP proxy
- Support Emacs built-in Socks v4, v5 proxy
- Support shell environment HTTP proxy
* Installation
** use-package
#+begin_src emacs-lisp
(use-package proxy-mode
:ensure t
:custom ((proxy-mode-emacs-http-proxy
'(("http" . "127.0.0.1:7890")
("https" . "127.0.0.1:7890")
;; NOTE: don't use `localhost', avoid local server like robe no response
("no_proxy" . "127.0.0.1")))
(proxy-mode-emacs-socks-proxy '("Default server" "127.0.0.1" 7890 5)))
:commands (proxy-mode))
#+end_src
* Config
** specify local host regexp
#+begin_src emacs-lisp
(setq url-gateway-local-host-regexp
(concat "\\`" (regexp-opt '("localhost" "127.0.0.1")) "\\'"))
#+end_src
* Usage
Toggle ~proxy-mode~ minor mode with {{{kbd(M-x proxy-mode RET)}}} .