[GH-ISSUE #4161] direct outbound with freedom protocol breaks TCP data transmission after v26.4.13 #2826

Closed
opened 2026-10-31 20:28:15 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @shurakenas on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4161

Describe the bug

Problem: TCP handshake completes (SYN → SYN-ACK → ACK), but Xray immediately sends FIN without transmitting any data. No errors in logs.
Between v26.4.13 and v26.4.15+ regression broke TCP data transmission for freedom outbound when routing by IP.

How to repeat the problem?

Config (working on v26.4.13, broken on newer):

{
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "AsIs"
      },
      "tag": "direct"
    }
  ],
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "ip": ["192.168.1.0/24"],
        "outboundTag": "direct",
        "type": "field"
      }
    ]
  }
}

Expected action

TCP dump comparison:

v26.4.13 (works):

13:32:00.920773 IP 192.168.66.1.40218 > 192.168.1.95.8006: Flags [P.], length 1121 ← DATA
13:32:00.920894 IP 192.168.66.1.40218 > 192.168.1.95.8006: Flags [P.], length 753  ← DATA

192.168.66.1 - ip awg tunnel
192.168.1.95.8006 - behind the tunnel of the house (proxmox)

Received action

v26.4.15+ (broken):

13:30:36.336738 IP 192.168.66.1.57880 > 192.168.1.95.8006: Flags [F.] ← FIN, no data

192.168.66.1 - ip awg tunnel
192.168.1.95.8006 - behind the tunnel of the house (proxmox)

3x-ui Version

2.9.3

Xray-core Version

26.4.15+

Checklist

  • This bug report is written entirely in English.
  • This bug report is new and no one has reported it before me.

This worked in v26.4.13 and stopped working in all later versions (26.4.15+).

Originally created by @shurakenas on GitHub (May 5, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4161 ### Describe the bug Problem: TCP handshake completes (SYN → SYN-ACK → ACK), but Xray immediately sends FIN without transmitting any data. No errors in logs. Between v26.4.13 and v26.4.15+ regression broke TCP data transmission for freedom outbound when routing by IP. ### How to repeat the problem? Config (working on v26.4.13, broken on newer): ``` { "outbounds": [ { "protocol": "freedom", "settings": { "domainStrategy": "AsIs" }, "tag": "direct" } ], "routing": { "domainStrategy": "AsIs", "rules": [ { "ip": ["192.168.1.0/24"], "outboundTag": "direct", "type": "field" } ] } } ``` ### Expected action TCP dump comparison: v26.4.13 (works): ``` 13:32:00.920773 IP 192.168.66.1.40218 > 192.168.1.95.8006: Flags [P.], length 1121 ← DATA 13:32:00.920894 IP 192.168.66.1.40218 > 192.168.1.95.8006: Flags [P.], length 753 ← DATA ``` 192.168.66.1 - ip awg tunnel 192.168.1.95.8006 - behind the tunnel of the house (proxmox) ### Received action v26.4.15+ (broken): ``` 13:30:36.336738 IP 192.168.66.1.57880 > 192.168.1.95.8006: Flags [F.] ← FIN, no data ``` 192.168.66.1 - ip awg tunnel 192.168.1.95.8006 - behind the tunnel of the house (proxmox) ### 3x-ui Version 2.9.3 ### Xray-core Version 26.4.15+ ### Checklist - [x] This bug report is written entirely in English. - [x] This bug report is new and no one has reported it before me. This worked in v26.4.13 and stopped working in all later versions (26.4.15+).
bsakaguchi 2026-10-31 20:28:15 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@paulpeef commented on GitHub (May 13, 2026):

Related to #4170 (same config pattern) with identical symptom as described here.

Additional reproduction case:

Same root cause confirmed in a different topology. Setup:

  • Xray version: v26.4.25 (via 3X-UI)
  • Inbound: VLESS + REALITY
  • Outbound: freedom protocol with "redirect": "127.0.0.1:443" (routing MTProto proxy traffic to a local instance)
  • Routing rule: domain: ["full:domain.com"] → proxy-local

Observed behavior: Xray correctly sniffs the domain and routes to the freedom outbound. Access log shows [inbound -> proxy-local]. However, tcpdump -i lo 'tcp port 443' shows every connection as:

SYN → 127.0.0.1:443
SYN-ACK ←
ACK
FIN, length=0   ← no data forwarded

The service receives the TCP handshake but zero bytes of payload. Connection is immediately closed by Xray.

<!-- gh-comment-id:4444387731 --> @paulpeef commented on GitHub (May 13, 2026): _Related to [#4170](https://github.com/MHSanaei/3x-ui/issues/4170) (same config pattern) with identical symptom as described here._ **Additional reproduction case:** Same root cause confirmed in a different topology. Setup: - Xray version: v26.4.25 (via 3X-UI) - Inbound: VLESS + REALITY - Outbound: freedom protocol with "redirect": "127.0.0.1:443" (routing MTProto proxy traffic to a local instance) - Routing rule: domain: ["full:domain.com"] → proxy-local **Observed behavior:** Xray correctly sniffs the domain and routes to the freedom outbound. Access log shows `[inbound -> proxy-local]`. However, `tcpdump -i lo 'tcp port 443'` shows every connection as: ``` SYN → 127.0.0.1:443 SYN-ACK ← ACK FIN, length=0 ← no data forwarded ``` The service receives the TCP handshake but **zero bytes** of payload. Connection is immediately closed by Xray.
Author
Owner

@shurakenas commented on GitHub (May 29, 2026):

Has it been fixed?

<!-- gh-comment-id:4579837937 --> @shurakenas commented on GitHub (May 29, 2026): Has it been fixed?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#2826
No description provided.