mirror of
https://github.com/XTLS/Xray-examples.git
synced 2025-09-17 20:54:29 +08:00
add reverse proxy examples
fix address add reverse proxy examples
This commit is contained in:
61
ReverseProxy/Vmess-TCP/bridge.json
Normal file
61
ReverseProxy/Vmess-TCP/bridge.json
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"reverse": {
|
||||
"bridges": [
|
||||
{
|
||||
"tag": "bridge",
|
||||
"domain": "reverse.proxy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outbounds": [
|
||||
{
|
||||
"tag": "interconn",
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "{{ protal.address }}",
|
||||
"port": 65510,
|
||||
"users": [
|
||||
{
|
||||
"id": "{{ uuid }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"settings": {},
|
||||
"tag": "out"
|
||||
}
|
||||
],
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"bridge"
|
||||
],
|
||||
"domain": [
|
||||
"full:reverse.proxy"
|
||||
],
|
||||
"outboundTag": "interconn"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"bridge"
|
||||
],
|
||||
"outboundTag": "out"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
60
ReverseProxy/Vmess-TCP/client.json
Normal file
60
ReverseProxy/Vmess-TCP/client.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"domainMatcher": "mph",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"port": "0-65535",
|
||||
"outboundTag": "proxy",
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": "2080",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true,
|
||||
"ip": "127.0.0.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": "2081",
|
||||
"protocol": "http"
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "{{ protal.address }}",
|
||||
"port": 65511,
|
||||
"users": [
|
||||
{
|
||||
"id": "{{ uuid }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp"
|
||||
},
|
||||
"tag": "proxy"
|
||||
},
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"tag": "direct"
|
||||
}
|
||||
]
|
||||
}
|
64
ReverseProxy/Vmess-TCP/protal.json
Normal file
64
ReverseProxy/Vmess-TCP/protal.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"reverse": {
|
||||
"portals": [
|
||||
{
|
||||
"tag": "portal",
|
||||
"domain": "reverse.proxy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"tag": "external",
|
||||
"port": 65511,
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "{{ uuid }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "interconn",
|
||||
"port": 65510,
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "{{ uuid }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"external"
|
||||
],
|
||||
"outboundTag": "portal"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"inboundTag": [
|
||||
"interconn"
|
||||
],
|
||||
"domain": [],
|
||||
"outboundTag": "portal"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user