Lolipop's Studio.

在 Linux 系统下启用 Project-V

字数统计: 619阅读时长: 3 min
2021/06/09

下载 Release

在 Project-V 的 Github Releases 页面下载最新的二进制包。

本文以通用于 x86_64 机器的 v2ray-linux-64.zip 为例。下载完成后传入 Linux 主机即可。

安装 Project-V

执行 unzip 命令:

1
unzip v2ray-linux-64.zip

文件将全部解压到当前目录。

创建软链接

执行 ln 命令:

1
ln -s /path/to/v2ray /usr/local/bin

这里的 v2ray 是压缩包里已编译好的二进制可执行文件。

配置 Project-V

编辑与 v2ray 相同目录下的 config.json 文件,配置如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
// 前略
// List of inbound proxy configurations.
"inbounds": [
{
// Port to listen on. You may need root access if the value is less than 1024.
"port": 1080, // 本机监听的端口,应为不加双引号的数字

// IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
"listen": "127.0.0.1",

// Tag of the inbound proxy. May be used for routing.
"tag": "socks-inbound",

// Protocol name of inbound proxy.
"protocol": "socks",

// Settings of the protocol. Varies based on protocol.
"settings": {
"auth": "noauth",
"udp": false,
"ip": "127.0.0.1"
},

// Enable sniffing on TCP connection.
"sniffing": {
"enabled": true,
// Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS.
"destOverride": ["http", "tls"]
}
}
],
// List of outbound proxy configurations.
"outbounds": [
{
// Protocol name of the outbound proxy.
"protocol": "vmess", // 使用的代理协议

// Settings of the protocol. Varies based on protocol.
"settings": {
"vnext": [
{
"address": "V2RAY_SERVER_ADDRESS", // 代理的服务器地址
"port": 16823, // 代理服务器的端口,应为不加双引号的数字
"users": [
{
"id": "V2RAY_UUID", // 代理服务器的 UUID
"alterId": 64 // 代理服务器的 Alter Id,应为不加双引号的数字
}
]
},
{
// 添加更多的 VMESS 协议代理服务器
}
]
},

// Tag of the outbound. May be used for routing.
"tag": "vmess_serve"
}
]
// 后略
}

对于新手,只需要掌握 inboundsoutbounds 的配置方式即可。

对于进阶使用,可以参考官方文档,或者更适合新手的“白话文”文档

启用 Project-V

保存修改后,在后台运行 v2ray

1
v2ray &

如果参考前面的默认配置,则它将监听在 127.0.0.1:1080 端口。

假如您想加速 git 克隆速度,则可以配置它的 http(s).proxy

1
2
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080

现在,使用 git clone 命令享受飞一般的速度吧。

CATALOG
  1. 1. 下载 Release
  2. 2. 安装 Project-V
  3. 3. 创建软链接
  4. 4. 配置 Project-V
  5. 5. 启用 Project-V