0

I try to setup a corporate proxy in Emacs:

in Bash I've setup the following environment variables:

export http_proxy="http://my_login:my_psw@192.168.100.1:8080";export https_proxy="http://my_login:my_psw@192.168.100.1:8080";export ftp_proxy="http://my_login:my_psw@192.168.100.1:8080

-> wget, curl, git worked fine with this setting, unfortunately Emacs doesn't.

I tried to reproduce this with a setup of tinyproxy at home:

without authentication:

here the tinyproxy.conf

Port 8080
Listen 192.168.100.1
Timeout 600
Allow 192.168.100.1/24

Emacs uses the proxy for melpa with this settings in my .emacs-file:

(setq url-proxy-services
   '(("no_proxy" . "^\\(localhost\\|10\\..*\\|192\\.168\\..*\\)")
    ("http" . "192.168.100.1:8080")
    ("https" . "192.168.100.1:8080")))

but as far I use authentication:

I got following error:Proxy authentication required

here my tinyproxy.conf:

Port 8080
Listen 192.168.100.1
Timeout 600
Allow 192.168.100.1/24
BasicAuth my_login my_psw

I have no idea how to setup the authentication method in Emacs.

an old post on stack overflow suggests to add:

(setq url-http-proxy-basic-auth-storage
    (list (list "192.168.100.1:8080"
                (cons "Input your LDAP UID !"
                      (base64-encode-string "my_login:my_psw")))))

but it doesn't work (same error:Proxy authentication required)

Any suggestion or help how to debug the problem is welcome.

major
  • 1
  • 1
  • Would it help to say why/how the SO suggestion "doesn't work"? Would that make clearer what's wrong? – Drew May 24 '23 at 14:10
  • @Drew: I've added the SO suggestion. Is there maybe a way to debug if the introduced variable `url-http-proxy-basic-auth-storage` is used somewhere? – major May 24 '23 at 23:46
  • No idea. But I'm guessing that you're meant to insert strings that correspond to what those strings describe, not to insert those strings literally. – Drew May 25 '23 at 02:22

0 Answers0