V2Ray

bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
  • 配置/usr/local/etc/v2ray/config.json
{
"inbounds": [
{
"port": 10000,
"listen":"127.0.0.1",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "#自己生成uuid",
"alterId": 0
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "#自己填写路径"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}

Caddy

注意:启动申请证书没成功前不要开启CDN

apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
apt update
apt install caddy
  • 配置/etc/caddy/Caddyfile
#域名 {
log {
output file /etc/caddy/caddy.log
}
tls {
protocols tls1.2 tls1.3
ciphers TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
curves x25519
}
@v2ray_websocket {
path v2ray的路径
header Connection Upgrade
header Upgrade websocket
}
reverse_proxy @v2ray_websocket localhost:10000
}
  • 校验
wget https://#域名

参考资料