Claw cloud 容器 VPS SSH 端口释放,使用 xray 完成端口复用 | xray 自访问,掌控所有端口
Vevc • • 424 人浏览
本期摘要:Claw cloud | 容器vps | xray | 端口复用
Claw cloud 注册地址:
https://console.run.claw.cloud/signin?link=TSWVWVN3G294
容器 VPS 项目地址:
https://github.com/vevc/ubuntu
Xray-core 项目地址:
https://github.com/XTLS/Xray-core
Why
1. 比较贵:0.05x31=1.55
2. 可替代:端口复用技术
3. 总结:性价比问题
Benefits
1. 节省的端口可以给 UDP, 比如搭建 Hy2 节点
2. 节省的费用可以用来增加 CPU、内存等配置
原理介绍
How
配置参考:https://xtls.github.io/config/outbounds/freedom.html
{
"routing": {
"rules": [
{
"type": "field",
"domain": [
"vps.com"
],
"outboundTag": "force-to-ip"
}
]
},
"outbounds": [
{
"protocol": "freedom"
},
{
"tag": "force-to-ip",
"protocol": "freedom",
"settings": {
"redirect": "127.0.0.1:0"
}
}
]
}
配置释义
vps.com:22 -> xray-server:22
vps.com:9999 -> xray-server:9999
重启xray
sudo supervisorctl restart xray
注意事项
1. 连接 VPS 必须走 xray 代理(优点增加了安全性,缺点不方便)
2. 域名一定选自己不会访问的域名
3. 域名不要用 cn 等直连规则的域名