个人工具

“UbuntuHelp:Polipo/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(创建新页面为 '{{Translation}}{{From|https://help.ubuntu.com/community/Polipo}} {{Translator|fei3ban}}{{Languages|UbuntuHelp:Polipo}} Someone rightly pointed out that i didn't say what the p...')
 
 
(未显示同一用户的4个中间版本)
第1行: 第1行:
{{Translation}}{{From|https://help.ubuntu.com/community/Polipo}} {{Translator|fei3ban}}{{Languages|UbuntuHelp:Polipo}}  
+
{{From|https://help.ubuntu.com/community/Polipo}} {{Translator|fei3ban}}{{Languages|UbuntuHelp:Polipo}}  
  
Someone rightly pointed out that i didn't say what the point of the proxy is - &lt;<br>&gt;A caching proxy can be useful for slow or high latency connections, allowing you to download a file once, but view it multiple times. The images that make up a websites UI, or advertising (unless you [[UbuntuHelp:Privoxy|remove it]]) all takes bandwidth to download. In the case of Advertising, for no benefit to you. Polipo even has this funky little option for you: &lt;<br>&gt;# Uncomment this if you have no network: &lt;<br>&gt;# proxyOffline = yes &lt;<br>&gt;Offline mode!
+
一个缓存代理对于缓慢或高延迟的连接是很有用的,让你一次下载文件,但可以浏览多次。比如一个网站用户界面或广告(除非您将其删除)需要占用很多带宽下载。在广告多的情况下没有好处。polipo可以给你有用的选择:<br>“离线模式!
  
== Installing and setting up polipo ==
+
== 安装设置polipo ==
  
Misc notes: When I say "vi", feel free to use any other editor instead (such as emacs or nano). For a GUI editor, run gksudo gedit or kdesudo kate. This assumes your setting polipo up for use on a gateway- if your setting it up on a stand alone pc, change all references to `192.168.0.1` to your loopback ip, or your ethernet ports ip (either will work).  
+
注意:下列设置是假定你设置polipo在一个网关上面,如果你是在一台单独的电脑上,改变设置参数'192.168.0.1'为你的loopback地址,或者你的以太网地址,2者都可以工作.<br>
  
=== Lets get started ===
+
=== 让我们开始 ===
  
First, start out by making sure you have universe enabled, up to date package lists and downloading the polipo package (it has no dependancies).  
+
首先,确认你已设置允许下载universe包列表的选项,下载polipo.  
 
<pre>sudo apt-get update
 
<pre>sudo apt-get update
 
sudo apt-get install polipo
 
sudo apt-get install polipo
 
</pre>  
 
</pre>  
Now to edit the polipo config file. This is found in `/etc/polipo/config`, and by default is the only file there to configure. Now I'm going to list the required changes to the config file - all 2 of them!. Remember to customise these as required&nbsp;:). Its also worth noting that theres lots of other options to play with, and you should feel free. these are just the 2 you need to change to get going.
+
下载后开始编辑poplip的设置文件.位置在`/etc/polipo/config`,只有2个地方需要设置:所以你应该觉得很高兴:) <br>
<pre># Add your proxy's address
+
<pre># Add your proxy's address/加上你代理的地址
 
proxyAddress = 192.168.0.1
 
proxyAddress = 192.168.0.1
  
# Allow from anyone in the 192.168.0.* range to connect to your proxy
+
# Allow from anyone in the 192.168.0.* range to connect to your proxy/允许192.168.0.*范围内ip联入你的代理.
 
allowedClients = 192.168.0.0/24
 
allowedClients = 192.168.0.0/24
 
</pre>  
 
</pre>  
Restart the service, and we are done!  
+
重启服务,完成!  
 
<pre>sudo /etc/init.d/polipo restart
 
<pre>sudo /etc/init.d/polipo restart
 
</pre>  
 
</pre>  
=== Now for client config! ===
+
=== 现在进行客户端设置 ===
  
==== First things first - APT. ====
+
==== &nbsp;APT: ====
  
This one is stupidly easy - Open a terminal, and type the following (it creates a blank file)
+
非常的简单-打开终端
 
<pre>sudo vi /etc/apt/apt.conf
 
<pre>sudo vi /etc/apt/apt.conf
 
</pre>  
 
</pre>  
In the file, add
+
在这个文件里面加上,就一行.
<pre>Acquire::http::Proxy "http://192.168.0.1:8123";
+
<pre>Acquire::http::Proxy "http://192.168.0.1:8123"</pre>  
</pre>  
+
as the only line.
+
 
+
 
==== Firefox:  ====
 
==== Firefox:  ====
  
Open the browser, click Edit -&gt; Preferences. Click the 'connection settings' button, and click on 'manual proxy configuration'. In the top field add the following:  
+
打开浏览器点击编辑-&gt;选项.点连网设置 ,手动设置代理:  
 
<pre>HTTP Proxy:    192.168.0.1        Port:    8123
 
<pre>HTTP Proxy:    192.168.0.1        Port:    8123
 
</pre>  
 
</pre>  
PS, if you go and [[UbuntuHelp:Privoxy|set up privoxy]] as well, this port is changed. One step at a time though!
 
 
 
==== GNOME:  ====
 
==== GNOME:  ====
  
Click System -&gt; Preferences -&gt; network proxy. Click Manual proxy configuration, and put in the same details as above&nbsp;:  
+
打开系统-&gt; 选项 -&gt; 网络代理. 点击手动设置代理:  
 
<pre>HTTP Proxy:    192.168.0.1        Port:    8123
 
<pre>HTTP Proxy:    192.168.0.1        Port:    8123
 
</pre>  
 
</pre>  
Log out and in to apply GNOME settings, and your done!  
+
登出gnome,重新进入,设置完成!  
  
 
----
 
----
  
 
[[Category:UbuntuHelp]]
 
[[Category:UbuntuHelp]]

2009年12月10日 (四) 12:49的最新版本


一个缓存代理对于缓慢或高延迟的连接是很有用的,让你一次下载文件,但可以浏览多次。比如一个网站用户界面或广告(除非您将其删除)需要占用很多带宽下载。在广告多的情况下没有好处。polipo可以给你有用的选择:
“离线模式!

安装设置polipo

注意:下列设置是假定你设置polipo在一个网关上面,如果你是在一台单独的电脑上,改变设置参数'192.168.0.1'为你的loopback地址,或者你的以太网地址,2者都可以工作.

让我们开始

首先,确认你已设置允许下载universe包列表的选项,下载polipo.

sudo apt-get update
sudo apt-get install polipo

下载后开始编辑poplip的设置文件.位置在`/etc/polipo/config`,只有2个地方需要设置:所以你应该觉得很高兴:)

# Add your proxy's address/加上你代理的地址
proxyAddress = 192.168.0.1

# Allow from anyone in the 192.168.0.* range to connect to your proxy/允许192.168.0.*范围内ip联入你的代理.
allowedClients = 192.168.0.0/24

重启服务,完成!

sudo /etc/init.d/polipo restart

现在进行客户端设置

 APT:

非常的简单-打开终端

sudo vi /etc/apt/apt.conf

在这个文件里面加上,就一行.

Acquire::http::Proxy "http://192.168.0.1:8123"

Firefox:

打开浏览器点击编辑->选项.点连网设置 ,手动设置代理:

HTTP Proxy:    192.168.0.1        Port:    8123

GNOME:

打开系统-> 选项 -> 网络代理. 点击手动设置代理:

HTTP Proxy:    192.168.0.1        Port:    8123

登出gnome,重新进入,设置完成!