[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to automatic send username/password while using proxy
From: |
Ted Zlatanov |
Subject: |
Re: How to automatic send username/password while using proxy |
Date: |
Fri, 22 Aug 2008 12:24:46 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
On Sat, 23 Aug 2008 00:29:50 +0900 Ke Lu <lu@luxdo.jp> wrote:
KL> I use url-retrieve-synchronously function.
KL> But I must use proxy to connect to internet.
KL> So I set url-proxy-services correctly and url-retrieve-synchronously
KL> works ok,But I must input username and password.
KL> How can I automatic send username and password?
Try using auth-sources authentication. From the source commentary:
;; Easy setup:
;; (require 'auth-source)
;; (customize-variable 'auth-sources) ;; optional
;; now, whatever sources you've defined for password have to be available
;; if you want encrypted sources, which is strongly recommended, do
;; (require 'epa-file)
;; (epa-file-mode)
;; (setq epa-file-cache-passphrase-for-symmetric-encryption t) ; VERY important
;; before you put some data in ~/.authinfo.gpg (the default place)
;;; For url-auth authentication (HTTP/HTTPS), you need to use:
;;; machine yourmachine.com:80 port http login testuser password testpass
;;; This will match any realm and authentication method (basic or
;;; digest). If you want finer controls, explore the url-auth source
;;; code and variables.
It's not documented properly yet, but this should get you started.
Basically set up an authinfo file and put the proxy username and
password in it.
Ted