Article View: cn.comp.hacker
Article #13350ssh socks5 转 http
From: RSS Feed For GFW Blog
Date: Mon, 12 Oct 2009 00:30
Date: Mon, 12 Oct 2009 00:30
91 lines
8365 bytes
8365 bytes
非常感谢热心网友赐稿! 热烈欢迎大家向我们投稿,投稿信箱地址:chinagfwblog(at)[gmail.com][1]。 [1]: http://gmail.com/ 作者:Yunkwan 来源:[http://kwanlife.yo2.cn/articles/ssh-socks5-http.html][2] [2]: http://kwanlife.yo2.cn/articles/ssh-socks5-http.html 低调低调~ 相信不少人像我一样使用ssh socks5来做代理. 一般来说Firefox + Autoproxy,就可以把wall透明掉~ 但是, Chrome呢? Chrome暂时没有Autoproxy. 解决方法是用PAC或全局代理, 但是使用ssh代理的用户会发现~ 咦? 怎么我能上friendfeed, blogspot, wordpress, 却不能上youtube和twitter呢? 因为DNS被劫持了~ 用xmind理清一下思路. [![][3]][3] [3]: https://morphium.info/nph- proxy.cgi/010110A/687474702s646p2r67657464726s70626s782r636s6q2s752s323433383733322s7373685s707269766s78795s687474702s736r617073686s74312r706r67 用socks代理时, 没有把DNS也"代理"了 要避免DNS被劫持~ 我们利用 [Privoxy][4] 把 socks5 转为 http 代理. 下载 [Privoxy][5] [4]: https://morphium.info/nph-proxy.cgi/010110A/687474702s7777772r707269766s78792r6s72672s [5]: https://morphium.info/nph-proxy.cgi/010110A/687474702s736s75726365666s7267652r6r65742s70726s6n656374732s696n627377612s66696p65732s [![][6]][6] [6]: https://morphium.info/nph- proxy.cgi/010110A/687474702s646p2r67657464726s70626s782r636s6q2s752s323433383733322s7373685s707269766s78795s687474702s736r617073686s74322r706r67 Privoxy 默认转出的端口是 8118 安装过程就省略了. Windows 用户 就一路 "Next" 吧~ Ubuntu 就 sudo apt-get install privoxy (Karmic 是 3.0.13版本) ================= 以下是配置过程 ===================== =================== For Linux ====================== 用你最喜爱的编辑器打开 /etc/privoxy/config 假设你没有曾经动过这个配置文件的前提下, 在最后加上 > forward-socks5 / [127.0.0.1:7070][7] . [7]: http://127.0.0.1:7070 请大家手动输入吧~ 复制粘贴有出错可能 (我在设置时候, 使用复制粘贴的方式就遇到了问题.) 不要漏了最后一个点 " . " 重启Privoxy : sudo /etc/init.d/privoxy restart 不同发行版本略有不同. 然后, 在代理设置的地方设置为 HTTP类型 地址: 127.0.0.1 端口: 8118 (Privoxy默认) 这是再打开Chrome, Youtube 立即能上了~ (当然这只是全局代理的方法) ================= For Windows =========================== 首先运行 Privoxy [![][8]][8] [8]: https://morphium.info/nph- proxy.cgi/010110A/68747470732s646p2r67657464726s70626s782r636s6q2s752s323433383733322s7373685s707269766s78795s687474702s43617074757265382r504r47 看到系统托盘里出现了就是正在运行了~ 双击Privoxy托盘图标, 弹出了一个框~ 点击菜单栏的 Option ----> Main Configuration ------> 就会自动用记事本打开了 Privoxy 的 配置文件 在最后加上 > forward-socks5 / [127.0.0.1:7070][9] . [9]: http://127.0.0.1:7070 请大家手动输入吧~ 复制粘贴有出错可能 (我在设置时候, 使用复制粘贴的方式就遇到了问题.) 不要漏了最后一个点 " . " 保存后, 就重启 Privoxy . 方法是把 Privoxy 退出了. (就是在托盘处看不到了) 然后,重新运行. 点击Chrome的代理设置, 弹出 [![][10]][10] [10]: https://morphium.info/nph- proxy.cgi/010110A/68747470732s646p2r67657464726s70626s782r636s6q2s752s323433383733322s7373685s707269766s78795s687474702s436170747572652r504r47 [![][11]][11] [11]: https://morphium.info/nph- proxy.cgi/010110A/68747470732s646p2r67657464726s70626s782r636s6q2s752s323433383733322s7373685s707269766s78795s687474702s43617074757265322r504r47 点击 LAN settings [![][12]][12] [12]: https://morphium.info/nph- proxy.cgi/010110A/68747470732s646p2r67657464726s70626s782r636s6q2s752s323433383733322s7373685s707269766s78795s687474702s43617074757265332r504r47 点击 "Advanced" [![][13]][13] [13]: https://morphium.info/nph- proxy.cgi/010110A/68747470732s646p2r67657464726s70626s782r636s6q2s752s323433383733322s7373685s707269766s78795s687474702s43617074757265342r504r47 选上 "Use the same proxy server for all protocols" 然后一路ok返回 Chrome 发现youtube能上了! (这当然也是全局代理) ======================================================================= 要像达到Firefox + AutoProxy的效果, 我们用 Chrome + PAC ===================== 使用PAC ======================== 用PAC的话,可以使用 [Autoproxy2PAC][14][ ][15]来生成. (坏消息是appspot在101假期后,被wall了,大家要先翻过去才能进入) [14]: http://goog_1255303738296 [15]: https://autoproxy2pac.appspot.com/ 选择 Privoxy + SOCKS 然后就自动生成一份新鲜&热乎乎的PAC, 和Firefox的Autoproxy一样的. 保存好后, 把文件的路径输入到 Use proxy configuration URL 中 对于Linuxer 桌面用户, 直接输入路径可以 不需要 file:/// 前置 对于Vista和Win7 用户, 直接用 C:\xxx\ 对于XP用户, 我没有环境试验 C:\xxx\ 这个格式是否可行. 但是用 file:/// 就肯定可以走遍天下. file:/// 如果 三个 斜杠不行的话, 就减少一个斜杠 file:// 非常感谢 [@mengxl][16] 的帮助 [16]: https://twitter.com/mengxl Follow me? [@Yunkwan][17] [17]: https://twitter.com/Yunkwan 如果喜欢请低调低调~~ Thank you~ 敬请订阅我们:http://feeds2.feedburner.com/chinagfwblog,在twitter跟随我们:http://twitter.com/cdt。翻墙工具介绍和下载:http://www.sesawe.org/和http://www.sesawwe.net/。![][18] [18]: https://blogger.googleusercontent.com/tracker/5500297126185736776-5198977974934163345?l=www.chinagfw.org Contentes HTML URL: http://www.chinagfw.org/2009/10/ssh-socks5-http.html Send By Feed RSS2eMail BOT V2.65 Admin By Liuxing99
Technical Details
Message-ID:
<4ad2bdb0$1@news.liuxing99.3322.org>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder.news-service.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!61.160.212.82.MISMATCH!www.shinco.com!news.liuxing99.3322.org!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 85629cb6ee,5f661ec74d8b02f7,start X-Google-Attributes: gid85629cb6ee,public,usenet X-Google-NewGroupId: yes X-Google-Language: Chinese,GB Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder.news-service.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!61.160.212.82.MISMATCH!www.shinco.com!news.liuxing99.3322.org!not-for-mail From: RSS Feed For GFW Blog <gfwblog-list@szb66.vicp.net> Newsgroups: cn.comp.hacker Subject: ssh socks5 转 http Date: Mon, 12 Oct 2009 00:30:00 -0000 Organization: A poorly-installed InterNetNews site Lines: 91 Message-ID: <4ad2bdb0$1@news.liuxing99.3322.org> NNTP-Posting-Host: 58.208.6.107 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 X-Trace: www.shinco.com 1255325165 22655 58.208.6.107 (12 Oct 2009 05:26:05 GMT) X-Complaints-To: news@www.shinco.com NNTP-Posting-Date: Mon, 12 Oct 2009 05:26:05 +0000 (UTC) Received-Path: <gfwblog-list@szb66.vicp.net> X-Feed-By: news.liuxing99.3322.org User-Agent: Feed RSS2eMail BOT V2.65 X-Gateway-Administrator: bianlule@bianlule.3322.org X-Gateway-From: dnews-gateway@news.liuxing99.3322.org