Chinaunix首页 | 论坛 | 博客
  • 博客访问: 166877
  • 博文数量: 47
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 466
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-31 23:12
个人简介

知乎:http://www.zhihu.com/people/chanpinjinglizhilu

文章分类

全部博文(47)

分类: 其他平台

2016-01-14 14:18:58

(1) 安装Shadowsocks和Chrome

brew install shadowsocks-libev
brew cask install google-chrome 

(2) 安装Chrome插件Proxy SwitchySharp

https://chrome.google.com/webstore/detail/proxy-switchysharp/dpplabbmogkhghncfbfdeeokoefdjegm 


(3) 配置

emacs /usr/local/etc/shadowsocks-libev.json

修改下面的配置
 { "server":"", "server_port":, "local_port":, "password":"", "timeout":600, "method":"aes-256-cfb" }

服务器请到https://get发邮件获取,配置完成后是如下:
 { "server":"hongxchen.github.io", "server_port":1080, "local_port":8104, "password":"abc", "timeout":600, "method":"aes-256-cfb" }
 注意:method字段一定要小写 

(4) 配置Proxy SwitchySharp

1. 添加新的的配置New Profile 2. Profile Name:Shadowsocks 3. 选择Manual Configuration 4. 在SOCKS Host中填入127.0.0.1和shadowsocks-libev.json中设置的local_port,如8104。HTTP Proxy,HTTPS Proxy,FTP Proxy空着不填。 5. 选择SOCKS v5 6. 切换到 Switch Rules 7. 勾选Enable Switch Rules 8. 勾选Online Rule List,在Rule List URL中填入**list.googlecode.com/svn/trunk/**list.txt,Proxy Profile选择Shadowsocks 9. 勾选AutoProxy Compatible List 

(5) 测试

终端执行
/usr/local/opt/shadowsocks-libev/bin/ss-local -c /usr/local/etc/shadowsocks-libev.json

打开Chrome,Proxy SwitchySharp选择Auto Switch Mode
打开www.youtube.com等被墙网站,如果不能打开则https://get发邮件获取其他服务的的配置 

(6) 开机启动

Ctrl+C关闭在终端中打开执行的ss-local

制作/usr/local/opt/shadowsocks-libev/homebrew.mxcl.shadowsocks-libev.plist文件的软连接到~/Library/LaunchAgents
% ln -s /usr/local/opt/shadowsocks-libev/homebrew.mxcl.shadowsocks-libev.plist ~/Library/LaunchAgents/homebrew.mxcl.shadowsocks-libev.plist 

(7) 加载配置文件

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.shadowsocks-libev.plist ** 卸载为launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.shadowsocks-libev.plist 

(8) 完成

到此配置完成,以后开机打开Chrome就能够翻出墙外,.shadowsocks.net/get提供的服务器在一段时间后可能不能连接,只需关闭服务在shadowsocks-libev.json文件中写入新的配置项,重新启动服务就行了。

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.shadowsocks-libev.plist emacs /usr/local/etc/shadowsocks-libev.json launchctl load ~/Library/LaunchAgents/homebrew.mxcl.shadowsocks-libev.plist 

转:

阅读(3633) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~