How to make your Linux applications use proxy

Hi,

If you are frustrated by Linux and your college’s network, which is windows based or sysadmins can help you with windows only, and sysadmins for a request call, replies as “use Windows”. If you are in a university then I am sure they use that damned( or good) software called as proxy (squid proxy to be specific). And you are a linux newbie then, here are some quick tips for you.

TIP # 1

You want your download manager (wget), updates by apt or aptitude to use a http proxy, you can type

export http_proxy=http://user:password@proxy:port/

or

export http_proxy=http://proxy:port/

Things to note here are

  • Type the command as it is, don’t leave unnecessary spaces.
  • Username/password is the username and password you use to access the proxy, that is the same password which you type when you access internet using a web-browser. If you don’t use one, then use the second version of the command
  • Proxy and port are the values that are the same as used in your web-browser, or you can ask check them out with your sysadmin, or anyone who has a working internet on the same network.

After you do this you can use apt or aptitude and it will use the http proxy you specified!


TIP # 2
For GNOME users : GNOME allows users to specify a proxy from a GUI, which you can find in

Preferences –> Network Proxy

It also allows you to specify username/password, by clicking on “Details”


TIP # 3
Using socks proxy with evolution (the e-mail client)You need a package named tsocks

sudo apt-get install tsocks

for Ubuntu users

or you can download it from here, http://tsocks.sourceforge.net

then just type

tsocks evolution

you might want to read the man page for configurations too.

So, that’s it. I hope it makes your life a little easier with Linux on network. Tell us about your experiences of using Linux behind proxies. Remember google search is your best resource!

DarK is a Linux newbie who is frustrated by network admins across India. His recent project is installing Linux-from-scratch. He is the How to’s master here!

Share this post :

5 comments so far

  1. Mehmood Ahmed on

    please send me full details how i install a proxy and which package to install proxy,
    please send me full details with commands

  2. DarK on

    @mehmood : this article is not about installing proxies, it’s about using them, if you want to install proxies, then you probably need to look into squid proxy for linux systems.

  3. Fractious on

    Somehow i missed the point. Probably lost in translation 🙂 Anyway … nice blog to visit.

    cheers, Fractious.

  4. VPC on

    Does tips 1 & 2 work for non-gnome and non-wget applications like ssh and so?
    As my network connection is not good I have configured squid, but I want to use it for all conections (except local ones) but I don’t know if it’s being used or not …

    Thanks.
    Regards,

    Victor.

  5. brett on

    i havent gotten this to work for ssh or any command line commands, however putty makes a version for linux that you can configure to use a proxy. putty is a SSH client


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: