Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentChanX committed Apr 6, 2017
1 parent 79c9783 commit 77eafff
Show file tree
Hide file tree
Showing 27 changed files with 2,123 additions and 22 deletions.
89 changes: 88 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,89 @@
# shadowsocks-over-websocket
A fast tunnel proxy that helps you bypass firewalls.
基于 [shadowsocks](https://zh.wikipedia.org/zh-cn/Shadowsocks) 协议的翻墙工具 , 可部署在 [Heroku](https://www.heroku.com/) 平台上 , 实现免费科学上网


## 如何部署在 Heroku 平台上

### 1.准备工作
* [Heroku](https://signup.heroku.com/) 注册
* [GitHub](https://github.com/join?source=header-home) 注册

### 2.Fork[本项目](https://github.com/VincentChanX/shadowsocks-over-websocket)到个人账号下
![1](./imgs/1.jpg)
进入 <https://github.com/VincentChanX/shadowsocks-over-websocket> 页面 ==> Fork

---

### 3.创建 [Heroku](https://dashboard.heroku.com/new?org=personal-apps) 应用
![2](./imgs/2.png)
登陆 Heroku 帐号,进入 [Dashboard](https://dashboard.heroku.com/apps) 页面 ==> Create New App ==> 输入 App Name ==> Create App

---

### 4.Heroku 帐号与 Github 帐号关联
![3](./imgs/3.jpg)
进入 Deploy 页面 ==> 选择 Deployment Method 为 Github ==> Connect to GitHub

---

### 5.选择要关联的Github项目
![4](./imgs/4.jpg)
选择GitHub帐号 ==> 查找shadowsocks-over-websocket ==> Connect

---

### 6.部署 master 分支

![5](./imgs/5.jpg)

---

### 7.配置环境变量
![6](./imgs/6.png)
Setting 页面 ==> Reveal Config Vars

需要配置 METHOD(加密方法),PASSWORD(密码,推荐使用`aes-256-cfb`),SERVER_ADDRESS(`0.0.0.0`) 三个环境变量,支持以下加密方法:

* rc4
* rc4-md5
* table
* bf-cfb
* des-cfb
* rc2-cfb
* idea-cfb
* seed-cfb
* cast5-cfb
* aes-128-cfb
* aes-192-cfb
* aes-256-cfb
* camellia-256-cfb
* camellia-192-cfb
* camellia-128-cfb

---

## 启动客户端:

### 命令行启动:
1. 安装 [nodejs](https://nodejs.org/en/download/)[git](https://git-scm.com/downloads)
2. 执行 `git clone https://github.com/VincentChanX/shadowsocks-over-websocket.git` 命令
1. **进到本项目目录**,执行`npm install` 命令
2. 执行 `node local.js -s app名称.herokuapp.com -l 1080 -m 设置的加密算法 -k 设置的密码 -p 80` 命令,启动成功


## Chrome 浏览器配置
1. 下载 [Chrome](http://www.google.cn/chrome/browser/desktop/index.html) 浏览器插件 [SwitchyOmega](https://github.com/VincentChanX/shadowsocks-over-websocket/tree/master/extensions/SwitchyOmega.crx)

2. 安装 SwitchyOmega 插件:打开浏览器的扩展程序页面 [chrome://extensions](chrome://extensions),把SwitchyOmega.crx文件拖放到浏览器扩展程序页面安装

3. 新建情景模式 `local-proxy`,配置 SwitchyOmega :`代理协议:SOCKS5 代理服务器:127.0.0.1 代理端口:1080`,如下图:
![7](./imgs/7.png)

4. 配置 `auto switch` 情景模式,添加规则列表网址: <https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt> 并更新情景模式,规则列表规则处的情景模式选中为上一步创建的 `local-proxy` ,配置如下图:
![8](./imgs/8.png)


5. 选中 `auto switch` 情景模式:
![9](./imgs/9.png)

6. 现在你就可以科学上网了
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"localAddress":"127.0.0.1",
"localPort": 1080,
"serverAddress": "127.0.0.1",
"serverPort": 1081,
"serverPort": 8388,
"password": "shadowsocks-over-websocket",
"method": "aes-256-cfb"
}
Binary file added extensions/SwitchyOmega.crx
Binary file not shown.
Binary file added imgs/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 22 additions & 11 deletions local.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
const {
TCPRelay
} = require('./tcprelay');
new TCPRelay({
localAddress: '127.0.0.1',
localPort: 1080,
serverAddress: '127.0.0.1',
serverPort: 1081,
password: 'shadowsocks-over-websocket',
method: 'aes-256-cfb'
}, true, 'info').bootstrap();
const TCPRelay = require('./tcprelay').TCPRelay;
const local = require('commander');

local
.version('0.1.0')
.option('-m --method [method]', 'encryption method, default: aes-256-cfb')
.option('-k --password [password]', 'password')
.option('-s --server-address [address]', 'server address')
.option('-p --server-port [port]', 'server port, default: 8388')
.option('-b --local-address [address]', 'local binding address, default: 127.0.0.1')
.option('-l --local-port [port]', 'local port, default: 1080')
.parse(process.argv);

var relay = new TCPRelay({
localAddress: local.localAddress || '127.0.0.1',
localPort: local.localPort || 1080,
serverAddress: local.serverAddress || '127.0.0.1',
serverPort: local.serverPort || 8388,
password: local.password || 'shadowsocks-over-websocket',
method: local.method || 'aes-256-cfb'
}, true, 'info');
relay.bootstrap();
261 changes: 261 additions & 0 deletions node_modules/commander/History.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 77eafff

Please sign in to comment.