Vless 自动回落到 Caddy2

This commit is contained in:
凉川 2020-09-08 21:34:40 +08:00
parent 5ac8a6f16d
commit f8095d13a8
4 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,7 @@
{
https_port 4433
auto_https disable_redirects
}
http://example.com, https://example.com
root * /var/www/html
file_server

View File

@ -0,0 +1,16 @@
# Vless 自动回落到 Caddy2
## 准备
你需要有一个解析到服务器 IP 的域名,替换文档中的 example.com
Vless 将使用 Caddy 申请的证书,无需额外配置
将你的自建网站放置于 /var/www/html 路径
## Caddy2 安装
[https://caddyserver.com/docs/download#debian-ubuntu-raspbian]()
## v2ray 读取证书失败
修改证书 key 文件的权限为 644
[https://github.com/v2fly/fhs-install-v2ray/wiki/Insufficient-permissions-when-using-certificates-zh-Hans-CN]()

View File

@ -0,0 +1,39 @@
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 1080,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
}
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "example.com", //
"port": 443,
"users": [
{
"id": "", // UUID
"encryption": "none",
"level": 0
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "tls"
}
}
]
}

View File

@ -0,0 +1,44 @@
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 443,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "" // UUID
}
],
"decryption": "none",
"fallbacks": [
{
"dest": 80
}
]
},
"streamSettings": {
"network": "tcp",
"security": "tls",
"tlsSettings": {
"alpn": [
"http/1.1"
],
"certificates": [
{
"certificateFile": "/caddy/certificates/acme-v02.api.letsencrypt.org-directory/example.com/example.com.crt", // example.com
"keyFile": "/caddy/certificates/acme-v02.api.letsencrypt.org-directory/example.com/example.com.key" // example.com
}
]
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}