How do I configure Emacs behind an authenticated HTTP proxy?

前端 未结 5 1606
野的像风
野的像风 2021-02-13 13:55

There\'s another question that answers this though it doesn\'t specify anything regarding proxy authentication.

Its solution is

(setq url-proxy-services          


        
5条回答
  •  鱼传尺愫
    2021-02-13 14:37

    I get authorization working without user interaction by:

    (setq url-proxy-services
       '(("no_proxy" . "^\\(localhost\\|10.*\\)")
         ("http" . "proxy.com:8080")
         ("https" . "proxy.com:8080")))
    
    (setq url-http-proxy-basic-auth-storage
        (list (list "proxy.com:8080"
                    (cons "Input your LDAP UID !"
                          (base64-encode-string "LOGIN:PASSWORD")))))
    

    This work for Emacs 24.3. It based on non-public API tricks, so might not work in anther Emacs versions...

    Replace LOGIN and PASSWORD with your auth info...

提交回复
热议问题