v2ray自建代理部署记录
前言
选择了 v2ray 而非 shadowsocksR, 原因是后者常年缺乏维护,前者目前有一个组织正在维护。
推荐参照官网教程设置服务端,客户端可选择v2rayN : https://github.com/2dust/v2rayN/releases
配置设置文件,一般位于
/usr/local/etc/v2ray/config.json
请勿用于非法用途
{
"inbounds": [
{
"port": 10086, // 服务器监听端口
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
部署(docker 方式, 推荐)
在目标服务器克隆下面的仓库,并新建
config.json
https://github.com/v2fly/docker
执行
readme.md
中的命令
部署(手动部署)
服务端部署
# 下载安装脚本
curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
# 执行安装脚本
bash install-release.sh
# 开机自动启动
systemctl enable v2ray
# 设置config.json,如上
# 启动v2ray
systemctl start v2ray
客户端部署
添加
vmess
服务器设置为自动配置系统代理
License:
CC BY 4.0