HTTP 代理背后的 Emacs

发布于 2024-08-09 04:15:08 字数 486 浏览 1 评论 0 原文

Emacs 能够通过诸如 url.elW3 网络浏览器

此外,Emacs Lisp 包存档 严重依赖于包 url.el。

现在,我如何配置 Emacs 以使用我的 HTTP 代理连接到 Internet?

代理背后的 ELPA 任何帮助均可获得奖励积分。

是的,我遇到了问题之前的 HTTP 代理

Emacs is able to access the Internet with packages such as url.el or the W3 web browser.

Also, the Emacs Lisp Package Archive is heavily dependent on package url.el.

Now, how do I configure Emacs to use my HTTP proxy to connect to the Internet in general?

Bonus points for any help with ELPA behind a proxy.

Yes, I've had problems with HTTP proxies before.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

在梵高的星空下 2024-08-16 04:15:08

对于 w3m,此设置对我有用:

(setq url-proxy-services '(("no_proxy" . "work\\.com")
                           ("http" . "proxy.work.com:911")))

For w3m, this setting has worked for me:

(setq url-proxy-services '(("no_proxy" . "work\\.com")
                           ("http" . "proxy.work.com:911")))
白鸥掠海 2024-08-16 04:15:08

我已获得工作授权:

(setq url-proxy-services
   '(("no_proxy" . "^\\(localhost\\|10\\..*\\|192\\.168\\..*\\)")
     ("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")))))

Works for Emacs 24.3。它基于非公共 API 技巧,因此可能无法在其他 Emacs 版本中工作...

I've got authorization working by:

(setq url-proxy-services
   '(("no_proxy" . "^\\(localhost\\|10\\..*\\|192\\.168\\..*\\)")
     ("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")))))

Works for Emacs 24.3. It is based on non-public API tricks, so might not work in another Emacs versions...

梦旅人picnic 2024-08-16 04:15:08

Emacs populates the url-proxy-services variable from the http_proxy, https_proxy and no_proxy environment variables if they are set.

纸短情长 2024-08-16 04:15:08

这有点旧了,但我也遇到了连接问题。我需要做的一件事是将我的证书添加到 gnutls-trustfiles 中以便进行连接。

(with-eval-after-load 'gnutls
    (add-to-list 'gnutls-trustfiles "path/to/cert.crt"))
(setq url-proxy-services
   '(("no_proxy" . "^\\(localhost\\|10\\..*\\|192\\.168\\..*\\)")
     ("http" . "proxy.com:8080")
     ("https" . "proxy.com:8080")))

This is a bit old, but I had issues connecting as well. One thing I needed to do is add my certificate to the the gnutls-trustfiles in order to connect.

(with-eval-after-load 'gnutls
    (add-to-list 'gnutls-trustfiles "path/to/cert.crt"))
(setq url-proxy-services
   '(("no_proxy" . "^\\(localhost\\|10\\..*\\|192\\.168\\..*\\)")
     ("http" . "proxy.com:8080")
     ("https" . "proxy.com:8080")))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文