xray 支持隧道转发吗?
#4966
-
是否支持像gost、realm等软件,把接收到的tcp、udp等raw数据,通过xray多样的加密方式转发到对端,对端接收到后再转发给真正的目标。此时xray做为一个加密隧道。 |
Beta Was this translation helpful? Give feedback.
Answered by
RPRX
Jul 31, 2025
Replies: 2 comments 29 replies
-
一直有这个功能,不用改功能性代码,决定给 dokodemo-door 加别名 tunnel,给 freedom 加别名 direct,简洁明了 |
Beta Was this translation helpful? Give feedback.
28 replies
Answer selected by
RPRX
-
给一个最小的成功配置文件 客户端 {
"routing": {
"rules": [
{
"inboundTag": "src",
"outboundTag": "tunnel"
}
]
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 1145,
"protocol": "dokodemo-door",
"tag": "src",
"sniffing": {
"enabled": false
},
"settings": {
"address": "127.0.0.1", // 隧道转发的目标地址
"port": "${dstport}", // 隧道转发的目标端口
"network": "tcp", // 隧道转发目标的协议
"followRedirect": false
}
}
],
"outbounds": [
{
//任意协议
"tag": "tunnel",
}
]
} 服务端 {
"routing": {
"rules": [
{
"inboundTag": "tunnel",
"outboundTag": "dst"
}
]
},
"inbounds": [
{
//任意协议,但要与客户端对应
"tag": "tunnel"
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "dst"
}
]
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
似乎只要改代码选择性取消服务端对 localhost 的访问限制就行了?再详述一下那些软件是怎么用的一直有这个功能,不用改功能性代码,决定给 dokodemo-door 加别名 tunnel,给 freedom 加别名 direct,简洁明了