v2ray vpn+反向代理
client-config.json
// 客户端
{
"inbounds": [{
"port": 10877,
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"timeout": 300
},
"tag": "http"
}],
"outbounds": [{
"protocol": "vmess",
"settings": {
"vnext": [{
"users": [{
"id": "5e5b1aa6-15f3-4c91-8262-e8918b264103",
"alterId": 64
}],
"address": "bwg.jiuyou.info",
"port": 11872
}]
},
"streamSettings": {
"network": "tcp"
},
"tag": "w57"
}],
"routing": {
"rules": [{
"type": "field",
"ip": [
"192.168.0.57"
],
"outboundTag": "w57"
}]
}
}
middle-config.json
{
"reverse": {
// 这是 A 的反向代理设置,必须有下面的 bridges 对象
"bridges": [
{
"tag": "bridge",
// 关于 A 的反向代理标签,在路由中会用到
"domain": "private.cloud.com"
// A 和 B 反向代理通信的域名,可以自己取一个,可以不是自己购买的域名,但必须跟下面 B 中的 reverse 配置的域名一致
}
]
},
"outbounds": [
{
//A连接B的outbound
"tag": "tunnel",
// A 连接 B的 outbound 的标签,在路由中会用到
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "bwg.jiuyou.info",
// B 地址,IP 或 实际的域名
"port": 16823,
"users": [
{
"id": "87ece005-24ff-43e1-9d47-ef89e4f39b57",
"alterId": 64
}
]
}
]
}
},
// 另一个 outbound,最终连接私有网盘
{
"protocol": "freedom",
"settings": {
},
"tag": "out"
}
],
"routing": {
"rules": [
{
// 配置 A 主动连接 B 的路由规则
"type": "field",
"inboundTag": [
"bridge"
],
"domain": [
"full:private.cloud.com"
],
"outboundTag": "tunnel"
},
{
// 反向连接访问私有网盘的规则
"type": "field",
"inboundTag": [
"bridge"
],
"outboundTag": "out"
}
]
}
}
server-config.json (需要一台公网服务器:并配置相同的用户ID:87ece005-24ff-43e1-9d47-ef89e4f39b57)
https://toutyrater.github.io/app/reverse2.html