v2ray-core
v2ray-core copied to clipboard
routing规则中domains用大写字母时无法匹配
你正在使用哪个版本的 V2Ray?
客户端:4.38.3 服务端:4.35.1(问题与服务端无关)
你的使用场景是什么?
反向代理,该客户端为想要供外网连接的机器
你看到的异常现象是什么?
客户端无法连接服务器,仔细观察后发现是routing匹配域名时,因为使用了大写,导致没有匹配到域名,走了freedom
你期待看到的正常表现是怎样的?
客户端连接上服务端
请附上你的配置
服务端配置:(与服务端无关,可以略过)
{
"log": {"loglevel": "info"},
"reverse": {
"portals": [
{
"tag": "portal",
"domain": "XPS-8940.localhost"
}
]
},
"inbounds": [
{
"tag": "inter-connection",
"port": 46758,
"protocol": "vmess",
"settings": {
"clients": [
{
"email": "[email protected]",
"id": "xxx",
"alterId": 64
}
]
}
},
{
"tag": "tunnel",
"port": 46759,
"protocol": "vmess",
"settings": {
"clients": [
{
"email": "[email protected]",
"id": "xxx",
"alterId": 64
}
]
}
}
],
"routing": {
"rules": [
{
"type": "field",
"inboundTag": [
"inter-connection"
],
"outboundTag": "portal"
},
{
"type": "field",
"inboundTag": [
"tunnel"
],
"outboundTag": "portal"
}
]
},
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
客户端配置:
{
"log": {"loglevel":"info"},
"reverse":{
"bridges":[
{
"tag":"bridge",
"domain":"XPS-8940.localhost" // <- 这里是用的大写,实测大小写没有关系
}
]
},
"outbounds":[
{
"tag":"tunnel",
"protocol":"vmess",
"settings":{
"vnext":[
{
"address":"xxx",
"port": 46758,
"users":[
{
"id":"xxx",
"alterId":64
}
]
}
]
}
},
{
"protocol":"freedom",
"settings":{},
"tag":"out"
}
],
"routing":{
"rules":[
{
// 配置 A 主动连接 B 的路由规则
"type":"field",
"inboundTag":[
"bridge"
],
"domains":[
"full:XPS-8940.localhost" // <- 注意这里,用的是大写,如果改为小写则问题解决
],
"outboundTag":"tunnel"
},
{
// 反向连接访问私有网盘的规则
"type":"field",
"inboundTag":[
"bridge"
],
"outboundTag":"out"
}
]
}
}
请附上出错时软件输出的错误日志
服务器端错误日志:
服务端没有日志(因为根本没有连接上服务端)
客户端错误日志:
$ v2ray -c ~/v2ray/config.json
V2Ray 4.38.3 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.16.3 linux/amd64)
A unified platform for anti-censorship.
2021/05/13 21:06:25 [Info] main/jsonem: Reading config: /home/alex/v2ray/config.json
2021/05/13 21:06:25 [Debug] app/log: Logger started
2021/05/13 21:06:25 [Warning] V2Ray 4.38.3 started
2021/05/13 21:06:25 [Info] app/dispatcher: taking detour [out] for [tcp:XPS-8940.localhost:0]
2021/05/13 21:06:25 [Info] proxy/freedom: opening connection to tcp:XPS-8940.localhost:0
2021/05/13 21:06:25 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:25 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:25 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:25 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:26 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:26 [Info] app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:XPS-8940.localhost:0 > common/retry: [dial tcp [::1]:0: connect: connection refused] > common/retry: all retry attempts failed
2021/05/13 21:06:26 [Info] common/mux: unexpected EOF > common/mux: failed to read metadata > io: read/write on closed pipe
2021/05/13 21:06:27 [Info] app/dispatcher: taking detour [out] for [tcp:XPS-8940.localhost:0]
2021/05/13 21:06:27 [Info] proxy/freedom: opening connection to tcp:XPS-8940.localhost:0
2021/05/13 21:06:27 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:27 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:27 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:27 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:28 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0
2021/05/13 21:06:28 [Info] app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:XPS-8940.localhost:0 > common/retry: [dial tcp [::1]:0: connect: connection refused] > common/retry: all retry attempts failed
2021/05/13 21:06:28 [Info] common/mux: unexpected EOF > common/mux: failed to read metadata > io: read/write on closed pipe
^C
请附上访问日志
详见上文错误日志
其它相关的配置文件(如 Nginx)和相关日志
N/A
如果 V2Ray 无法启动,请附上 --test
命令的输出
N/A
如果 V2Ray 服务运行异常,请附上 journal 日志
N/A
这是一个已知 bug。
你正在使用哪个版本的 V2Ray?
客户端:4.38.3 服务端:4.35.1(问题与服务端无关)
你的使用场景是什么?
反向代理,该客户端为想要供外网连接的机器
你看到的异常现象是什么?
客户端无法连接服务器,仔细观察后发现是routing匹配域名时,因为使用了大写,导致没有匹配到域名,走了freedom
你期待看到的正常表现是怎样的?
客户端连接上服务端
请附上你的配置
服务端配置:(与服务端无关,可以略过)
{ "log": {"loglevel": "info"}, "reverse": { "portals": [ { "tag": "portal", "domain": "XPS-8940.localhost" } ] }, "inbounds": [ { "tag": "inter-connection", "port": 46758, "protocol": "vmess", "settings": { "clients": [ { "email": "[email protected]", "id": "xxx", "alterId": 64 } ] } }, { "tag": "tunnel", "port": 46759, "protocol": "vmess", "settings": { "clients": [ { "email": "[email protected]", "id": "xxx", "alterId": 64 } ] } } ], "routing": { "rules": [ { "type": "field", "inboundTag": [ "inter-connection" ], "outboundTag": "portal" }, { "type": "field", "inboundTag": [ "tunnel" ], "outboundTag": "portal" } ] }, "outbounds": [ { "protocol": "freedom", "settings": {} } ] }
客户端配置:
{ "log": {"loglevel":"info"}, "reverse":{ "bridges":[ { "tag":"bridge", "domain":"XPS-8940.localhost" // <- 这里是用的大写,实测大小写没有关系 } ] }, "outbounds":[ { "tag":"tunnel", "protocol":"vmess", "settings":{ "vnext":[ { "address":"xxx", "port": 46758, "users":[ { "id":"xxx", "alterId":64 } ] } ] } }, { "protocol":"freedom", "settings":{}, "tag":"out" } ], "routing":{ "rules":[ { // 配置 A 主动连接 B 的路由规则 "type":"field", "inboundTag":[ "bridge" ], "domains":[ "full:XPS-8940.localhost" // <- 注意这里,用的是大写,如果改为小写则问题解决 ], "outboundTag":"tunnel" }, { // 反向连接访问私有网盘的规则 "type":"field", "inboundTag":[ "bridge" ], "outboundTag":"out" } ] } }
请附上出错时软件输出的错误日志
服务器端错误日志:
服务端没有日志(因为根本没有连接上服务端)
客户端错误日志:
$ v2ray -c ~/v2ray/config.json V2Ray 4.38.3 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.16.3 linux/amd64) A unified platform for anti-censorship. 2021/05/13 21:06:25 [Info] main/jsonem: Reading config: /home/alex/v2ray/config.json 2021/05/13 21:06:25 [Debug] app/log: Logger started 2021/05/13 21:06:25 [Warning] V2Ray 4.38.3 started 2021/05/13 21:06:25 [Info] app/dispatcher: taking detour [out] for [tcp:XPS-8940.localhost:0] 2021/05/13 21:06:25 [Info] proxy/freedom: opening connection to tcp:XPS-8940.localhost:0 2021/05/13 21:06:25 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:25 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:25 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:25 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:26 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:26 [Info] app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:XPS-8940.localhost:0 > common/retry: [dial tcp [::1]:0: connect: connection refused] > common/retry: all retry attempts failed 2021/05/13 21:06:26 [Info] common/mux: unexpected EOF > common/mux: failed to read metadata > io: read/write on closed pipe 2021/05/13 21:06:27 [Info] app/dispatcher: taking detour [out] for [tcp:XPS-8940.localhost:0] 2021/05/13 21:06:27 [Info] proxy/freedom: opening connection to tcp:XPS-8940.localhost:0 2021/05/13 21:06:27 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:27 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:27 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:27 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:28 [Info] transport/internet/tcp: dialing TCP to tcp:XPS-8940.localhost:0 2021/05/13 21:06:28 [Info] app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:XPS-8940.localhost:0 > common/retry: [dial tcp [::1]:0: connect: connection refused] > common/retry: all retry attempts failed 2021/05/13 21:06:28 [Info] common/mux: unexpected EOF > common/mux: failed to read metadata > io: read/write on closed pipe ^C
请附上访问日志
详见上文错误日志
其它相关的配置文件(如 Nginx)和相关日志
N/A
如果 V2Ray 无法启动,请附上
--test
命令的输出N/A
如果 V2Ray 服务运行异常,请附上 journal 日志
N/A
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days