Build an HTTP Proxy Server Based on TinyProxy

Source: Internet
Author: User

Build an HTTP Proxy Server Based on TinyProxy I. Preface I don't need to talk about why I want to play with the HTTP proxy. 2. Build the Environment * Linux laptop 2.6.32-45-generic # 100-Ubuntu SMP Wed Nov 14 10:41:11 UTC 2012 i686 GNU/Linux * tinyproxy 1.8.1 3. Installation Method $ sudo apt-get install tinyproxy then, the tinyproxy service is automatically enabled with the root permission, the default listening port is 8888. 4. Start help $ tinyproxy -- help Usage: tinyproxy [options] Options are:-d Do not daemonize (run in foreground ). -c FILE Use an alternate configuration file. -h Display this usage information. -l Display the li Cense. -v Display version information. 5. Root User's startup Method * default start $ sudo service tinyproxy start * restart $ sudo service tinyproxy restart * stop $ sudo service tinyproxy stop 6. DIY configuration 4.1 Default Configuration File Location/etc /tinyproxy. conf (from/etc/init. d/tinyproxy found in the package script) 4.2 default configuration Description * when starting with the root user, switch uid/gid to nobody/nogroup * Port after initialization. The default listening Port is 8888 (this Port does not need to be bound with the root permission) * listens to * Logfile (required) on the NIC by default) log File. Default Value:/usr/var/log/tinyproxy. log, In the LogFi If the le file does not exist, the system will warn you that it will not fail to run. * Pidfile (required) pid file. The default value is/usr/var/run/tinyproxy. pid. If the PidFile does not exist, the operation fails. * StartServers: the initial sub-process of the proxy server (10 by default) *** Allow allows tinyproxy to be used for the IP address of the HTTP proxy. The default value is 127.0.0.1. If you want to publish the tinyproxy server, comment out the Allow line. 4.3 Diy configuration instructions tinyproxy can run with common user permissions, as long as the listening port is public. The specific Diy configuration method is as follows: -- package the executable program and default configuration file -- 1. $ which tinyproxy/usr/sbin/tinyproxy 2. $ cp/usr/sbin/tinyproxy ~ /Bin 3. $ cp/etc/tinyproxy. conf ~ /Etc -- modify configuration -- 1. change the default Port 8888 to the desired Port (for example, the 8990 TCP Port above ljysrv) 2. comment out Allow 127.0.0.1 3. change Logfile to/tmp/tinyproxy. log 4. change PidFile to/tmp/tinyproxy. pid -- start -- 1. $ cd ~ /Bin 2. $./tinyproxy-c ~ /Etc/tinyproxy. conf -- disable -- 1. $ killall tinyproxy

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.