descriptionA minor mode to toggle proxy for Emacs. Supports HTTP proxy and socks v4, v5 proxy with Emacs built-in functions.
ownernumbchild@gmail.com
last changeFri, 3 Mar 2023 07:06:24 +0000 (3 15:06 +0800)
content tags
add:
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)}}} .
shortlog
2023-03-03 stardivinerremove useless code linemaster
2023-03-03 stardivinerFix case symbol matching
2023-03-03 stardivinerproxy-mode set package default proxy unless user have...
2023-03-03 stardivinerChange README default package config example code
2023-03-03 stardivinerFix typo
2023-03-03 stardivinerImprove proxy-mode proxy type selection string
2023-03-03 stardivinerDon't use `setq-local' for buffer local proxy setting.
2023-03-03 stardivinerChange environment variable HTTP_PROXY customize option...
2023-03-03 stardivinerChange default env http proxy service
2023-03-03 stardivinerRename proxy type symbol names
2023-03-03 stardivinerRemove `global-proxy-mode' source code.
2023-03-03 stardivinerRefactor function names and some variable names
2023-03-03 stardivinerUse lowercase for mode-line lighter
2023-03-03 stardivinerImprove proxies docstring
2023-03-03 stardivinerchange default proxy service port
2022-02-10 stardivinerUpdate library homepage
...
heads
13 months ago master