本文介绍直连方式/中转方式两种,写法不同。介绍的是ws直连/ws+中转方式,ws+tls有时间再补。与以往一样,文章基于centos系统。
直连方式中转方式选择一种即可
正文
首先进入sspanel后天添加节点,节点地址填写如下内容
直连方式
服务器IP;端口;2;ws;;path=/index|host=伪装地址
其中数字2可以更改,数字低速度快,数字高安全性高。伪装地址随意填写
示例
192.168.1.1;1234;2;ws;;path=/index|host=bing.com
中转方式
服务器IP;端口;2;ws;;path=/index|host=伪装地址|server=中转IP|outside_port=中转端口
中转方式在原地址上增加了|server=中转IP|outside_port=中转端口,中转机通常是国内机器,此处填写国内IP和端口,IP可以使用域名代替。
节点IP地址直接添加国外机器IP,节点类型选择如下
image_2020-09-05_14-45-11.png
保存后我们得到节点ID,加上已知的网站地址+mukey即可完成对接。
连接服务器
首先推荐服务器安装BBR----魔改版/原版BBR加速一键脚本(含锐速)
安装环境
yum install -y epel-release yum-utils
yum-config-manager --enable epel
设置时区为上海
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
安装docker并设置开机自启
curl -fsSL https://get.docker.com -o get-docker.sh
bash get-docker.sh
systemctl restart docker
systemctl enable docker
启动docker(通过docker run)
docker run -d --name=名称随意 \
-e speedtest=0 -e api_port=端口 -e downWithPanel=0 \
-e node_id=节点ID -e usemysql=0 -e sspanel_url="https://网站地址" -e key="对接密钥" -e TZ="Asia/Shanghai" \
--log-opt max-size=10m --log-opt max-file=5 \
--network=host --restart=always \
xiaoyiya/free-node:v2ray
修改以上中文标识参数,docker参数解释:
名称使用英文;api_port=端口为api端口,独立一个不要冲突;downWithPanel=0参数为1时节点掉线即断网,为0时不断网;node_id=节点ID节点ID,在面板可以看到;网站地址和key不做赘述,如果是http则把
https改成http。
至此已经对接完成,测试一下吧!
docker run -d --name=v2raynat \
-e speedtest=0 -e api_port=2333 -e downWithPanel=0 \
-e node_id=18 -e usemysql=0 -e sspanel_url="https://llhyun.com" -e key="default_mu_key" -e TZ="Asia/Shanghai" \
--log-opt max-size=10m --log-opt max-file=5 \
--network=host --restart=always \
xiaoyiya/free-node:v2ray
搬运自https://www.isyunyi.com/index.php/archives/274/,THANKS
本文由 admin 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: Feb 27, 2021 at 10:44 am
I found this sulution not works with WG which use Brook nat and docker v2ray installed at the same VPS.