2010年8月23日星期一

ssh tunnel proxy under your plam pre plus

脑残方法

first you should create a proxy like this
ssh -L 80:www.youtube.com:80 -N user@proxyhost

then,edit your hosts like that
127.0.0.1   www.youtube.com

now,open your browser in your pre,vist www.youtube.com.

进阶方法

无错。我终于搞好了。

apt-get install privoxy

vi /etc/privoxy/config
forward-socks5 / 127.0.0.1:7070 .
listen-address  127.0.0.1:8118
accept-intercepted-requests 1

vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1

/etc/init.d/privoxy restart

ssh -D 7070 -N user@remotehost

iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8118


用完记得:

iptables -t nat -F

/etc/init.d/privoxy stop

有图有真相



后续.....
考虑移植到webos下,脱离ubuntu
default.filter
user.action
default.action
match-all.action
config
privoxy

privoxy依赖apt-get install libpcre3

2 条评论:

  1. It sounds like you're creating problems yourself by trying to solve this issue instead of looking at why
    their is a problem in the first place

    回复删除
  2. 要是能打包成ipk的客户端就好了,连SSh加代理变更。花钱都愿意

    回复删除