Closed armstrongchen closed 19 hours ago
如题,感觉是路由出现问题了,请求 API 后,Xray 把请求又转发到了 127.0.0.1:0。出现问题的版本从 24.9.16(9.19)版本开始,到 24.11.21。
可通过执行 xray api statsquery --server=127.0.0.1:10085 复现该问题
N/A
{ "log": { "loglevel": "none", "error": "/dev/shm/v2ray_error.log", "access": "/dev/null" }, "stats": {}, "api": { "tag": "api", "services": [ "StatsService" ] }, "policy": { "system": { "statsInboundUplink": true, "statsInboundDownlink": true }, "levels": { "0": { "statsUserUplink": true, "statsUserDownlink": true, "handshake": 5, "connIdle": 180 } } }, "inbounds": [ { "listen": "0.0.0.0", "port": 8443, "protocol": "vless", "settings": { "clients": [ { "email": "user1@contoso.com", "id": "c9f53028-0cfb-4054-bae3-09447f9f2f12" }, { "email": "user2@contoso.com", "id": "28865850-8188-4d1b-bede-67e4da8504ed" } ], "decryption": "none" }, "streamSettings": { "network": "h2", "security": "reality", "realitySettings": { "show": false, "dest": "contoso.com:443", "xver": 0, "serverNames": [ "" ], "privateKey": "reality_private_key", "shortIds": [ "short_id" ] } }, "sniffing": { "enabled": true, "destOverride": [ "http", "tls", "quic" ] } }, { "listen": "127.0.0.1", "port": 10085, "protocol": "dokodemo-door", "settings": { "address": "127.0.0.1" }, "tag": "api" } ], "outbounds": [ { "protocol": "freedom", "tag": "direct", "settings": { "domainStrategy": "UseIPv4" } }, { "protocol": "blackhole", "tag": "block" } ], "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ { "type": "field", "ip": [ "geoip:cn" ], "outboundTag": "block" } ], "settings": { "rules": [ { "inboundTag": [ "api" ], "outboundTag": "api", "type": "field" } ] }, "strategy": "rules" } }
2024/11/25 11:58:42 [Debug] app/log: Logger started 2024/11/25 11:58:42 [Debug] app/proxyman/inbound: creating stream worker on 0.0.0.0:8443 2024/11/25 11:58:42 [Debug] app/stats: create new counter inbound>>>api>>>traffic>>>uplink 2024/11/25 11:58:42 [Debug] app/stats: create new counter inbound>>>api>>>traffic>>>downlink 2024/11/25 11:58:42 [Debug] app/proxyman/inbound: creating stream worker on 127.0.0.1:10085 2024/11/25 11:58:42 [Info] transport/internet/tcp: listening TCP on 127.0.0.1:10085 2024/11/25 11:58:42 [Warning] core: Xray 24.9.19 started 2024/11/25 11:58:57 [Debug] [714137587] proxy/dokodemo: processing connection from: 127.0.0.1:44418 2024/11/25 11:58:57 [Info] [714137587] proxy/dokodemo: received request for 127.0.0.1:44418 2024/11/25 11:58:57 [Info] [714137587] app/dispatcher: default route for tcp:127.0.0.1:0 2024/11/25 11:58:57 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Info] [714137587] app/proxyman/outbound: app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:127.0.0.1:0 > common/retry: [dial tcp 127.0.0.1:0: connect: connection refused] > common/retry: all retry attempts failed 2024/11/25 11:58:58 [Info] [714137587] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe 2024/11/25 11:58:59 [Debug] [1274143607] proxy/dokodemo: processing connection from: 127.0.0.1:44434 2024/11/25 11:58:59 [Info] [1274143607] proxy/dokodemo: received request for 127.0.0.1:44434 2024/11/25 11:58:59 [Info] [1274143607] app/dispatcher: default route for tcp:127.0.0.1:0 2024/11/25 11:58:59 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Info] [1274143607] app/proxyman/outbound: app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:127.0.0.1:0 > common/retry: [dial tcp 127.0.0.1:0: connect: connection refused] > common/retry: all retry attempts failed 2024/11/25 11:59:00 [Info] [1274143607] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe
意思是24.9.16之前没问题?
。。。路由根本没写rule里 不知道哪冒出来一个settings字段 别又是chatgpt抄来的。。。
对,最后一个可以使用的版本是 24.9.7,至少 1.8.24 是可以使用的,而这个配置是从 1.8.1 开始沿用至今的。
一些早就弃用文档里都没有的写法被删了
完整性要求
描述
如题,感觉是路由出现问题了,请求 API 后,Xray 把请求又转发到了 127.0.0.1:0。出现问题的版本从 24.9.16(9.19)版本开始,到 24.11.21。
重现方式
可通过执行 xray api statsquery --server=127.0.0.1:10085 复现该问题
客户端配置
N/A
服务端配置
{ "log": { "loglevel": "none", "error": "/dev/shm/v2ray_error.log", "access": "/dev/null" }, "stats": {}, "api": { "tag": "api", "services": [ "StatsService" ] }, "policy": { "system": { "statsInboundUplink": true, "statsInboundDownlink": true }, "levels": { "0": { "statsUserUplink": true, "statsUserDownlink": true, "handshake": 5, "connIdle": 180 } } }, "inbounds": [ { "listen": "0.0.0.0", "port": 8443, "protocol": "vless", "settings": { "clients": [ { "email": "user1@contoso.com", "id": "c9f53028-0cfb-4054-bae3-09447f9f2f12" }, { "email": "user2@contoso.com", "id": "28865850-8188-4d1b-bede-67e4da8504ed" } ], "decryption": "none" }, "streamSettings": { "network": "h2", "security": "reality", "realitySettings": { "show": false, "dest": "contoso.com:443", "xver": 0, "serverNames": [ "" ], "privateKey": "reality_private_key", "shortIds": [ "short_id" ] } }, "sniffing": { "enabled": true, "destOverride": [ "http", "tls", "quic" ] } }, { "listen": "127.0.0.1", "port": 10085, "protocol": "dokodemo-door", "settings": { "address": "127.0.0.1" }, "tag": "api" } ], "outbounds": [ { "protocol": "freedom", "tag": "direct", "settings": { "domainStrategy": "UseIPv4" } }, { "protocol": "blackhole", "tag": "block" } ], "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ { "type": "field", "ip": [ "geoip:cn" ], "outboundTag": "block" } ], "settings": { "rules": [ { "inboundTag": [ "api" ], "outboundTag": "api", "type": "field" } ] }, "strategy": "rules" } }
客户端日志
N/A
服务端日志
2024/11/25 11:58:42 [Debug] app/log: Logger started 2024/11/25 11:58:42 [Debug] app/proxyman/inbound: creating stream worker on 0.0.0.0:8443 2024/11/25 11:58:42 [Debug] app/stats: create new counter inbound>>>api>>>traffic>>>uplink 2024/11/25 11:58:42 [Debug] app/stats: create new counter inbound>>>api>>>traffic>>>downlink 2024/11/25 11:58:42 [Debug] app/proxyman/inbound: creating stream worker on 127.0.0.1:10085 2024/11/25 11:58:42 [Info] transport/internet/tcp: listening TCP on 127.0.0.1:10085 2024/11/25 11:58:42 [Warning] core: Xray 24.9.19 started 2024/11/25 11:58:57 [Debug] [714137587] proxy/dokodemo: processing connection from: 127.0.0.1:44418 2024/11/25 11:58:57 [Info] [714137587] proxy/dokodemo: received request for 127.0.0.1:44418 2024/11/25 11:58:57 [Info] [714137587] app/dispatcher: default route for tcp:127.0.0.1:0 2024/11/25 11:58:57 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:57 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Info] [714137587] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Debug] [714137587] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:58 [Info] [714137587] app/proxyman/outbound: app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:127.0.0.1:0 > common/retry: [dial tcp 127.0.0.1:0: connect: connection refused] > common/retry: all retry attempts failed 2024/11/25 11:58:58 [Info] [714137587] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe 2024/11/25 11:58:59 [Debug] [1274143607] proxy/dokodemo: processing connection from: 127.0.0.1:44434 2024/11/25 11:58:59 [Info] [1274143607] proxy/dokodemo: received request for 127.0.0.1:44434 2024/11/25 11:58:59 [Info] [1274143607] app/dispatcher: default route for tcp:127.0.0.1:0 2024/11/25 11:58:59 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:58:59 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Info] [1274143607] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Debug] [1274143607] transport/internet: dialing to tcp:127.0.0.1:0 2024/11/25 11:59:00 [Info] [1274143607] app/proxyman/outbound: app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:127.0.0.1:0 > common/retry: [dial tcp 127.0.0.1:0: connect: connection refused] > common/retry: all retry attempts failed 2024/11/25 11:59:00 [Info] [1274143607] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe