在樹莓派上使用MEOW(COW)代理局域網設備分流穿墻
想法
更新了Android5.1,我的機子出現了奇怪的問題。挂著的ss經常會被清理後臺給切斷。如果用fqrouter,效率也很低下。便想著在Raspberry上面部署一個客戶端,用來轉發數據包。恰好就發現了COW和MEOW。
不是那麽準確的示意圖

COW和MEOW簡介
COW (Climb Over the Wall) proxy
COW is a HTTP proxy to simplify bypassing the great firewall. It tries to automatically identify blocked websites and only use parent proxy for those sites.
Features
- As a HTTP proxy, can be used by mobile devices
- Supports HTTP, SOCKS5, shadowsocks and COW itself as parent proxy
- Supports simple load balancing between multiple parent proxies
- Automatically identify blocked websites, only use parent proxy for those sites
- Generate and serve PAC file for browser to bypass COW for best performance
- Contain domains that can be directly accessed (recorded accoring to your visit history)
然而作者已經六個月沒有提交新的commit了,不禁讓人與clowwindy的事件關聯起來
另一位fork了一份代碼并且獨立開發了一個新的分支MEOW,在運行方式上做了一些改動,使用了“Whitelist mode”
/\
) ( ') MEOW 是 [COW](https://github.com/cyfdecyf/cow) 的一个派生版本
( / ) MEOW 与 COW 最大的不同之处在于,COW 采用黑名单模式, 而 MEOW 采用白名单模式
\(__)| 国内网站直接连接,其他的网站使用代理连接
安裝方法
OS X, Linux: 执行以下命令(也可用于更新)
curl -L git.io/meowproxy | bash环境变量
MEOW_INSTALLDIR可以指定安装的路径,若该环境变量不是目录则询问用户- Windows: 下载地址
- 从源码安装: 安装 Go,然后
go get github.com/renzhn/MEOW
以上來自README.md
安裝過程中遇到的問題和解決方法
因爲移動特製的墻,無法下載文件!
報錯信息:
curl: (35) Unknown SSL protocol error in connection to raw.githubusercontent.com:443
這個問題一開始很讓我頭疼。後來我在遠程的服務器部署了另一個http代理。
sudo vi /etc/profile
添加
http_proxy="http://username:passwd@remoteServer:port"
export http_proxy
更新環境變量
source /etc/profile
之後,用
curl ip.cn
查看ip地址,發現代理成功。然後用樹莓派連接上去。結果發現還是存在這個問題。
原來curl并不會通過系統全局http代理訪問。需要在curl同時增加參數。
先將安裝脚本拷貝下來
curl git.io/meowproxy -O install.sh
vi install.sh
替換裏面的所有curl爲
curl -x remoteServer:port
就能夠正確安裝了。
配置教程
配置教程詳見 https://github.com/renzhn/MEOW/blob/master/README.md
這裏就不浪費版面了。