Hello Henrik,
Quinta-feira, 16 Julho 98, you wrote:
HN> Juan Carlos Leon wrote:
>>
>> Is is possible to use wget while having squid compiled with the auth
>> option? I would like to prefetch some sites but since squid asks for
>> authentification wget is unable to retreive anything.
HN> Yes. Add your own Proxy-Authorization header.
HN> --header=additional-header
HN> Define an additional header. You can define more
HN> than additional headers. Do not try to terminate
HN> the header with CR or LF.
HN> or hack the source to add built in support for it, much in the same way
HN> it currently supports normal HTTP authentication.
HN> Here is a small perl hack that translates login and password to a
HN> proxy-authorization header suiteable for use with the --header option to
HN> wget (or another HTTP client which supports custom headers).
HN> ----------------
HN> #!/usr/bin/perl
HN> $login=$ARGV[0];
HN> $password=$ARGV[1];
HN> ($cred=substr(pack("u","$login:$password"),1)) =~ tr# -_#A-Za-z0-9+#;
HN> print "Proxy-Authorization: Basic $cred";
HN> ----------------
HN> ---
HN> Henrik Nordström
HN> Sparetime Squid Hacker
Or you can use a valid userid on wgetrc. Look this parameters on
wgetrc:
http_proxy = http://proxy-server:port/
ftp_proxy = http://proxy-server:port/
proxy_user =
proxy_passwd =
Pedro
Received on Thu Jul 16 1998 - 13:30:42 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:41:08 MST