个人工具

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

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/Polipo}} {{Languages|UbuntuHelp:Polipo}} Someone rightly pointed out that i didn't say what the point of the proxy is - <br>A caching proxy can be...)
 
第3行: 第3行:
 
Someone rightly pointed out that i didn't say what the point of the proxy is -
 
Someone rightly pointed out that i didn't say what the point of the proxy is -
 
<br>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.
 
<br>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:
 
Polipo even has this funky little option for you:
 
<br># Uncomment this if you have no network:
 
<br># Uncomment this if you have no network:
 
<br># proxyOffline = yes
 
<br># proxyOffline = yes
 
<br>Offline mode!
 
<br>Offline mode!
 
 
== Installing and setting up polipo ==
 
== Installing and setting up polipo ==
 
 
Misc notes:
 
Misc notes:
 
 
When I say "vi", feel free to use any other editor instead (such as emacs or nano). For a GUI editor, run gksu gedit or kdesu kate.
 
When I say "vi", feel free to use any other editor instead (such as emacs or nano). For a GUI editor, run gksu gedit or kdesu 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).
 
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).
 
 
=== Lets get started ===
 
=== 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).
 
First, start out by making sure you have universe enabled, up to date package lists and downloading the polipo package (it has no dependancies).
 
<pre><nowiki>
 
<pre><nowiki>
第24行: 第17行:
 
sudo apt-get install polipo
 
sudo apt-get install polipo
 
</nowiki></pre>
 
</nowiki></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 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 :).
 
Now I'm going to list the required changes to the config file - all 2 of them!. Remember to customise these as required :).
 
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.
 
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.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
 
# Add your proxy's address
 
# 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
 
allowedClients = 192.168.0.0/24
 
allowedClients = 192.168.0.0/24
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Restart the service, and we are done!
 
Restart the service, and we are done!
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/polipo restart
 
sudo /etc/init.d/polipo restart
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
=== Now for client config! ===
 
=== Now for client config! ===
 
 
==== First things first - APT. ====
 
==== First things first - APT. ====
 
This one is stupidly easy -
 
This one is stupidly easy -
第53行: 第37行:
 
sudo vi /etc/apt/apt.conf
 
sudo vi /etc/apt/apt.conf
 
</nowiki></pre>
 
</nowiki></pre>
 
 
In the file, add
 
In the file, add
 
<pre><nowiki>
 
<pre><nowiki>
第59行: 第42行:
 
</nowiki></pre>
 
</nowiki></pre>
 
as the only line.
 
as the only line.
 
 
==== Firefox: ====
 
==== Firefox: ====
 
Open the browser, click Edit -> Preferences.
 
Open the browser, click Edit -> Preferences.
第67行: 第49行:
 
</nowiki></pre>
 
</nowiki></pre>
 
PS, if you go and [[UbuntuHelp:Privoxy| set up privoxy]] as well, this port is changed. One step at a time though!
 
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 -> Preferences -> network proxy.
 
Click System -> Preferences -> network proxy.

2007年11月30日 (五) 21:03的版本


Someone rightly pointed out that i didn't say what the point of the proxy is -
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 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:
# Uncomment this if you have no network:
# proxyOffline = yes
Offline mode!

Installing and setting up 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 gksu gedit or kdesu 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).

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).

sudo apt-get update
sudo apt-get install polipo

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 :). 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.

# Add your proxy's address
proxyAddress = 192.168.0.1
# Allow from anyone in the 192.168.0.* range to connect to your proxy
allowedClients = 192.168.0.0/24

Restart the service, and we are done!

sudo /etc/init.d/polipo restart

Now for client config!

First things first - APT.

This one is stupidly easy - Open a terminal, and type the following (it creates a blank file)

sudo vi /etc/apt/apt.conf

In the file, add

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

as the only line.

Firefox:

Open the browser, click Edit -> Preferences. Click the 'connection settings' button, and click on 'manual proxy configuration'. In the top field add the following:

HTTP Proxy:    192.168.0.1        Port:    8123

PS, if you go and set up privoxy as well, this port is changed. One step at a time though!

GNOME:

Click System -> Preferences -> network proxy. Click Manual proxy configuration, and put in the same details as above :

HTTP Proxy:    192.168.0.1        Port:    8123

Log out and in to apply GNOME settings, and your done!