Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lxhao61 authored Aug 6, 2023
1 parent c51cbd9 commit b14a483
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
19 changes: 13 additions & 6 deletions Xray(VLESS+Vision+TLS)+Caddy/1_caddy.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"admin": {
"disabled": true
"disabled": true,
"config": {
"persist": false
}
},
"logging": {
"logs": {
"default": {
"writer": {
"output": "file",
"filename": "/var/log/caddy/error.log"
"filename": "/var/log/caddy/default.log"
},
"encoder": {
"format": "console"
},
"level": "ERROR"
"level": "WARN"
}
}
},
Expand All @@ -20,7 +26,7 @@
"apps": {
"http": {
"servers": {
"h1": {
"srvh1": {
"listen": [":80"],
"routes": [{
"handle": [{
Expand All @@ -30,9 +36,10 @@
},
"status_code": 301
}]
}]
}],
"protocols": ["h1"] //仅开启HTTP/1.1 server支持
},
"h1h2c": {
"srvh2c": {
"listen": ["127.0.0.1:88"], //H2C server及HTTP/1.1 server本地监听端口
"listener_wrappers": [{
"wrapper": "proxy_protocol" //开启PROXY protocol接收
Expand Down
19 changes: 13 additions & 6 deletions Xray(VLESS+Vision+TLS)+Caddy/2_caddy.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"admin": {
"disabled": true
"disabled": true,
"config": {
"persist": false
}
},
"logging": {
"logs": {
"default": {
"writer": {
"output": "file",
"filename": "/var/log/caddy/error.log"
"filename": "/var/log/caddy/default.log"
},
"encoder": {
"format": "console"
},
"level": "ERROR"
"level": "WARN"
}
}
},
Expand All @@ -20,7 +26,7 @@
"apps": {
"http": {
"servers": {
"h1": {
"srvh1": {
"listen": [":80"],
"routes": [{
"handle": [{
Expand All @@ -30,9 +36,10 @@
},
"status_code": 301
}]
}]
}],
"protocols": ["h1"] //仅开启HTTP/1.1 server支持
},
"h1h2c": {
"srvh2c": {
"listen": ["unix/@h1h2c.sock"], //H2C server及HTTP/1.1 server监听进程
"listener_wrappers": [{
"wrapper": "proxy_protocol" //开启PROXY protocol接收
Expand Down
2 changes: 1 addition & 1 deletion Xray(VLESS+Vision+TLS)+Caddy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

2、Caddy 支持 H2C server 与 HTTP/1.1 server 共用一个端口或一个进程。

3、Caddy 版本不小于 v2.6.5 才默认支持 PROXY protocol 接收。若 Caddy 版本小于 v2.6.5 需加 caddy2-proxyprotocol 插件定制编译才支持 PROXY protocol 接收。
3、Caddy 版本不小于 v2.7.0 才默认支持 PROXY protocol 接收。若 Caddy 版本小于 v2.7.0 需加 caddy2-proxyprotocol 插件定制编译才支持 PROXY protocol 接收。

4、本示例所需 TLS 证书由 Caddy(内置 ACME 客户端) 提供,实现 TLS 证书自动申请及更新。

Expand Down

0 comments on commit b14a483

Please sign in to comment.