Skip to content

Releases

v2.5.9-fragment.2: Live Stats, Diagnostics, Logging & Stream Protection

Choose a tag to compare

@mateika8814 mateika8814 released this 01 Nov 02:09
5de8ef7

Clash Verge Rev v2.5.9 with TLS ClientHello Fragmentation (v2.5.9-fragment.2)

Forked by mateika8814 (https://github.com/mateika8814)
Source Code for this Release: v2.5.9-fragment.2 Source Code


Upstream Base Versions & Commit Hashes


What's New & Fixed in v2.5.9-fragment.2

1. Core TLS ClientHello Fragmentation & Network Safety

  • Single-Byte Initial Write Protection (conn.go):
    Buffers single-byte 0x16 writes and determines TLS record classification only after receiving subsequent bytes. Non-TLS streams bypass fragmentation immediately without data corruption or premature termination.
  • Guaranteed Delivery on Buffering Timeout (Zero Data Loss):
    Fixed onBufferTimeout() with complete writeAll loop handling partial writes. Any write error during timeout flush is stored and returned on subsequent socket operations.
  • Accurate Length Clamping ([minLen, maxLen]):
    In sni mode, fragment chunks are clamped strictly inside the SNI domain extension boundary to ensure effective TSPU/DPI evasion without splitting outside the SNI window.
  • Real Loopback TCP Integration Tests:
    Added comprehensive tests in conn_test.go verifying OS kernel TCP segmentation, TCP_NODELAY, inter-packet interval delays, and exact byte reassembly.

2. Structured Fragment Logger & GUI Log Viewer Integration

  • Direct GUI Logs Integration:
    Fragment events stream directly into Clash Verge's native Logs (Журнал) viewer.
  • Rate-Limited Logging (logger.go):
    Burst control limit (15 msgs/s) prevents GUI log flooding during massive concurrent connection spikes.
  • Privacy SNI Masking (sni.go):
    Sensitive domain names in logs and diagnostics are automatically masked (e.g. y***e.com, t***m.org).
  • Dedicated Log Level Filter:
    Added dedicated Fragment dropdown filter in the Logs page, color-coded level chips (INFO, DEBUG, WARNING, ERROR), and distinct purple gradient badge.

3. Real-Time Fragment Statistics & Diagnostics Engine

  • Core REST API Endpoints:
    • GET /fragment/stats: Returns atomic counters for active connections, fragmented streams, timeouts, mode distribution (sni, random, record_fragment, both), and last error.
    • POST /fragment/stats/reset: Safely resets runtime counters.
    • GET /fragment/diagnostics: Runs 9 non-destructive internal self-checks.
  • GUI Diagnostics & Live Stats Card (fragment-diagnostics-card.tsx):
    Integrated directly inside Settings -> Fragment Card.
    • Live statistics grid with mode counters and error alerts.
    • Interactive "Run Diagnostics" button with real-time test progress, duration timings, and detailed pass/fail table.
    • Fully localized in English, Russian, and Chinese.

4. Cross-Platform Compatibility & Clean Patch

  • Removed Windows-only syscall.Handle dependencies from generic core code; builds cleanly across Windows, Linux, and macOS.
  • Re-generated core/fragment.patch as UTF-8 (no BOM, LF) verifying reverse/forward patch application.

5. Packaging & Distribution

  • Windows Setup Installer: Full Inno Setup installer wizard with desktop shortcut, autostart, and uninstaller.
  • Portable Zip: Pre-configured portable edition containing custom Mihomo alpha core, pre-downloaded GeoIP/GeoSite databases, and default Russian language UI.

Warning

Stock Core Incompatibility: The standard upstream Mihomo/Clash core does NOT support the fragment: configuration block. This feature requires the customized core included in this release (verge-mihomo.exe) or built from the core/ folder.


Known Limitations & DPI Transparency

  • ISP/DPI Architecture: Bypassing TSPU / DPI depends on specific ISP filtering configurations. No evasion mechanism can guarantee 100% bypass in all network topologies.
  • Reality Protocol Compatibility: Multi-record fragmentation (record_fragment, both) with VLESS Reality endpoints is experimental. If handshakes fail with Reality servers, switch the fragment mode to sni.
  • Wire-Level Inspection: While [Fragment] logs confirm segmentation operations in software, actual TCP packet boundaries across physical hops can be verified using Wireshark or Npcap if middlebox aggregation is suspected.

Release Artifacts & SHA256 Checksums

File Type SHA256 Checksum
Clash-Verge-Rev-Setup-v2.5.9-Fragment-Fork-2.exe Windows Setup Installer 216d2699318b5352c1b24a56d4f6e43e08aa6c0f43ee92b6298d89b63b937c58
Clash-Verge-Rev-Portable-v2.5.9-Fragment-Fork-2.zip Portable Zip Archive 67e972c26edd0769541b861795f0245d846cb0379f7fb2450559fe9fd6ba4542
SHA256SUMS.txt Checksum Manifest See attached file

Verification in PowerShell:

Get-FileHash .\Clash-Verge-Rev-Setup-v2.5.9-Fragment-Fork-2.exe -Algorithm SHA256
Get-FileHash .\Clash-Verge-Rev-Portable-v2.5.9-Fragment-Fork-2.zip -Algorithm SHA256

Verification in Linux / macOS:

sha256sum -c SHA256SUMS.txt

Source Code & License (GPLv3)

In compliance with the GNU General Public License v3.0, the binaries in this release correspond directly to the source tree on branch dev.

v2.5.9-fragment.1: TLS ClientHello Fragmentation

Choose a tag to compare

@mateika8814 mateika8814 released this 01 Nov 02:17

Clash Verge Rev v2.5.9 with TLS ClientHello Fragmentation (Fork)

Forked by mateika8814 (https://github.com/mateika8814)
Source Code for this Release: v2.5.9-fragment.1 Source Code


Upstream Base Versions


What's Added

  1. Full TLS ClientHello Fragmentation Engine (Anti-DPI / TSPU Bypass):
    • 4 Fragmentation Modes:
      • sni: Splits the TCP payload at the SNI server_name extension boundary.
      • random: Randomizes chunk sizes across the ClientHello within the specified length range (e.g. 10-30).
      • record_fragment: Splits the TLS ClientHello into multiple RFC-compliant TLS records (Content Type 0x16).
      • both: Combines multi-record TLS fragmentation with delayed TCP segmentation.
    • Timing Delay: Configurable interval (e.g. 1-5 ms) between packets.
    • Safe Fallback: If an unknown mode is provided, core logs a warning and falls back to sni.
  2. GUI & Runtime Config:
    • Per-node configuration dialog («TLS Fragmentation») in proxy list.
    • Global card in Settings -> Clash Setting with «Apply to all TLS nodes» toggle.
    • Automatic contract injection into generated core runtime configuration.
  3. Core Sources & Patch:
    • Full mihomo source included under core/.
    • Patch file core/fragment.patch documenting all changes.

Warning

Stock Core Incompatibility: The standard/stock Mihomo/Clash core does NOT understand the fragment: configuration block. This feature requires the customized core included in this portable release (verge-mihomo.exe) or built from the core/ folder.


Known Limitations & Honest Transparency

  • ISP/DPI Dependent: Bypassing TSPU / DPI depends on your ISP equipment and filtering configuration. No tool can guarantee 100% bypass of all blocks.
  • Physical Wire Verification: Wire-level fragmentation was verified with Npcap/Wireshark captures on physical Ethernet for all four modes (sni, random, record_fragment, both).
  • Reality Compatibility: Multi-record modes (record_fragment, both) with VLESS Reality servers are experimental. If handshake fails with a Reality endpoint, use mode sni.

Release Artifacts & SHA256

File SHA256 Checksum
Clash-Verge-Rev-Portable-v2.5.9-Fragment-Fork.zip 9873233c0ffc77fc51daf71696774cf71f79d512b43d8a85152f07d2adedb9dc

Verification in PowerShell:

Get-FileHash .\Clash-Verge-Rev-Portable-v2.5.9-Fragment-Fork.zip -Algorithm SHA256

Source Code & License (GPLv3)

In compliance with the GNU General Public License v3.0, the binaries in this release correspond directly to the source tree tagged at v2.5.9-fragment.1.