
linux polipo
Polipo was the best HTTP proxy when it emerged. Since then web behavior has a lot changed and HTTPS became popular. HTTPS prevents intermediates to read traffic and cache them. Polipo is not maintained currently but useful for different cases.
Polipo出现时是最好的HTTP代理。 从那时起,网络行为发生了很大变化,HTTPS变得流行。 HTTPS阻止中介读取流量并对其进行缓存。 目前不维护Polipo,但对于不同情况有用。
为Ubuntu,Debian,Mint,Kali安装 (Install For Ubuntu, Debian, Mint, Kali)
We can install polipo for Ubuntu, Debian, Mint, Kali with the apt-get
command like below.
我们可以使用如下所示的apt-get
命令为Ubuntu,Debian,Mint,Kali安装polipo。
$ sudo apt-get install polipo

为Ubuntu,Debian,Mint,Kali安装(Install For Ubuntu, Debian, Mint, Kali)
We can also install polipo
web cache proxy with the yum
command like below.
我们还可以使用yum
命令安装polipo
Web缓存代理,如下所示。
$ yum install polipo
配置文件 (Configuration File)
Polipo configuration file is stored in the /etc/polipo/polipo
. We will use this configuration file in order to change the configuration. We can set configuration like Proxy Address, Allowed Clients, Log etc.
Polipo配置文件存储在/etc/polipo/polipo
。 我们将使用此配置文件来更改配置。 我们可以设置代理地址,允许的客户端,日志等配置。

列出配置选项(List Configuration Options)
There are a lot of configuration options supported by the polipo. We can list the options with the -v
option to the polipo
command like below. Interestingly this option requires root privileges which is provided by sudo in the following example.
polipo支持许多配置选项。 我们可以在polipo
命令中使用-v
选项列出这些选项,如下所示。 有趣的是,此选项需要sudo在以下示例中提供的root特权。
$ sudo polipo -v

设置代理地址(Set Proxy Address)
By default, the proxy will listen for local proxy connections. We can enable polipo to listen given IP address for network-wide proxy connection. We will use proxyAddress
configuration and provide a network interface IP address for this into /etc/polipo/polipo
configuration file. Polipo will listen port TCP 8123 by default.
默认情况下,代理将侦听本地代理连接。 我们可以使polipo侦听给定IP地址以进行网络范围的代理连接。 我们将使用proxyAddress
配置,并为此在/etc/polipo/polipo
配置文件中提供一个网络接口IP地址。 默认情况下,Polipo将侦听TCP 8123端口。
proxyAddress = 192.168.122
设置允许的客户 (Set Allowed Clients)
We can allow or deny the client those can connect to our polipo proxy. We will use allowedClients
option. We can provide the network address in a CIDR format or client range with a dash.
我们可以允许或拒绝那些可以连接到我们的polipo代理的客户。 我们将使用allowedClients
选项。 我们可以提供CIDR格式的网络地址或带破折号的客户范围。
allowedClients=192.168.122.0/24
OR we can use asterisk *
to specify the whole network address range
或者我们可以使用星号*
指定整个网络地址范围
allowedClients=192.168.122.*
We can also use asterisk for network number part like below.
我们也可以对网络号部分使用星号,如下所示。
allowedClients=192.168.*.*
显示Polipo服务状态 (Display Polipo Service Status)
We can use systemctl
command to list polipo service status like below.
我们可以使用systemctl
命令列出polipo服务状态,如下所示。
$ sudo systemctl status polipo

重新启动服务以重新加载配置(Restart Service to Reload Configuration)
After making some configuration change in the /etc/polipo/polipo
we need to restart the polipo proxy service to make these changes effect. We will use systemctl
command like below which will restart polipo and reload the configuration.
在/etc/polipo/polipo
进行一些配置更改后,我们需要重新启动polipo代理服务以使这些更改生效。 我们将使用如下所示的systemctl
命令,它将重新启动polipo并重新加载配置。
$ sudo systemctl restart polipo
Apt命令的客户端配置示例 (Example Client Config For Apt Command)
There are a lot of applications which can use proxy to connect internet. Apt command can be used with a proxy configuration. We can configuration Apt with the following line to connect a proxy like polipo.
有很多可以使用代理连接互联网的应用程序。 Apt命令可以与代理配置一起使用。 我们可以在下面的行中配置Apt以连接类似于polipo的代理。
Acquire::http::Proxy "http://192.168.0.1:8123";
Firefox的客户端配置示例 (Example Client Config For Firefox)
We can also configure Firefox browser in order to use polipo proxy server where port number is TCP 8123. Open following configuration Edit
->Preferences
->Connection Settings
->Maual Proxy Configuration
我们还可以配置Firefox浏览器以使用端口号为TCP 8123的polipo代理服务器。打开以下配置Edit
-> Preferences
-> Connection Settings
-> Maual Proxy Configuration

翻译自: https://www.poftut.com/how-to-install-and-config-polipo-caching-web-proxy-on-linux/
linux polipo