simple guide

This commit is contained in:
V2Ray 2015-09-15 12:04:18 +02:00
parent 06e19d17e5
commit 26187230a7
4 changed files with 97 additions and 13 deletions

View File

@ -13,6 +13,9 @@ V2Ray 是一个翻墙工具包,用于简化和复用其它翻墙工具,加
* 支持多用户
* 开放协议支持,兼容 ShadowSocks 和 GoAgent
## 简明教程
[链接](https://github.com/V2Ray/v2ray-core/blob/master/spec/guide.md)
## 概要设计
[链接](https://github.com/V2Ray/v2ray-core/blob/master/spec/design.md)

94
spec/guide.md Normal file
View File

@ -0,0 +1,94 @@
# V2Ray 简明教程
## 工作机制
你需要至少两个 Point Server设为 A、B才可以正常穿墙。以网页浏览为例你的浏览器和 A 以 Socks 5 协议通信B 和目标网站之间以 HTTP 协议通信A 和 B 之间使用 V2Ray 的自有协议 [VMess](https://github.com/V2Ray/v2ray-core/blob/master/spec/vmess.md) 通信,如下图:
![](https://github.com/V2Ray/v2ray-core/blob/master/spec/v2ray.png)
通常 Point A 运行在你自己的电脑Point B 运行在一台海外的 VPS 中。
## 安装 V2Ray Point Server
[安装 V2Ray](https://github.com/V2Ray/v2ray-core/blob/master/spec/install.md)
## 配置 V2Ray Point Server
### Point A
示例配置保存于 vpoint_socks_vmess.json 文件中,格式如下:
```javascript
{
"port": 1080, // 监听端口
"inbound": {
"protocol": "socks", // 传入数据所用协议
"file": "in_socks.json" // socks 配置文件
},
"outbound": {
"protocol": "vmess", // 中继协议
"file": "out_vmess.json" // vmess 配置文件
}
}
```
另外还需要两个文件,保存于同一文件夹下:
```javascript
// in_socks.json
{
"auth": "noauth" // 认证方式,暂时只支持匿名
}
```
```javascript
// out_vmess.json
{
"vnext": [
{
"address": "127.0.0.1", // Point B 的 IP 地址
"port": 27183, // Point B 的监听端口
"users": [
{"id": "ad937d9d-6e23-4a5a-ba23-bce5092a7c51"} // 用户 ID必须包含在 Point B 的配置文件中
]
}
]
}
```
### Point B
示例配置保存于 vpoint_vmess_freedom.json 文件中,格式如下:
```javascript
{
"port": 27183, // 监听端口
"inbound": {
"protocol": "vmess", // 中继协议
"file": "in_vmess.json" // vmess 配置文件
},
"outbound": {
"protocol": "freedom", // 出口协议,暂时只有这一个,不用改
"file": "" // 暂无配置
}
}
```
另外还需要 in_vmess.json
```javascript
// in_vmess.json
{
"clients": [
{"id": "ad937d9d-6e23-4a5a-ba23-bce5092a7c51"} // 认可的用户 ID
]
}
```
## 运行
Point Server A
./server --config="vpoint_socks_vmess.json 的绝对路径"
Point Server B
./server --config="vpoint_vmess_freedom.json 的绝对路径"
## 测试服务器可用性:
curl -v --socks5-hostname 127.0.0.1:1080 https://www.google.com/

View File

@ -12,17 +12,4 @@
5. go get github.com/v2ray/v2ray-core
6. go build github.com/v2ray/v2ray-core/release/server
## 运行
Socks 5 转发 VMess
./server --config=$HOME/work/src/github.com/v2ray/v2ray-core/release/config/vpoint_socks_vmess.json
VMess 转发最终网站:
./server --config=$HOME/work/src/github.com/v2ray/v2ray-core/release/config/vpoint_vmess_freedom.json
测试服务器可用性:
curl -v --socks5-hostname 127.0.0.1:1080 https://www.google.com/

BIN
spec/v2ray.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB