Tsocks-using apt-get with socks proxy

From GluCki
Jump to: navigation, search

Introduction

Sometimes we are using socks proxy but can't use apt-get through terminal...!! What to do..?? Here is something you can use-TSOCKS.

Installing tsocks

As obvious we should use the command : For Ubuntu :

sudo apt-get install tsocks

For Fedora :

sudo yum install tsocks

OR else you can easily download the .deb file from here and then use

dpkg -i filename.deb

to install tsocks.

Configure tsocks

the config file of tsocks is stored at /etc/tsocks.conf . At the end of tsocks.conf, there is SOCKS proxy information in 3 options: server, server_type and server_port.

   # Otherwise we use the server
   server = 127.0.0.1
   # Server type defaults to 4 so we need to specify it as 5 for this one
   server_type = 5
   # The port defaults to 1080 but I’ve stated it here for clarity
   server_port = 3128(or any port you are using)

Using tsocks

Now you are ready to use tsocks.Just type

sudo tsocks apt-get update

or just use tsocks before any command to get it installed or updated using socks proxy.