Xray-core icon indicating copy to clipboard operation
Xray-core copied to clipboard

XHTTP: Session ID change breaks compat between latest pre-release and stable

Open mansaliacom opened this issue 5 months ago • 1 comments

Integrity requirements

  • [x] I have read all the comments in the issue template and ensured that this issue meet the requirements.
  • [x] I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • [x] I provided the complete config and logs, rather than just providing the truncated parts based on my own judgment.
  • [x] I searched issues and did not find any similar issues.
  • [x] The problem can be successfully reproduced in the latest Release

Description

The recent change (e10347bf01f28bca118002963ee29bbcf529cb25) made clients running stable xray unable to connect to an XHTTP server utilising sessionID* options. Both NewClient + OldServer and OldClient + NewServer combinations are affected.

Reproduction Method

Feed the given configs to two xray instances, then test connectivity like this:

curl -sS --out-null -x socks5h://127.0.0.1:8089 https://wiby.me

It should error out.

Client config


log:
  loglevel: info
inbounds:
  - protocol: socks
    listen: 127.0.0.1
    port: 8089
    settings:
      udp: true

outbounds: - protocol: vless settings: address: 127.0.0.1 port: 8080 id: a encryption: none streamSettings: network: xhttp xhttpSettings: mode: packet-up path: / extra: sessionKey: Whatever sessionPlacement: header

Server config


log:
  loglevel: info

outbounds:

  • protocol: freedom

inbounds: - protocol: vless listen: 127.0.0.1 port: 8080 settings: clients: - id: a decryption: none streamSettings: network: xhttp xhttpSettings: mode: packet-up path: / extra: sessionKey: Whatever sessionPlacement: header

Client log


Xray 26.3.27 (Xray, Penetrates Everything.) Custom (go1.26.3 linux/amd64)
A unified platform for anti-censorship.
2026/07/02 08:57:55.008146 [Info] infra/conf/serial: Reading config: &{Name:client.yml Format:yaml}
2026/07/02 08:57:55.009653 [Info] transport/internet/tcp: listening TCP on 127.0.0.1:8089
2026/07/02 08:57:55.009670 [Info] transport/internet/udp: listening UDP on 127.0.0.1:8089
2026/07/02 08:57:55.009974 [Warning] core: Xray 26.3.27 started
2026/07/02 08:57:57.064266 [Info] [599957143] proxy/socks: TCP Connect request to tcp:wiby.me:443
2026/07/02 08:57:57.064318 [Info] [599957143] app/dispatcher: default route for tcp:wiby.me:443
2026/07/02 08:57:57.064345 [Info] [599957143] transport/internet/splithttp: XHTTP is dialing to tcp:127.0.0.1:8080, mode packet-up, HTTP version 1.1, host 127.0.0.1
2026/07/02 08:57:57.064362 from tcp:127.0.0.1:54382 accepted tcp:wiby.me:443
2026/07/02 08:57:57.064761 [Info] [599957143] proxy/vless/outbound: tunneling request to tcp:wiby.me:443 via 127.0.0.1:8080
2026/07/02 08:57:57.065335 [Info] [599957143] transport/internet/splithttp: unexpected status 400

Server log


Xray 26.6.27 (Xray, Penetrates Everything.) Custom (go1.26.3 linux/amd64)
A unified platform for anti-censorship.
2026/07/02 08:57:43.842641 [Info] infra/conf/serial: Reading config: &{Name:server.yml Format:yaml}
2026/07/02 08:57:43.845228 [Info] transport/internet/splithttp: listening TCP for XHTTP on 127.0.0.1:8080
2026/07/02 08:57:43.845360 [Warning] core: Xray 26.6.27 started
2026/07/02 08:57:45.993037 [Info] [3730513281] proxy/vless/inbound: firstLen = 1586
2026/07/02 08:57:45.993070 [Info] [3730513281] proxy/vless/inbound: received request for tcp:wiby.me:443
2026/07/02 08:57:45.993082 [Info] [3730513281] app/dispatcher: default route for tcp:wiby.me:443
2026/07/02 08:57:45.993137 from 127.0.0.1:43450 accepted tcp:wiby.me:443
2026/07/02 08:57:46.528591 [Info] [3730513281] proxy/freedom: dialing to tcp:172.93.49.252:443
2026/07/02 08:57:46.528792 [Info] [3730513281] transport/internet/tcp: dialing TCP to tcp:172.93.49.252:443
2026/07/02 08:57:46.529280 [Info] [3730513281] proxy/freedom: connection opened to tcp:wiby.me:443, local endpoint 192.168.1.103:52564, remote endpoint 172.93.49.252:443
2026/07/02 08:57:57.064939 [Info] transport/internet/splithttp: stream-one mode is not allowed

mansaliacom avatar Jul 02 '26 00:07 mansaliacom

是字段改名了 不是代码逻辑问题

Fangliding avatar Jul 02 '26 04:07 Fangliding