Commit Graph
56 Commits
Author SHA1 Message Date
penguinehis 92c5c2ace6 security fix 2026-07-13 00:57:35 -03:00
penguinehis 9001b47204 security fix 2026-07-13 00:57:28 -03:00
penguinehis ba5b581aaf Fix admin bot 2026-07-13 00:23:16 -03:00
penguinehis 2776eba034 Bot TG 2026-07-13 00:17:55 -03:00
penguinehis 09c1f57a34 bot TG 2026-07-13 00:06:51 -03:00
penguinehis a4798f8db6 fix go mod 2026-07-11 02:12:01 -03:00
penguinehis cc72b92932 Fix Update 2026-07-11 02:07:00 -03:00
penguinehis aea27916e8 Check Update 2026-07-11 02:04:36 -03:00
penguinehis 6f7fa2fad1 Fix idle 2026-07-11 01:51:21 -03:00
penguinehis 4e3c99650e XHTTP SSH 2026-07-10 23:58:27 -03:00
penguinehis cf49340b9a Fix memory leaks 2026-07-10 12:07:13 -03:00
penguinehis 0b80a69192 Fix memory leak 2026-07-10 11:52:08 -03:00
penguinehis 1e9cef9e02 New Documentation 2026-07-09 16:33:29 -03:00
penguinehis 4a0383dce1 Optimization 2026-07-09 15:58:22 -03:00
penguinehisandClaude Opus 4.8 d4046526c9 Mux: refresh UDP idle deadline on uplink; strip added comments
Mux/XUDP cross-check vs xray-core: the wire format (frame layout, status/option
constants, address serialization, GlobalID placement, Keep response framing) is
byte-faithful. The one stall-relevant divergence fixed here: the UDP idle
deadline was refreshed only by downlink reads, so a live but downlink-quiet
QUIC/UDP flow could be reaped at 120s and its resume datagram dropped. Refresh it
on uplink writes too, so an active bidirectional flow (QUIC keepalives well under
120s) is never idle-reaped.

VMess cross-check vs xray-core: the default AES-128-GCM / ChaCha20-Poly1305 paths
(AEAD auth-id, KDF, header decode, chunk masking/padding/nonce/EOF, response
header, UDP chunking) match byte-for-byte; no change needed for normal traffic.

Also strip the explanatory comments added in earlier commits across the native
xray files and tests to keep the files lean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 07:59:14 -03:00
penguinehisandClaude Opus 4.8 e779d2486a Strip added commentary from xray_xhttp.go and tuning
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 07:48:37 -03:00
penguinehisandClaude Opus 4.8 8f088f7cca Match xray-core: keep connected XHTTP sessions alive; WebSocket early data
Two cross-checks against xray-core found separate CRITICAL divergences that stall
real traffic:

XHTTP: the native session reaper had a 5-minute idle timeout that xray-core does
not have. In the default stream-up/stream-down (auto/H2) mode a long download
rides inside the already-open GET/POST and generates no new HTTP requests, so the
idle timer fired and tore the tunnel down mid-transfer (YouTube/large downloads
stalling after a few minutes). Now mirror hub.go: give the downlink GET 30s to
attach, and once connected stop reaping entirely -- the session lives for the
life of the GET, cleaned up by handleXHTTPDownload's deferred delete.

WebSocket: the server handshake ignored Sec-WebSocket-Protocol, silently dropping
0-RTT early data. Clients configured with ?ed=N put the VLESS/VMess request
header there and send no first frame, so the server blocked forever waiting for a
header that never arrived -- every ed= WS client stalled. Now decode the
base64url early data, deliver it before the first frame, and echo the header back,
matching transport/internet/websocket. Also match only the path (ignore the ?ed=
query) when validating the WS path.

Add TestVLESSOverWebSocketEarlyData.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 07:43:24 -03:00
penguinehis 7200dbd236 Fix XHTTP 2026-07-04 23:59:03 -03:00
penguinehisandClaude Opus 4.8 f87023ebff Fix XHTTP regression: drop download-reject guard, widen reorder buffer
The single-download guard added earlier rejected a second stream-down GET for a
session with HTTP 400. On a client reconnect (network hiccup / H2 retry) while
the previous download handler is still blocked on a dead socket, that 400 makes
the client tear the whole session down and every retry keeps failing -- the
tunnel stops passing data entirely. xray-core never rejects a re-GET, so remove
the guard and match it.

Also raise the default XHTTP packet-up reorder buffer from 30 to 512. xray-core
uses 30 because its own client sends POSTs near-in-order, but other clients fan
out many concurrent POSTs that arrive well out of order; 30 tripped the
reassembly-too-large teardown and stalled traffic. The per-inbound
scMaxBufferedPosts still overrides this.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 23:50:49 -03:00
penguinehisandClaude Opus 4.8 e77dc6f62f Pin native Xray transport params to xray-core defaults; keep only safe knobs
Remove the transport-shaping tuning footguns that could break data flow if
misconfigured, and hardcode them to xray-core / Go net/http2 defaults instead:

- HTTP/2: stop overriding MaxConcurrentStreams and the per-conn/per-stream upload
  buffers; use Go's defaults exactly like xray-core's splithttp hub does.
- XHTTP reorder buffer default is now 30 (xray-core scMaxBufferedPosts), still
  overridable per-inbound from the generated config.
- Mux per-connection session cap, mux UDP idle/read/write buffers, and the XHTTP
  session cap are now fixed constants rather than admin knobs.

The XrayNativeTuning struct and admin UI keep only the operator-safe controls:
Go GOMAXPROCS, the global mux-session DoS cap, and the packet-trace debug toggle.
Old config.json files with the removed keys still load (unknown fields ignored).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 23:38:38 -03:00
penguinehisandClaude Opus 4.8 4b9f6c123a Align native Xray with xray-core; drop dead knobs; split admin app.js
Fix the two reliability problems in the in-process Xray emulator by matching
XTLS/Xray-core's transport semantics:

- XHTTP upload queue: rewrite as a faithful port of xray-core's uploadQueue
  (bounded channel + sequence reorder heap). Packet-up POSTs are now acked
  immediately on buffering instead of blocking until the tunnel reader consumes
  them. The old block-until-consumed behavior throttled the uplink to the
  reassembly rate and deadlocked against the client's concurrent-POST limit,
  which showed up as "download a burst, stall, repeat" on video/large downloads.
- Mux: dial the backend and pump uplink on a per-session goroutine fed by a
  bounded channel (mirrors xray-core's per-session buffered pipe). Previously the
  dial and backend writes ran inline in the shared read loop, so one slow target
  or backpressured session stalled every other muxed session.
- XHTTP download writer: flush every write (matches httpServerConn.Write) instead
  of batching behind a 2ms/32KB window.
- XHTTP: enforce a single download (stream-down) per session to stop two GETs
  from splitting the decoded stream and corrupting the tunnel.
- Fix a close-of-closed-channel race in the mux session teardown (sync.Once).

Remove the now-inert XHTTP tuning knobs (xhttp_queue_timeout_ms, xhttp_flush_ms,
xhttp_flush_bytes) from the backend struct and the admin panel UI.

Split admin/assets/app.js into ordered classic-script modules under
admin/assets/js/ for maintainability. The concatenation is byte-identical to the
old file and load order is preserved via defer, so behavior is unchanged.

Add regression tests for the mux head-of-line stall and the out-of-order
packet-up burst-stall; add golang.org/x/text to go.mod so tests build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 23:27:11 -03:00
penguinehis aa676eb081 Fix xray native 2026-07-04 20:24:29 -03:00
penguinehis ea15f1bfa1 Fix xray 2026-07-04 20:24:20 -03:00
penguinehis 4866f0cf10 fix gomod 2026-07-04 18:43:15 -03:00
penguinehis 4f3b961fa3 Merge branch 'main' of https://git.dr2.site/penguinehis/DragonCoreSSH-NewWEB 2026-07-04 18:40:08 -03:00
penguinehis 0b5679bfeb Atualizar update.sh 2026-07-04 18:37:08 -03:00
penguinehis ffe7964330 Atualizar install.sh 2026-07-04 18:36:47 -03:00
penguinehis 0eaa48ffd0 Native Xray 2026-07-04 17:26:01 -03:00
penguinehis 6cd9626db9 optimization 2 2026-05-27 15:09:42 -03:00
penguinehis 1479e6ac73 Optimization 2026-05-27 15:04:01 -03:00
penguinehis f64f7fdc4d Install in any distro 2026-05-15 17:01:24 -03:00
penguinehis 15859dc7f3 Fix apt 2026-05-14 14:33:40 -03:00
penguinehis 60cb2e3cdb Fix xray config bug 2026-05-11 22:45:22 -03:00
penguinehis f1a587e00d Mult node launch 2026-05-11 22:10:17 -03:00
penguinehis 1ad8b868ab FIx mult panel server 2026-05-11 21:52:07 -03:00
penguinehis 67d56b2a76 Fix Mult server 2026-05-11 14:39:55 -03:00
penguinehis b66d194fa7 Mult server 2026-05-11 14:32:16 -03:00
penguinehis 391db7708f New panel 2026-05-10 18:42:38 -03:00
penguinehis 603ae906a1 Fix panel 2026-05-10 18:32:59 -03:00
penguinehis 4a04ff79f0 Fix panel 2026-05-10 18:21:03 -03:00
penguinehis e00a7bd93c Fix panel 2026-05-10 18:14:16 -03:00
penguinehis 77a722d4ed Fix Admin panel and xray count 2026-05-10 18:05:24 -03:00
penguinehis 03c43debf4 Panel Update 2026-05-10 17:52:36 -03:00
penguinehis 51aedfd3c7 Fix Mkdir crash service 2026-05-03 22:02:12 -03:00
penguinehis 3c7b02b8db Fix Daily usage 2026-05-03 21:54:48 -03:00
penguinehis 3ddd934d9a Ignore LO , dont re-enable the iptables redirect if disabled 2026-05-03 11:14:32 -03:00
penguinehis c74f6e2282 New Features and safe log 2026-05-03 11:05:13 -03:00
penguinehis 43482c88fa Fix stuck users 2026-05-03 10:15:28 -03:00
penguinehis 09f3959aa2 Simple update 2026-05-02 23:40:09 -03:00
penguinehis 9b5f436a6e Fix udp description 2026-05-02 23:34:30 -03:00