Forzare l'uso di un proxy con wget
Per far usare un proxy a wget:
Utilizzare il proxy da linea di comando
- Per proxy HTTP
http_proxy='http://proxy.dominio.com:porta' wget http://url.domain.dom/file.ext
- Per proxy HTTPS
https_proxy='http://proxy.dominio.com:porta' wget https://url.domain.dom/file.ext
- Per proxy FTP
ftp_proxy='http://proxy.dominio.com:porta' wget http://url.domain.dom/file.ext
Utilizzare il proxy sempre per un utente
Inserire la variabile nello script di profilo:
vi .bashrc
export http_proxy="http://proxy.example.com:8080" export https_proxy="http://proxy.example.com:8080" export ftp_proxy="http://proxy.example.com:8080"
Utilizzare il proxy sempre System-Wide
- Inserire i parametri in
sudoedit /etc/wgetrc
# You can set the default proxies for Wget to use for http and ftp. # They will override the value in the environment. http_proxy = http://proxy:3128/ https_proxy = http://proxy:3128/ ftp_proxy = http://proxy:3128/ # If you do not want to use proxy at all, set this to off. use_proxy = on