使用privoxy+ssh实现共享科学上网

开启端口转发

ssh -D 0.0.0.0:8888 sshuser@sshhostip -N -f

privoxy配置

vim /etc/privoxy/config

# 配置端口
listen-address  0.0.0.0:8090 # 端口为8090
# 配置所有配置转发
forward / 127.0.0.1:8888 .
# 局域网不转发
forward 192.168.*.*/ .
forward 10.*.*.*/ .
forward 127.*.*.*/ . 

开机自动启动privoxy

chkconfig privoxy on
service privoxy start

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

*

code