There's another question that answers this though it doesn't specify anything regarding proxy authentication.
Its solution is
(setq url-proxy-services '(("no_proxy" . "work\\.com")
("http" . "proxy.work.com:911")))
There's another question that answers this though it doesn't specify anything regarding proxy authentication.
Its solution is
(setq url-proxy-services '(("no_proxy" . "work\\.com")
("http" . "proxy.work.com:911")))
Nowadays, my approach to the "authenticated proxy problem" is to use CNTLM. It is portable, quite easy to configure and may be run as deamon.
CNTLM
, proxychains
are the best solution so far. I really hope something could be done to make a unique working proxy setting in emacs. –
Eckhart 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...
url-proxy-services
. In Emacs 24.x –
Solly ~/.authinfo
(same as ~/.netrc
) for Gnus, but don't known that Emacs may use ~/.authinfo
as auth storage for HTTP proxy. Is that true? –
Solly url-http-proxy-basic-auth-storage
, or don't provide entry to your proxy.com:8080
! –
Solly Well, if you really want to do this and do not mind using another program then ... socat is the answer. Use socat to forward a local port through to a connection passing through the http proxy. You are not bypassing it, just "bolting on" the functionality to an application that does not have it (in case anyone asks). This might be difficult.
Another solution that would work great if you are on a unixy OS is to install your own non-authenticating http proxy that uses the authenticating proxy (like squid). This might look like circumvention to some people. Be careful.
For example, take a look at Proxytunnel.
UPDATE: Mike Hoss seems to be correct in the comment he adds to the question linked to above. The URL package will ask for id and password. At least that is what I see in the defun for url-http-create-request in file url-http.el.
In case anyone else hits what I've just struggled with:
If you use cntlm or some other local authenticating proxy, you may need to specify a loopback IP address rather than "localhost". I found "localhost" silently failed, but "127.0.0.1" worked a treat.
ELPA uses the "url" package. As far as I know, there is no way to do proxy authentication with it.
Can you set up your proxy auth outside of Emacs?
© 2022 - 2024 — McMap. All rights reserved.