You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
用v2ray做方向代理,访问内网网站,一般情况都很正常,但是如果下载大文件,别的网页访问起来速度就非常慢了,5秒后才会有响应,关掉文件下载就正常了,可能是什么原因呢?
外网服务器配置
{
"reverse":{ //这是 B 的反向代理设置,必须有下面的 portals 对象
"portals":[
{
"tag":"portal",
"domain":"private.cloud.com" // 必须和上面 A 设定的域名一样
}
]
},
"inbounds": [
{
// 接受 C 的inbound
"tag":"external", // 标签,路由中用到
"port":8060,
// 开放 80 端口,用于接收外部的 HTTP 访问
"protocol":"dokodemo-door",
"settings":{
"address":"127.0.0.1",
"port":80, //假设 NAS 监听的端口为 80
"network":"tcp"
}
},
// 另一个 inbound,接受 A 主动发起的请求
{
"tag": "tunnel",// 标签,路由中用到
"port":7100,
"protocol":"vmess",
"settings":{
"clients":[
{
"id":"b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId":64
}
]
}
}
],
"routing":{
"rules":[
{ //路由规则,接收 C 请求后发给 A
"type":"field",
"inboundTag":[
"external"
],
"outboundTag":"portal"
},
{ //路由规则,让 B 能够识别这是 A 主动发起的反向代理连接
"type":"field",
"inboundTag":[
"tunnel"
],
"domain":[
"full:private.cloud.com"
],
"outboundTag":"portal"
}
]
}
}
内网服务器配置
{
"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":"xx.xx.xx.xx", // B 地址,IP 或 实际的域名
"port":7100,
"users":[
{
"id":"b831381d-6324-4d53-ad4f-8cda48b30811",
"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"
}
]
}
}
Beta Was this translation helpful? Give feedback.
All reactions