adjust vless-h2c-caddy2

This commit is contained in:
kslr
2020-08-14 19:06:03 +08:00
parent ab6194dc87
commit 9e10db8f37
4 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
xx.com {
root * /var/www
file_server
reverse_proxy /path 127.0.0.1:2001 {
transport http {
versions h2c
}
}
}

View File

@@ -0,0 +1,5 @@
# 原理图:
v2ray client <--- H2 ---> caddy2 <--- H2C ---> v2ray server
注意:
目前仅 caddy2 的 v2.2.0-rc.1 版及以后完美支持 v2ray 的 H2C,实现 H2(HTTP/2)应用。

View File

@@ -0,0 +1,68 @@
{
"log":{},
"inbounds":[
{
"port":"1080",
"protocol":"socks",
"settings":{
"auth":"noauth",
"udp":true
}
},
{
"port":"1081",
"protocol":"http",
"settings":{}
}
],
"outbounds":[
{
"protocol":"vless",
"settings":{
"vnext":[
{
"address":"xx.com",
"port":443,
"users":[
{
"id":""
}
]
}
]
},
"streamSettings":{
"network":"h2",
"security":"tls",
"httpSettings":{
"host":[
"xx.com"
],
"path":"/path"
}
}
},
{
"tag":"direct",
"protocol":"freedom",
"settings":{}
},
{
"tag":"blocked",
"protocol":"blackhole",
"settings":{}
}
],
"routing":{
"domainStrategy":"IPOnDemand",
"rules":[
{
"type":"field",
"ip":[
"geoip:private"
],
"outboundTag":"direct"
}
]
}
}

View File

@@ -0,0 +1,54 @@
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 2001,
"listen": "127.0.0.1",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "",
"email": "love@v2fly.org"
}
]
},
"streamSettings": {
"security": "none",
"network": "h2",
"httpSettings": {
"path": "/path",
"host": [
"xx.com"
]
}
}
}
],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom",
"settings": {}
},
{
"tag": "blocked",
"protocol": "blackhole",
"settings": {}
}
],
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "blocked"
}
]
}