PDA

View Full Version : Getting wget/apt-get to use a proxy?



Matrox
06-11-2004, 07:34 PM
I'm using Knoppix 3.4 05-17 (HD Installed), on a networked computer. My main computer shares internet to the linux computer using a proxy. I can set the web browsers in knoppix to use the proxy, but I wanted to use apt-get update, and I need to tell it to use my proxy settings. Same thing with wget. I was going to use the klik "point-and-klik" software store. And running "wget klik.berlios.de/client/install -O -|sh" fails because I need to be able to tell it to use my proxy. Is there a way I can globally set it up so everything can use my HTTP and FTP proxy?

btw, my proxy settings are:
HTTP: 192.168.0.1:8080
FTP: 192.168.0.1:21
(no user or pass)

Figured I'd mention the addresses so it'd be easier to tell me exactly what to do. Thanks!

Matrox
06-11-2004, 10:48 PM
man... i am just figuring out everything for myself, aren't i?

lol, i figured it out, after *much* searching... and I thought I might as well post my solution so these forums are a wealth of good information!

I added:
export http_proxy=http://192.168.0.1:8080/
export ftp_proxy=$http_proxy

to the end of my /ect/profile

the last "/" after the address is important, so if you use it to fill in your own proxy address, keep it!

hope someone finds this useful!

mzilikazi
06-14-2004, 06:23 PM
wget also has a configuraion file called /etc/wgetrc where you can add this same info. Glad you got it working. :)