修改了官方安装脚本,用脚本指定面板信息,请务必删除原有的 config.json, 否则不会更新 config.json
安装二进制 从私有channel获得,并上传到vps,命名成v2ray-linux-64.zip
-
阅读官方链接 获取access token
-
替换一下脚本中的<your_access_token> 运行以下脚本
参数解释:
--panelurl https://google.com 表示 WEBAPI URL
--panelkey 55fUxDGFzH3n 表示 MU KEY
--nodeid 123456 节点 ID,可以为 0
--downwithpanel 1 前端面板异常下线时,0 为节点端不下线、1 为节点跟着下线
--mysqlhost https://bing.com 数据库访问域名
--mysqldbname demo_dbname 数据库名
--mysqluser demo_user 数据库用户名
--mysqlpasswd demo_dbpassword 数据库密码
--mysqlport 3306 数据库连接端口
--speedtestrate 6 测速周期
--paneltype 0 面板类型,0 为 ss-panel-v3-mod、1 为 SSRPANEL
--usemysql 0 连接方式,0 为 webapi,1 为 MySQL 数据库连接,请注意 SSRPANEL 必须使用数据库连接
--ldns xx.xx.xx.xx xx.xx.xx.xx 是你要设定的dns地址
--cfkey xxxx cloudflare key
--cfemail xxxx cloudflare email
--alikey
--alisecret
--muregex config.php muregex值 使用plugin需要一样
--musuffix config.php musuffix值 使用plugin需要一样
--proxytcp 0为一般tcp, 1 为接收haproxy的 proxy protocol的tcp,可以获得中转客户的真实ip
--cachedurationsec 默认120秒, 可以调节成60 90 内存对应成倍率缩小
安装时请务必修改脚本参数
# ss-panel-v3-mod WEBAPI 连接示例
bash <(curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' https://gitlab.com/api/v4/projects/16926132/repository/files/install-release.sh/raw?ref=master) \
--panelurl https://google.com --panelkey 55fUxDGFzH3n --nodeid 123456 \
--downwithpanel 1 --speedtestrate 6 --paneltype 0 --usemysql 0 -f --local v2ray-linux-64.zip
# ss-panel-v3-mod MySQL 连接示例
bash <(curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' https://gitlab.com/api/v4/projects/16926132/repository/files/install-release.sh/raw?ref=master) \
--nodeid 123456 \
--mysqlhost https://bing.com --mysqldbname demo_dbname --mysqluser demo_user --mysqlpasswd demo_dbpassword --mysqlport 3306 \
--downwithpanel 1 --speedtestrate 6 --paneltype 0 --usemysql 1 -f --local v2ray-linux-64.zip
# SSRPANEL MySQL 连接示例
bash <(curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' https://gitlab.com/api/v4/projects/16926132/repository/files/install-release.sh/raw?ref=master) \
--nodeid 123456 \
--mysqlhost https://bing.com --mysqldbname demo_dbname --mysqluser demo_user --mysqlpasswd demo_dbpassword --mysqlport 3306 \
--downwithpanel 1 --speedtestrate 6 --paneltype 1 --usemysql 1 -f --local v2ray-linux-64.zip
/var/log/v2ray/error.log
1. 删去 /etc/v2ray/config.json 中log key下面的 access和error的两个path设定。
2. service v2ray stop 停止运行
3. /usr/bin/v2ray/v2ray -config /etc/v2ray/config.json 手动运行看log输出
# 启动 V2Ray 进程
sudo systemctl start v2ray.service
# 重启 V2Ray 进程
sudo systemctl restart v2ray.service
# 停止 V2Ray 进程
sudo systemctl stop v2ray.service
# 开机自启 V2Ray 进程
sudo systemctl enable v2ray.service
# 取消开机自启 V2Ray 进程
sudo systemctl disable v2ray.service
bash <(curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' https://gitlab.com/api/v4/projects/16926132/repository/files/install-release.sh/raw?ref=master) -f --local v2ray-linux-64.zip
bash <(curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' https://gitlab.com/api/v4/projects/16926132/repository/files/install-release.sh/raw?ref=master) -f --local xxx.zip
一键安装 Caddy 和 CF DDNS TLS 插件,不使用 WS + TLS 可不安装。
curl https://getcaddy.com | bash -s personal dyndns,tls.dns.cloudflare
Caddyfile 自行修改,或者设置对应环境变量
{$V2RAY_DOMAIN}:{$V2RAY_OUTSIDE_PORT}
{
root /srv/www
log ./caddy.log
proxy {$V2RAY_PATH} 127.0.0.1:{$V2RAY_PORT} {
websocket
header_upstream -Origin
}
gzip
tls {$V2RAY_EMAIL} {
protocols tls1.0 tls1.2
# remove comment if u want to use cloudflare ddns
# dns cloudflare
}
}