Replies: 1 comment
-
|
same |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Report: Reverse Proxy (Portal/Bridge) connection state desynchronization after restarts
Description
The Xray-core Reverse Proxy module fails to maintain or recover connection states correctly when either the
Bridgeor thePortalprocess is restarted. The system enters a "deadlock" state where the Portal holds stale tunnel mappings, or the Bridge fails to re-register after a Portal reboot, leading to hanging connections orEmpty reply from servererrors.Environment
dokodemo-doorinbounds, Bridge (Client) behind NAT connected via Shadowsocks 2022.Steps to Reproduce
curl 127.0.0.1:80on the Portal side.curl 127.0.0.1:80on Portal.curlfrom Step 3 continues to hang and does not recover.curland start a newcurl 127.0.0.1:80.curl. Restart the Portal process while the Bridge is still running. Runcurl 127.0.0.1:80on Portal.curl: (52) Empty reply from server.curl 127.0.0.1:80on Portal.Actual Behavior
Empty reply(EOF).Expected Behavior
Bridge(matching domain), clearing out stale associations.Configurations
Bridge Config (
bridge.json):{ "log": { "loglevel": "warning" }, "reverse": { "bridges": [{ "tag": "bridge", "domain": "reverse.xray.internal" }] }, "outbounds": [ { "tag": "blackhole", "protocol": "blackhole" }, { "protocol": "shadowsocks", "settings": { "servers": [{ "address": "YOUR_PORTAL_IP", "port": 87, "method": "2022-blake3-aes-128-gcm", "password": "YOUR_PASSWORD" }] }, "tag": "to_portal" }, { "tag": "to_local", "protocol": "freedom", "settings": { "redirect": "127.0.0.1:0" } } ], "routing": { "rules": [ { "type": "field", "inboundTag": ["bridge"], "domain": ["full:reverse.xray.internal"], "outboundTag": "to_portal" }, { "type": "field", "inboundTag": ["bridge"], "network": "tcp", "port": "80,443,451,486,643,5228,7443,59962,59964", "outboundTag": "to_local" }, { "type": "field", "inboundTag": ["bridge"], "network": "udp", "port": "304,404,451,487,488,489,543,59964", "outboundTag": "to_local" } ] } }Portal Config (
portal.json):{ "log": { "loglevel": "warning" }, "reverse": { "portals": [{ "tag": "portal", "domain": "reverse.xray.internal" }] }, "inbounds": [ { "listen": "::", "port": 87, "protocol": "shadowsocks", "settings": { "method": "2022-blake3-aes-128-gcm", "password": "YOUR_PASSWORD", "udp": true }, "streamSettings": { "sockopt": { "tcpKeepAliveInterval": 15, "tcpKeepAliveIdle": 15 } }, "tag": "from_bridge" }, { "tag": "public_in_80_tcp", "listen": "0.0.0.0", "port": "80,88", "protocol": "dokodemo-door", "settings": { "address": "127.0.0.1", "port": 80, "network": "tcp" } }, { "tag": "public_in_443_tcp", "listen": "0.0.0.0", "port": "443,453", "protocol": "dokodemo-door", "settings": { "address": "127.0.0.1", "port": 443, "network": "tcp" } } ], "outbounds": [{ "tag": "blackhole", "protocol": "blackhole" }], "routing": { "rules": [ { "type": "field", "inboundTag": ["from_bridge"], "outboundTag": "portal" }, { "type": "field", "inboundTag": ["public_in_80_tcp", "public_in_443_tcp"], "outboundTag": "portal" } ] } }Beta Was this translation helpful? Give feedback.
All reactions