Tinyproxy builds HTTP proxy

  

I. Preface

I don’t need to say more about why I want to play HTTP proxy.

Second, build environment

* Linux Ubuntu

* tinyproxy

Three, installation method

$sudo apt-get install tinyproxy After installation, the tinyproxy service is automatically enabled with root privileges, and the default listening port is 8888

IV. Startup Help

$tinyproxy –help Usage: tinyproxy [options] Options are: -d Do -h FILE Use an alternate configuration file. -h Display this usage information. -l Display the license. -v Display version information.

V. Root User Startup Method< Br>

* Default startup $sudo service tinyproxy start * Restart $sudo service tinyproxy restart * Stop $sudo service tinyproxy stop

VI, DIY configuration

4.1 Default configuration file location

/etc/tinyproxy.conf

(can be found in the /etc/init.d/tinyproxy wrapper script)

4.2 Default Configuration Instructions

* When starting with the root user, switch uid/gid to nobody/nogroup after initialization is complete. * Port default listening port is 8888 (this port does not need to be bound with root privileges) * Default is in Listen on the network card * Logfile (required) log file, default /usr/var/log/tinyproxy/tinyproxy.log, will warn when the LogFile file does not exist, will not run failure. * Pidfile (required) pid file, default /usr/var/run/tinyproxy/tinyproxy.pid, will fail if the PidFile file does not exist. * StartServers Initially started proxy server child process (default is 10) *** Allow Allows the use of tinyproxy for the IP address of the HTTP proxy. The default is 127.0.0.1. If you want to expose the tinyproxy proxy server, comment out the Allow line.

4.3 Diy Configuration Instructions

tinyproxy can be run with normal user rights, as long as the listening port is public. The specific Diy configuration method is as follows: — package 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 the configuration — 1. Change the default 8888 of the port to the port you want (such as the 8990 TCP port on ljysrv) 2. Comment out the Allow 127.0.0.1 3. Change the Logfile to /Tmp/tinyproxy.log 4. Change PidFile to /tmp/tinyproxy.pid — Start — 1. $cd ~/bin 2. $./tinyproxy -c ~/etc/tinyproxy.conf — Close — 1 $killall tinyproxy

Copyright © Windows knowledge All Rights Reserved