apt-get through socks5 proxy

Enable temporary proxy for apt-get by editing (create it if not exist /etc/apt/apt.conf  and add the line (change username, password, host and port):

Acquire::http::Proxy "http://uname:upwd@yourhost:port/";

Install the tsocks application:

sudo apt-get install tsocks

Remove the line added in the step before from from /etc/apt/apt.conf

Edit the /etc/socks.conf  file and change the default server to the IP address of your socks server (a domain name does not work!); if applicable also change the port number for your socks connection.

Now to use this new socks proxy go ahead and execute:

sudo tsocks apt-get update

Even though you have removed the proxy settings from the /etc/apt/apt.conf  file this should still update your apt list.

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *