mirror of
https://github.com/XTLS/Xray-examples.git
synced 2025-06-28 13:16:06 +08:00
Update README.md
fix typo update 移除 client、bridge 配置中的 "allowInsecure": true 默认注释 portal.json 中仅转发内网流量的配置 update readme.md
This commit is contained in:
parent
99c3567db3
commit
4cc60b0a79
@ -1,10 +1,10 @@
|
|||||||
# 反向代理
|
# 反向代理
|
||||||
# 原理
|
# 原理
|
||||||
Xray Client <--- VMESS/SS ---> Xray Protal(需要公网 IP) <--- VMESS/SS ---> Xray Bridge
|
Xray Client <--- VMESS/SS ---> Xray Portal(需要公网 IP) <--- VMESS/SS ---> Xray Bridge
|
||||||
# 说明
|
# 说明
|
||||||
配置中,内网设备使用的配置为 `bridge.json`,有公网 ip 的设备使用 `protal.json`,通过`protal`连接到内网的设备使用`client.json`。
|
配置中,内网设备使用的配置为 `bridge.json`,有公网 ip 的设备使用 `portal.json`,通过`portal`连接到内网的设备使用`client.json`。
|
||||||
|
|
||||||
实际应用中,可以使用`VMESS-TCP、Shadowsocks-2022`等作为Xray Client 到 Xray Protal、Xray Bridge 到 Xray Protal 的传输协议。
|
实际应用中,可以使用`VMESS-TCP、Shadowsocks-2022`等作为Xray Client 到 Xray Portal、Xray Bridge 到 Xray Portal 的传输协议。
|
||||||
|
|
||||||
## psk
|
## psk
|
||||||
|
|
||||||
|
@ -10,6 +10,12 @@ portal 设置默认回落到 80 端口的 Web 服务器(也可以换成数据
|
|||||||
如果你的 portal 在境外,可以使用路由分流来同时实现科学上网 + 访问内网设备。
|
如果你的 portal 在境外,可以使用路由分流来同时实现科学上网 + 访问内网设备。
|
||||||
|
|
||||||
## 路由分流
|
## 路由分流
|
||||||
根据配置内提示,在 `Portal` 配置中的路由设置为:
|
根据配置内提示,在 `Portal` 配置中, 取消注释第一项路由中的:
|
||||||
匹配 `"external","externalws"` 标签,且访问的目标 ip 为`私有 ip`时,才将流量转发至 bridge,其余流量走 direct。
|
```
|
||||||
|
// "ip": [
|
||||||
|
// "geoip:private"
|
||||||
|
// ],
|
||||||
|
```
|
||||||
|
|
||||||
|
此时流量匹配 `"external"` 或 `"externalws"` 标签,且访问的目标 ip 为`私有 ip 地址`时,才会将流量转发至 bridge,其余流量走 direct。
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
"network": "ws",
|
"network": "ws",
|
||||||
"security": "tls",
|
"security": "tls",
|
||||||
"tlsSettings": {
|
"tlsSettings": {
|
||||||
"allowInsecure": true,
|
|
||||||
"serverName": "reverse.example" // 换成你的域名
|
"serverName": "reverse.example" // 换成你的域名
|
||||||
},
|
},
|
||||||
"wsSettings": {
|
"wsSettings": {
|
||||||
|
@ -53,7 +53,6 @@
|
|||||||
"network": "tcp",
|
"network": "tcp",
|
||||||
"security": "xtls",
|
"security": "xtls",
|
||||||
"xtlsSettings": {
|
"xtlsSettings": {
|
||||||
"allowInsecure": true,
|
|
||||||
"serverName": "reverse.example" // 换成你的域名
|
"serverName": "reverse.example" // 换成你的域名
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@
|
|||||||
"network": "ws",
|
"network": "ws",
|
||||||
"security": "tls",
|
"security": "tls",
|
||||||
"tlsSettings": {
|
"tlsSettings": {
|
||||||
"allowInsecure": true,
|
|
||||||
"serverName": "reverse.example" // 换成你的域名
|
"serverName": "reverse.example" // 换成你的域名
|
||||||
},
|
},
|
||||||
"wsSettings": {
|
"wsSettings": {
|
||||||
|
@ -122,9 +122,9 @@
|
|||||||
],
|
],
|
||||||
// 默认将所有来自 external 的流量转发至bridge
|
// 默认将所有来自 external 的流量转发至bridge
|
||||||
// 如果仅转发内网设备流量,则取消注释下面三行
|
// 如果仅转发内网设备流量,则取消注释下面三行
|
||||||
"ip": [
|
// "ip": [
|
||||||
"geoip:private"
|
// "geoip:private"
|
||||||
],
|
// ],
|
||||||
"outboundTag": "portal"
|
"outboundTag": "portal"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user