In the Linux command line interface using the proxy server settings in Internet



This paper describes the Linux command line interface access to the Internet using a proxy server approach.

In the Linux command line interface to use a proxy server online

2007-10-25 kenthy # qingdaonews.com

In the Linux command line interface to use a proxy server Internet - System Environment: Red Hat Enterprise Linux Server release 5 (kernel 2.6.18-8.el5xen)

In the Linux command line interface to use a proxy server Internet - software environment

elinks-0.11.1-5.1.el5

lynx-2.8.5-28.1

wget-1.10.2-7.el5

krb5-workstation-1.5-17

prozilla-2.0.4.tar.bz2 http://prozilla.genesys.ro/downloads/prozilla/tarballs/prozilla-2.0.4.tar.bz2

In the Linux command line interface to use a proxy server Internet - objective function

By specifying a proxy server, the Linux command line interface to access web sites and download software

(For some of the local area network must specify the proxy server to access the forum)

1, Linux command line interface, the general method of proxy settings

1, in the profile file to set environment variables related to

# Vi / etc / profile

http_proxy = http://192.168.20.20:3128 # were specified http, https, ftp protocol uses the proxy server address

https_proxy = http://192.168.20.20:3128

ftp_proxy = http://192.168.20.20:3128

no_proxy = 192.168.20. # to access the LAN address (192.168.20.0/24 network segment) without using a proxy, you can separate multiple addresses with commas

export http_proxy https_proxy ftp_proxy no_proxy

Save exit, and log re-login to take effect.

2, the test results

You can use wget command to download files through a proxy (the following line commands can be recursive download the entire Chinese FreeBSD handbook directory):

# Wget-krp-np http://cnsnap.cn.freebsd.org/doc/zh_CN.GB2312/books/handbook/

You can use elinks to access web site (suitable for text-based terminals to access the English website)

Internet use lynx, the seemingly if the proxy server using Microsoft ISA, not support.

[Added note: Ubuntu 7.10 apt-get to use, are also tested successfully]

Second, the Linux command line interface to use a proxy server Internet: Installation prozilla multi-threaded download tool and proxy settings

1, the installation prozilla

# Wget http://prozilla.genesys.ro/downloads/prozilla/tarballs/prozilla-2.0.4.tar.bz2

# Tar zxvf prozilla-2.0.4.tar.bz2-C / usr / src /

# Cd / usr/src/prozilla-2.0.4

#. / Configure

# Make & & make install

[Error:]

If the compiler Times "download_win.h: 55: error: there are extra limits 'DL_Window::'" error, according to documents prompted to modify the error and then recompile can:

- The source code in / usr/src/prozilla-2.0.4/src/download_win.h Paragraph 55 line, from the original:

void DL_Window:: print_status (download_t backup bin conf config data eshow_sitemap.html generate.sh log maint sitemap.html svn tmp download, int quiet_mode);

Changed to:

void print_status (download_t backup bin conf config data eshow_sitemap.html generate.sh log maint sitemap.html svn tmp download, int quiet_mode);

2, specify the proxy server address

# Vi ~ / .prozilla / prozconfig

httpproxy = 192.168.20.20:3128

httpproxyuser =

httpproxypassword =

httpproxytype = 7

usehttpproxy = 1

ftpproxy = 192.168.20.20:3128

ftpproxyuser =

ftpproxypassword =

ftpproxytype = 7

useftpproxy = 1

3, download the sample (designated 10 concurrent threads to download):

# Proz-k 10 http://prozilla.genesys.ro/downloads/prozilla/tarballs/prozilla-2.0.4.tar.bz2

3, with a reference: Automatic login and download files ftp shell script

1, vi autoftp1.sh

#! / Bin / bash

ftp-iun 192.168.20.20 2121 2> / dev / null / tmp / ftp.txt

ftp-iun
rm-rf / tmp / ftp.txt

These are the Linux command line interface using a proxy server, Internet access, in the hope of help to you.