Skip to content

Commit e1377f3

Browse files
committed
fix(singbox): remove incorrect transport config for tcp in singbox
1 parent 11d743d commit e1377f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/subscription/singbox.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def __init__(self):
2929
"httpupgrade": self._transport_httpupgrade,
3030
"h2": self._transport_http,
3131
"h3": self._transport_http,
32-
"tcp": self._transport_http,
3332
"raw": self._transport_http,
3433
}
3534

@@ -167,6 +166,10 @@ def _apply_transport(self, network: str, inbound: SubscriptionInboundData, path:
167166
if network in ("tcp", "raw") and getattr(inbound.transport_config, "header_type", "none") == "http":
168167
network = "http"
169168

169+
# For pure TCP connections without HTTP headers, don't add transport config
170+
if network in ("tcp", "raw") and getattr(inbound.transport_config, "header_type", "none") != "http":
171+
return None
172+
170173
handler = self.transport_handlers.get(network)
171174
if not handler:
172175
return None

0 commit comments

Comments
 (0)