Commit Graph
87 Commits
  • feat(xray): update xray-core to v26.9.30 and adapt panel
    Bump xtls/xray-core to b26a91de4f (v26.9.30) and the three binary pins
    (DockerInit.sh, release.yml Linux + Windows) in lockstep. No deleted
    symbols; the sing and sing-shadowsocks indirect deps drop out with the
    SS2022 rewrite.
    
    XDNS finalmask (#6718) replaced its string lists with objects: domains
    are {name, types, edns0, lenLimit, labelLimit} and client resolvers
    {type, settings.addr}. The loader no longer parses the old lists, so a
    single stored xdns mask keeps the whole core from starting. The new leaf
    package internal/util/maskcompat converts them: "name[:type]" becomes a
    domain and "name[:type]+udp://addr" a domain plus a udp resolver. A bare
    name maps to TXT, the type legacy clients queried by default, and each
    converted domain keeps the 1232-byte EDNS0 the old code always used
    (without it the server caps answers at 512). It runs from:
    - the XdnsFinalmaskObjectsFix seeder, over inbound streams, hosts, the
      xray template, the global sub-JSON mask and cached subscription
      outbounds;
    - inbound save (normalizeStreamSettings) and GetXrayConfig, for rows
      that never went through the seeder;
    - both link importers, since fm= from an older panel carries the lists.
    The finalmask form edits the object shape (every key needs a registered
    field, or the finalmask watch drops it on save) and lifts legacy masks
    on open. The udp-mask golden fixture moves to the object shape, which
    TestGoldenStreamFixturesBuildInXray now builds through the core. The
    wire format changed as well, so pre-upgrade clients need the new core.
    
    WireGuard outbound (#6771) dropped settings.domainStrategy and the
    remoteDNS "local" mode. The endpoint lookup now follows
    sockopt.domainStrategy and in-tunnel targets the outbound's
    targetStrategy. The old key is silently ignored, which undid the
    IPv4-first endpoint lookup the WARP outbound depends on (#5205), and
    "local" now panics the core at startup because remoteDNS goes through
    netip.MustParseAddr. The WireguardDomainStrategyFix seeder moves a stored
    family preference to both keys (a value already set wins) and turns
    "local" into targetStrategy; the outbound form lifts legacy rows the same
    way and drops its select, the WARP modal writes the new placement, and
    the inbound form loses a field the server never read.
    ValidateOutboundConfig now refuses a non-IP remoteDNS entry, which
    conf.Build() lets through, on template save and for outbound
    subscriptions.
    
    Noise finalmask items accept type "exp" (#6862), a tag expression. The
    form offers it for noise items only: header-custom items go through the
    core's PraseByteSlice, which refuses it.
    
    TUN gained autoSystemDnsToGateway (Linux) and autoSystemWfpBlockLeak
    (Windows). Both pass through the settings schema so a value set in JSON
    survives the next form save.
    
    MASQUE (inbound, outbound, transport) and the XDRIVE transport are new
    protocols the panel does not offer yet; their new loader refusals only
    cover configs the panel never generates. The FakeDNS IPv6 pool default,
    the SS2022 rewrite (same gRPC account; emails are now deduped
    case-insensitively, as the panel already does), the restored udphop
    interval default and the rest change no panel-facing config.
  • Feature/tuic v5 (#6337)
    * Feat(tuic): Implement native TUIC v5 protocol support via Rust sidecar daemon
    
    - Add internal/tuic package for official tuic-server sidecar lifecycle management, configuration generation, and graceful process control
    - Bridge decrypted TUIC QUIC traffic into loopback Xray SOCKS5 inbounds (63200+id) for traffic accounting, statistics, and routing rules
    - Implement periodic reconciliation job (cadence @every 10s) and immediate runtime synchronization on inbound/client mutations
    - Add TUIC inbound & multi-user client settings (UUID + Password authentication) in Web UI with SNI auto-fill and panel certificate loader
    - Integrate tuic:// subscription links and Clash.Meta (Mihomo) proxy generation for TUIC
    - Update install.sh to automatically download and install official tuic-server release for x86_64, aarch64, and armv7
    - Add full localization for TUIC protocol across all 13 supported languages
    
    * Feat(install): Support custom repository and branch in install and update scripts
    
    * Ci(release): Enable publish-dev for feature branch and workflow dispatch
    
    * Feat(sub): Add TUIC to subscription resolution and client QR config generator
    
    - Add 'tuic' to getInboundsBySubId SQL allowlist to resolve TUIC inbounds in subscriptions and sub links
    - Enhance buildTuicProxy in Clash subscription generator with robust host and credentials resolution
    - Add tuicConfig.ts to generate standalone Clash/Mihomo YAML configuration
    - Add dedicated TUIC Config tab in ClientQrModal with QR code and .yaml download button
    - Add localization keys for TUIC config across all 13 supported languages
    
    * Fix(tuic): Exclude TUIC from native Xray inbounds and strip udp_relay_mode from server config
    
    - Exclude model.TUIC from native Xray inbounds in GetXrayConfig to prevent Xray startup failure
    - Remove udp_relay_mode from tuic-server JSON configuration builder
    - Update install.sh to install tuic-server binary to both xui_folder/bin and /usr/local/bin
    
    * Fix(install): Fallback to dev-latest when releases/latest is not present on fork
    
    * Feat(tuic): Add real-time online status and LastOnline tracking for TUIC clients
    
    - Track client activity by mapping client UUID in tuic-server logs to email
    - Integrate TUIC active clients into XrayTrafficJob to refresh local online clients
    - Bump LastOnline timestamp in database and broadcast live online status over WebSocket
    
    * Feat(tuic): Implement real-time traffic statistics and live speed reporting for TUIC
    
    - Collect precise I/O traffic deltas for tuic-server child processes via /proc/<pid>/io
    - Aggregate and attribute TUIC traffic deltas per client in tuic Manager
    - Integrate TUIC traffic deltas into XrayTrafficJob to update database and broadcast live speed
    
    * Feat(tuic): Finalize TUIC v5 integration with 1:1 traffic counting and orphan process cleanup
    - Use exact 1:1 byte delta accounting from /proc/<pid>/io
    - Add killStrayTuicProcesses to terminate orphan sidecars on panel startup
    - Fully integrate TUIC with subscriptions, live speed meter, and all 13 locales
    
    * Feat(frontend): Polish TUIC UI, support bulk operations, and update translations
    
    - Align TUIC inbound certificate form with standard 3X-UI layout (Set Default Cert, Clear)
    - Remove extra subtitle hint text from TUIC inbound form fields
    - Support TUIC in client bulk attach/detach and bulk add modals
    - Add TUIC badge color to client info modal, clients table, and host list
    - Update password tooltip across all 13 locales to include TUIC
    - Remove obsolete dead translation keys across all 13 locales
    
    * Chore(ci): Finalize TUIC v5 bundling across release workflow, Docker, and scripts
    
    * Feat(openapi): Update OpenAPI generator and schemas for TUIC types
    
    * Fix(backend): Address core review findings for TUIC types, port checks, and xray bridge
    
    * Refactor(traffic): Isolate proc reading with build tags and decouple TUIC metering into TuicJob
    
    * Feat(client): Add TuicServer to InboundOption, fix config export and clean share links
    
    * Fix(frontend): Register TUIC in multi-user helpers, tracked protocols, and tag derivation
    
    * Chore(openapi): Re-generate OpenAPI specification and sync Zod schemas
    
    * Chore(scripts): Add Alpine musl binaries, 386 and Windows packaging, and anchor pkill
    
    * Fix(review): Remove stale import, correct binary names, switch to musl, and drop unreachable relay gate
    
    * Feat(frontend): Show share link in Inbound Info and display UDP tag for TUIC
    
    * Docs: Add TUIC v5 configuration guide and link specifications
    
    * Docs(tuic): Correct Clash Meta configuration parameter to reduce-rtt
    
    * Fix(tuic): Generate client credentials on copy, enforce ID/password validation, and add i386 to DockerInit
    
    * Fix(tuic): drop unused relay, fix traffic accounting, and honor host endpoints
    
    - Drop unused loopback SOCKS relay and eliminate port collision with AmneziaWG
    - Correct inbound traffic calculation without double-counting
    - Drop heuristic client traffic division while retaining online tracking
    - Support externalProxy host fan-out and conditional parameters in share links
    - Scope orphan process termination to managed config directory
    
    * Fix(tuic): enforce client quotas, decouple Xray restart, and sync openapi schemas
    
    - Regenerate OpenAPI, Zod schemas, and TypeScript types without route_through_xray
    - Populate clientTraffics in TuicJob to enforce client quotas and first-use expiry
    - Split process I/O delta into up and down in Process.CollectTraffic
    - Remove SetNeedRestart from updateTuicInbound to prevent Xray session drops
    - Use InstanceFromInbound for default ALPN and UDP relay mode in tuic:// share links
    - Support allow_insecure on externalProxy host endpoints without parameter collision
    
    * Fix(tuic): attribute client traffic only on single-user inbounds and sync link defaults
    
    - Attribute I/O deltas to the client only when the inbound has exactly one configured client, avoiding false billing and disablings on multi-user inbounds
    - Aggregate client traffic by email in TuicJob so clients on multiple inbounds don't lose deltas
    - Match frontend genTuicLink defaults for alpn and udp_relay_mode with backend subscription links
    
    * Fix(tuic): gate client traffic by total sidecar clients and require client email
    
    * Fix(tuic): enforce inbound-only traffic limits and disable client totalGB
    
    * fix(tuic): restore delayed start, remove client totalGB rejection, and document linux-only limits
    
    * fix(tuic): anchor pkill, fix io baseline/split, escape yaml, and deduplicate start errors
    
    * fix(tuic): prevent traffic double-counting, ensure info log level for delayed start, and broaden pkill matching
    
    * fix(tuic): address review round 11 findings
    
    - internal/sub/json_service: skip tuic protocol in json subscription to prevent direct routing leak
    - internal/sub/clash_service: honor externalProxy/host row allowInsecure, sni, and alpn in buildTuicProxy
    - internal/web/runtime: decouple tuic inbound add/delete from xray restart
    - internal/tuic/config: restore user log-level options (warn, error) without forced info clamp
    - frontend/src/lib/xray/inbound-link: fix duplicate remark suffix and apply externalProxy TLS overrides
    - frontend/src/schemas/protocols/stream/external-proxy: propagate allowInsecure through host mapping
    - tests: add coverage for json sub skip, clash proxy overrides, and link generation
    
    * fix(tuic): meter inbound traffic through a UDP relay and bracket IPv6 binds
    
    Review repairs on the TUIC v5 sidecar integration:
    
    - Inbound traffic was read from the sidecar's /proc/<pid>/io rchar, but
      the kernel only counts read()/write() there and tuic-server moves its
      sockets with recvfrom/recvmmsg/sendmmsg/sendto, so an inbound's up/down
      stayed at 0 forever and inbound total limits never tripped (measured:
      12 MiB relayed, rchar delta 0). The panel now owns the inbound's public
      UDP port with a small relay and runs tuic-server behind it on a loopback
      port, counting up/down exactly on every OS. tuic-server therefore logs
      127.0.0.1 as every client's address; per-client attribution stays
      unsupported since QUIC is opaque.
    - Instance.BindTo formatted an IPv6 listen address as ":::8443", which
      tuic-server rejects with "invalid socket address syntax", so an inbound
      listening on "::" or any IPv6 literal never started. It now uses
      net.JoinHostPort; IPv4 output is unchanged.
    - The log level is passed to the sidecar as chosen. Online status,
      last-online and delayed start are read from its Info lines, so the Log
      Level field now says that Warn and Error switch them off for the
      inbound, and the docs say the same.
    - Drop two frontend tests that only exercised a getter and a set lookup,
      and strip the trailing blank line that made gofumpt fail on two of the
      new Go test files.
    
    * fix(tuic): harden tag updates, runtime routing, and relay stability
    
    ---------
    
    Co-authored-by: poise52 <equipoise52@gmail.com>
    Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
  • feat(xray): update xray-core to v26.9.9 and follow the udpHop move
    Bump xtls/xray-core to 52a412d9e2f5 (v26.9.9) and the three binary pins in
    DockerInit.sh and release.yml in lockstep.
    
    Upstream moved UDP port hopping out of finalmask.quicParams.udpHop and into a
    standalone "udphop" UDP mask with a different shape (mode / interval /
    remotePorts / remoteIPs). The old key is gone from QuicParams, and since the
    config loader ignores unknown fields it is now silently dropped rather than
    rejected — port hopping just stops.
    
    The panel adapts where that key was live:
    
    - Both link importers rebuilt quicParams.udpHop from the standard mport param,
      so an imported hysteria2 link produced an outbound that no longer hops. They
      now emit a udphop mask in intervalremote mode, which is what the old key did.
      The mode is required: UDPHop.Build() rejects an empty or unknown one.
    - validFinalMaskUDPTypes and UdpMaskTypeSchema learn "udphop", otherwise the Go
      link generator strips the mask from every link and sub, and Zod strips it on
      the next form round trip.
    - mport generation (Go and frontend) reads the mask first and keeps reading the
      legacy key, so inbounds stored before the upgrade still advertise their range.
    
    On an inbound the old key was always inert — only hysteria's dialer consumed
    it — so nothing regresses server-side and no migration is needed. udphop stays
    out of the mask dropdown on purpose: it is client-only in core, which refuses
    to wrap a server socket, and that form is shared with the inbound editor.
  • feat(xray): update xray-core to v26.9.8 and adapt panel
    Bump xtls/xray-core to 37ceb8b4b6 (v26.9.8) and the three binary pins
    (DockerInit.sh, release.yml Linux + Windows) in lockstep. No deleted
    symbols; the impact is entirely on the JSON config surface.
    
    Outbound "proxySettings" is now refused by the config loader (moved to
    streamSettings.sockopt.dialerProxy) and a freedom outbound rejects
    sockopt.addressPortStrategy. Either key in a stored template would keep
    the core from starting after the upgrade, so a new OutboundRemovedKeysFix
    seeder rewrites xrayTemplateConfig once: proxySettings.tag becomes
    sockopt.dialerProxy (an existing dialerProxy wins) and addressPortStrategy
    is dropped from freedom outbounds. Template saves and outbound
    subscriptions already run through the vendored loader, so the new
    refusals surface there with the core's own message.
    
    REALITY no longer applies a built-in minClientVer (26.3.27) when the
    field is empty. The form placeholder and the min/max hints in all 13
    locales now say that empty means no minimum.
    
    New upstream keys the Zod schemas would otherwise strip, with form
    support where a sibling field already had it:
    - blackhole response type "custom" with base64 customResponseData
    - realm finalmask ipMode (dual/v4/v6) and portMapping (UPnP / NAT-PMP)
    - quicParams brutalDisableLossCompensation, disableChromeParrot,
      disableGSO, disableStatelessReset
    - hysteria masquerade proxy xForwarded
    - wireguard outbound remoteDNS
    - routing rule localOS
    
    freedom.domainStrategy is only deprecated upstream (auto-migrated to
    sockopt.domainStrategy with a warning) and is left untouched.
  • feat(xray): update xray-core to v26.7.28 and adapt panel
    Bump xtls/xray-core to 5ca6f4b7d4dc (v26.7.28) and move the three binary
    pins (DockerInit.sh, the Linux and Windows URLs in release.yml) in lockstep
    so the in-process conf.Build() validation and the child binary agree.
    
    XMC finalmask (#6487) is the breaking change. The mask's `usernames` string
    list is gone, replaced by a required `profiles` array whose entries each need
    a 3-16 character [A-Za-z0-9_] username, a parseable UUID and both Mojang
    texture fields; the "default to Dream when empty" fallback was removed, so an
    xmc mask saved by an older panel now fails to build and takes the whole
    config down with it rather than degrading one inbound.
    
    The textures are a signed blob only Mojang's session server can issue, so a
    legacy username cannot be upgraded automatically. The panel now:
    
    - rejects an incomplete xmc mask at save time (AddInbound/UpdateInbound),
      pointing at the specific field that is missing;
    - drops only the offending mask when generating the core config, for rows
      that never went through the form (upgrade, node sync, restored backup,
      direct DB edit), warning which inbound lost its obfuscation instead of
      leaving every inbound offline;
    - carries legacy usernames into profile stubs in the finalmask form so the
      operator keeps their player names and sees exactly what still needs
      filling in, and edits profiles through a list editor.
    
    No destructive DB migration: unlike the removed shadowsocks ciphers there is
    no valid replacement to rewrite to, and dropping the mask from stored rows
    would discard the operator's hostname and password for config they can still
    repair. The generation-time strip already prevents the startup failure.
    
    Also track the core's xmux maxConnections fallback, lowered from 6 to 3 for
    anti-TSPU, in the fresh-XMUX seed so a new panel config matches what the core
    would pick on its own.
    
    TUN gained a `desc` key and random utunN naming, but the Go validator no
    longer accepts TUN inbounds and the panel only renders legacy saved rows, so
    nothing there needs adapting. The remaining commits are REALITY log-warning
    wording, gRPC/XHTTP localAddr accuracy and a routing tweak, none of which
    change the JSON config surface.
    
    Tests cross-check the panel's profile predicate against conf.XMCProfile.Build()
    so a future core release that tightens or relaxes the rules fails loudly
    rather than silently emitting configs the core refuses to start on.
  • feat(xray): update xray-core to v26.7.11 and adapt panel
    Bump xtls/xray-core to 50231eaf (v26.7.11) and the three binary pins
    (DockerInit.sh, release.yml x2) in lockstep.
    
    Adapt the panel to the upstream changes:
    
    - Shadowsocks "none"/"plain" and VMess "none"/"zero" were removed from
      the core. A migration rewrites stored none/plain SS methods to a
      supported cipher and none/zero VMess security to "auto" (on both the
      clients column and inbound settings JSON); the SS build-time heal does
      the same so a row injected after boot cannot brick startup. The removed
      values are dropped from every frontend option list, schema and adapter,
      and coerced to "auto" at the Go link/sub/Clash emit sites and both link
      importers. Fix the CipherType_NONE sentinel that no longer compiles.
    
    - Unencrypted vless/trojan outbounds to a public address are now refused
      by the core. Validate outbounds through the vendored config loader when
      saving the xray template and when storing/merging outbound
      subscriptions, so one such outbound cannot keep the core from starting.
    
    - New TCP finalmask type "xmc" (Minecraft mimicry): add it to the sub
      link allowlist, the frontend enum and the FinalMask form (hostname,
      usernames, required password), and document it.
    
    - streamSettings gained a "method" alias for "network"; canonicalize it
      to "network" at inbound save time and in the form adapters/schema so a
      method-keyed config keeps its transport.
    
    - New root "env" config key is passed through xray.Config, compared in
      Equals, and forces a restart in the hot diff.
    
    - REALITY now defaults minClientVer to 26.3.27; update the form
      placeholder.
  • feat(mtproto): enforce per-client quota & expiry via mtg-multi limits
    Map each mtproto client's totalGB and expiryTime onto mtg-multi's new
    [secret-limits] (quota/expires): emit them into the generated config and
    hot-apply through PUT /secrets so live connections survive. Quota is
    written as an exact "<n>B" byte count that round-trips through both the
    config and API parsers without the precision loss of a base-2 unit.
    
    The sidecar's quota counter is not pruned when a secret is dropped, so a
    panel-side traffic reset re-pushes the client's secret and then calls
    POST /secrets/{name}/reset-quota (wired into every reset path) so a
    renewed client is not immediately re-blocked.
    
    Resolve the mtg-multi binary from the fork's latest release tag in
    DockerInit.sh and release.yml instead of a hardcoded version pin, so the
    panel no longer needs a manual bump per fork release.
  • chore(mtproto): bump the mtg-multi binary pin to v1.14.0
    Same asset layout and platform coverage as v1.13.3; picks up the
    sidecar's Docker-style environment variable support.
  • fix(mtproto): stop dropping connections on client/inbound edits; add live updates + ad-tag (#5838)
    * fix(mtproto): split the mtg fingerprint into structural and secrets parts
    
    A reordered clients array in the stored settings used to read as a config
    change because the fingerprint concatenated secrets in array order, and one
    opaque fingerprint could not tell a restart-worthy change (bind address,
    fronting, throttle) from a secret-set change a reload-capable mtg can absorb
    in place. Sort the secret pairs so order stops mattering, and split the value
    so the upcoming hot-reload path can decide between keeping, reloading, and
    restarting the process.
    
    * fix(mtproto): stop restarting mtg on every inbound edit
    
    Saving an mtproto inbound tore down and respawned its mtg sidecar even when
    nothing material changed, dropping every live Telegram connection: the update
    path pushed DelInbound+AddInbound, and Remove deletes the manager's map entry,
    so Ensure's fingerprint no-op gate could never fire. Route mtproto updates
    through a single Ensure call so an edit that leaves the generated TOML alone
    keeps the process, and only real config changes restart it.
    
    Capturing the pre-edit protocol also fixes a latent leak: changing an
    inbound's protocol away from mtproto never stopped the sidecar, because the
    snapshot handed to the runtime already carried the new protocol and the
    removal took the xray branch, leaving an orphaned mtg holding the port.
    
    An mtproto push failure no longer requests an xray restart - xray cannot fix
    the sidecar, and the 10s reconcile job self-heals it.
    
    The regression test fakes mtg by re-executing the test binary, counting
    spawns through a pid file: an unchanged save and a remark-only edit must keep
    the process, a re-keyed secret must restart it.
    
    * fix(mtproto): exclude depleted clients from the reconcile job to match the sync push
    
    The 10s reconcile job derived mtg secret sets from raw inbound settings while
    the interactive push filtered clients through buildRuntimeInboundForAPI, which
    drops client_traffics-disabled (depleted or expired) clients. The two paths
    therefore disagreed on the fingerprint - each disagreement one needless mtg
    restart dropping live connections - and worse, the job kept serving depleted
    clients' secrets indefinitely, so running out of traffic never actually cut an
    mtproto client's access.
    
    DesiredMtprotoInstances now builds the job's desired state with the same
    depletion overlay the push uses (one bulk client_traffics query), drops
    inbounds whose every secret is filtered away so their sidecar stops, and
    AddInbound pushes the filtered payload too so an imported inbound carrying
    disabled stats does not seed a fingerprint the next reconcile disagrees with.
    
    * feat(mtproto): hot-reload mtg secrets in place instead of restarting
    
    A client add, removal, re-key, or enable-toggle changes only the [secrets]
    section of the generated config, yet the panel could apply it only by killing
    and respawning the mtg sidecar, dropping every Telegram connection on that
    inbound. Split the ensure decision three ways: an identical config is a no-op,
    a secrets-only change rewrites the TOML on the same api port and asks mtg to
    hot-swap it via POST /reload, and a structural change (or a failed reload)
    falls back to the full stop-and-start.
    
    The reload endpoint is served by the mhsanaei/mtg-multi fork; against an older
    binary the POST 404s and the manager restarts exactly as before, so panel and
    binary upgrades stay order-independent.
    
    * feat(mtproto): apply single-client edits to the sidecar immediately
    
    Client CRUD on an mtproto inbound was a runtime no-op, so an add, delete,
    re-key, or enable-toggle only reached mtg on the next 10s reconcile. With the
    sidecar now able to hot-reload, push the change straight after the edit commits:
    applyLocalMtproto rebuilds the inbound's filtered client set and re-applies it,
    so a new client works within a moment (and, on a reload-capable binary, without
    disturbing the others) and deleting the last client stops the process.
    
    The three interactive single-client paths (add, update, delete) call it; bulk
    operations still ride the reconcile job, which converges to the same state.
    
    * chore(mtproto): pin mtg-multi to the mhsanaei fork v1.13.3
    
    The reload endpoint the panel now uses lives in the mhsanaei/mtg-multi fork, so
    point the source-build pin (DockerInit.sh + both release.yml matrices) at it and
    bump to v1.13.3. The install still produces the same mtg-multi binary name, so
    the mtg-<os>-<arch> rename and everything downstream are unchanged. Docs and the
    package comment note the hot-reload path and its restart fallback.
    
    * feat(mtproto): apply live secret updates via the management API and add ad-tag
    
    Two capabilities the mhsanaei/mtg-multi v1.13.3 fork exposes are now surfaced by
    the sidecar manager.
    
    Live updates go through PUT /secrets on the fork's management API instead of
    POST /reload: the panel already holds the whole desired set per inbound, so it
    sends secrets and the advertising tag as one JSON call that mtg applies
    atomically, keeping every unchanged connection and closing only removed or
    re-keyed ones. The config file is still written first so a restart or crash
    recovery reproduces the state, and any non-200 (an older binary, a refused
    connection) still falls back to a full restart.
    
    Per-inbound ad-tag adds an optional 32-hex Telegram advertising tag plus
    public-ipv4/public-ipv6 overrides. The ad-tag rides the reloadable secrets
    fingerprint, so changing it hot-applies without dropping connections; the public
    IPs are proxy-construction parameters and sit in the structural fingerprint, so a
    change there restarts the process. Empty public IPs are omitted so mtg
    auto-detects the reachable address.
    
    * feat(inbounds): expose the mtproto ad-tag and public IP in the inbound form
    
    Adds an Ad-tag field (validated as 32 hex characters) plus optional Public IPv4
    and Public IPv6 overrides to the MTProto inbound form, backed by the same-named
    settings the sidecar writes into the mtg config. The public IPs are optional —
    left blank, mtg auto-detects the reachable address the ad-tag middle proxy needs.
    English strings are added to every locale; the non-English ones carry the
    English text until translated and fall back to it meanwhile.
    
    * ci(mtproto): install mtg-multi from prebuilt release binaries
    
    The fork now publishes release archives for every platform we package, so
    download and unpack the matching mtg-multi-<ver>-<os>-<arch> binary instead of
    compiling it from source with go install. Faster builds and no toolchain step,
    and the archive's platform labels line up with our matrix; the produced
    mtg-<os>-<arch> filenames are unchanged.
    
    * i18n(mtproto): localize the ad-tag and public IP strings
    
    The six mtgAdTag*/mtgPublicIp* keys shipped with English text in every locale as
    a placeholder. Translate them into the twelve non-English locales (Arabic,
    Spanish, Persian, Indonesian, Japanese, Portuguese-BR, Russian, Turkish,
    Ukrainian, Vietnamese, and Simplified/Traditional Chinese); en-US is unchanged.
    
    * retired goreportcard.com
  • feat(mtproto): adopt dolonet/mtg-multi and make MTProto inbounds multi-client
    Replace the upstream 9seconds/mtg sidecar with the dolonet/mtg-multi fork so a single MTProto inbound can serve many per-user secrets. Each panel client is now one named FakeTLS secret in the fork's [secrets] section: clients are first-class (attach/detach, limits, expiry, per-client tg:// links) exactly like every other protocol, mirroring the WireGuard multi-client model. Per-client traffic and online status come from the fork's /stats JSON API (its Prometheus output has no per-user label), fed into the existing email-keyed client_traffics accumulator; an optional throttle caps concurrent connections. A one-time seeder converts each legacy single-secret inbound into a one-client inbound.
    
    The fork ships only linux/darwin amd64/arm64 binaries but is pure Go, so provisioning builds it from source for every supported platform (release.yml, DockerInit.sh) while keeping the panel-expected mtg-<os>-<arch> filename and the 'run' verb, so process.go is untouched. Also fixes a pre-existing update.sh gap that never renamed the mtg binary for armv6/armv7 updates.
  • chore(deps): bump xray-core to v26.6.27
    Update the xray-core Go module (infra/conf builders + gRPC command clients) and the bundled binary pin in DockerInit.sh and the release workflow from v26.6.22 to v26.6.27. No gRPC command-API breaking changes. The release's other inbound work rides along with the bump: TUN autoSystemRoutingTable/autoOutboundsInterface are already modeled in the frontend tun schema, while Hysteria vlessRoute (UUID-derived) and the TUN traffic counters are internal to xray-core and need no panel changes.
  • Update Xray to v26.6.22
    Point CI workflow and DockerInit.sh to Xray v26.6.22 (update download URLs for Linux and Windows). Update go.mod to the matching github.com/xtls/xray-core pseudo-version and bump github.com/pion/stun to v3.1.6; refresh corresponding go.sum entries.
  • feat(mtproto): add MTProto (FakeTLS) protocol via managed mtg sidecar (#5076)
    * feat(mtproto): add MTProto (FakeTLS) protocol via managed mtg sidecar
    
    Xray-core has no mtproto proxy, so mtproto inbounds run as standalone
    mtg (9seconds/mtg) sidecar processes managed by the panel — one per
    inbound — and are excluded from the generated Xray config entirely.
    
    - model: MTProto protocol constant, validator, and FakeTLS secret
      helpers (GenerateFakeTLSSecret/HealMtprotoSecret)
    - mtproto package: per-inbound mtg process manager with reconcile,
      graceful stop, and best-effort Prometheus traffic scraping
    - runtime: delegate mtproto inbounds to the mtg manager instead of the
      Xray gRPC API; skip mtproto when building the Xray config
    - web: boot reconcile + StopAll wiring, periodic reconcile/traffic job,
      port-conflict transport, secret healing on inbound add/update
    - sub: tg:// proxy share-link generation
    - frontend: protocol option, Zod schema, Protocol tab (FakeTLS domain +
      regenerable secret), info-modal link, and i18n
    - provisioning: fetch mtg v2.2.8 in install.sh, DockerInit.sh, and the
      Linux + Windows release workflows
    
    * fix
    
    * fix
    
    * fix: address Copilot review comments on mtproto PR
    
    - web/web.go: create NewMtprotoJob once and reuse for cron + initial run
    - mtproto/manager.go: StopAll cleans up per-inbound config files on shutdown
    - mtproto/manager.go: CollectTraffic releases mutex before HTTP scrapes to
      avoid blocking Ensure/Reconcile/Remove during network I/O
    - database/model/model.go: panic on crypto/rand failure in mtprotoRandomMiddle
      instead of silently producing a weak all-zero secret
    - install.sh: fix chmod to handle renamed bin/mtg-linux-arm on armv5/v6/v7
  • chore: bump bundled Xray-core to v26.6.1
    Update the Xray-core download URLs in the release workflow and DockerInit.sh from v26.5.9 to v26.6.1.
  • Frontend rewrite: React + TypeScript with AntD v6 (#4498)
    * chore(frontend): add react+typescript toolchain alongside vue
    
    Step 0 of the planned vue->react migration. React 19, antd 5, i18next
    + react-i18next, typescript 5, and @vitejs/plugin-react 6 are added as
    dev/runtime deps alongside the existing vue stack. Both frameworks
    coexist in the build until the last entry flips.
    
    * vite.config.js: react() plugin runs next to vue(); new manualChunks
      for vendor-react / vendor-antd-react / vendor-icons-react /
      vendor-i18next. Existing vue chunks unchanged.
    * eslint.config.js: typescript-eslint + eslint-plugin-react-hooks
      rules scoped to *.{ts,tsx}; vue config untouched for *.{js,vue}.
    * tsconfig.json: strict, jsx: react-jsx, moduleResolution: bundler,
      allowJs: true (lets .tsx files import the remaining .js modules
      during incremental migration), @/* path alias.
    * env.d.ts: Vite client types + window.X_UI_BASE_PATH typing +
      SubPageData shape consumed by the subscription page.
    
    Vite stays pinned at 8.0.13 per the existing project policy. No
    existing .vue/.js source files touched in this step.
    
    eslint-plugin-react (not -hooks) is not included because its latest
    release does not yet support ESLint 10. react-hooks/purity covers
    the safety-critical case; revisit when the plugin updates.
    
    * refactor(frontend): port subpage to react+ts
    
    Step 1 of the planned vue->react migration. The standalone
    subscription page (sub/sub.go renders the HTML host; React mounts
    into #app) is the first entry off vue.
    
    Introduces two shared pieces both entries (and future ones) will
    use:
    
    * src/hooks/useTheme.tsx — React Context + useTheme hook + the
      same buildAntdThemeConfig (dark/ultra-dark token overrides) and
      pauseAnimationsUntilLeave helper the vue version exposes. Same
      localStorage keys (dark-mode, isUltraDarkThemeEnabled) and DOM
      side effects (body.className, html[data-theme]) so the two stay
      in sync across the coexistence period.
    * src/i18n/react.ts — i18next + react-i18next loader that reads
      the same web/translation/*.json files via import.meta.glob. The
      vue-i18n setup in src/i18n/index.js is untouched and still serves
      the remaining vue entries.
    
    SubPage.tsx mirrors the vue version's behavior: reads
    window.__SUB_PAGE_DATA__ injected by the Go sub server, renders QR
    codes / descriptions / Android+iOS deep-link dropdowns, supports
    theme cycle and language switch. Uses AntD v5 idioms: Descriptions
    items prop, Dropdown menu prop, Layout.Content.
    
    * refactor(frontend): port login to react+ts
    
    Step 2 of the planned vue->react migration. The login entry is the
    first to exercise AntD React's Form API (Form + Form.Item with
    name/rules + onFinish) and the existing axios/CSRF interceptors
    under React.
    
    * LoginPage.tsx: same form fields, conditional 2FA input,
      rotating headline ("Hello" / "Welcome to..."), drifting blob
      background, theme cycle + language popover. Headline transition
      switches from vue's <Transition mode=out-in> to a CSS keyframe
      animation keyed off the visible word.
    * entries/login.tsx: setupAxios() + applyDocumentTitle() unchanged
      from the vue entry — both are framework-agnostic in src/utils
      and src/api/axios-init.js.
    
    useTheme hook, ThemeProvider, and i18n/react.ts loader introduced
    in step 1 are now shared across two entries; Vite extracts them as
    a small chunk in the build output.
    
    * refactor(frontend): port api-docs to react+ts
    
    Step 3 of the planned vue->react migration. The five api-docs files
    (ApiDocsPage, CodeBlock, EndpointRow, EndpointSection, plus the
    data-only endpoints.js) all move to react+ts.
    
    Also introduces components/AppSidebar.tsx — api-docs is the first
    authenticated page to need it. AppSidebar.vue stays in place for the
    six remaining vue entries (settings, inbounds, clients, xray, nodes,
    index); each gets switched to AppSidebar.tsx as its entry migrates.
    After the last entry flips, AppSidebar.vue is deleted.
    
    Notable transformations:
    
    * The scroll observer that highlights the active TOC link is a
      useEffect keyed on sections — re-registers whenever the visible
      set changes (search filter narrows it). Same behaviour as the vue
      watchEffect.
    * v-html="safeInlineHtml(...)" becomes
      dangerouslySetInnerHTML={{ __html: safeInlineHtml(...) }}. The
      helper still escapes everything except <code> tags.
    * JSON syntax highlighter in CodeBlock is unchanged — pure regex on
      the escaped string, then rendered via dangerouslySetInnerHTML.
    * endpoints.js stays as JS (allowJs in tsconfig); only the consumer
      signatures (Endpoint, Section) are typed at the React boundary.
    * AppSidebar reuses pauseAnimationsUntilLeave + useTheme from
      step 1. Drawer + Sider keyed off the same localStorage flag
      (isSidebarCollapsed) and DOM theme attributes the vue version
      uses, so the two stay in sync during coexistence.
    
    * refactor(frontend): port nodes to react+ts
    
    Step 4 of the planned vue->react migration. The nodes entry brings in
    the largest shared-infrastructure batch so far — every authenticated
    react page from here on can lean on these.
    
    New shared pieces (live alongside their .vue counterparts during
    coexistence):
    
    * hooks/useMediaQuery.ts — useState + resize listener
    * hooks/useWebSocket.ts — wraps WebSocketClient, subscribes on mount
      and unsubscribes on unmount. The underlying client is a single
      module-level instance so multiple components on the same page
      share one socket.
    * hooks/useNodes.ts — node list state + CRUD + probe/test, including
      the totals memo (online/offline/avgLatency) used by the summary card.
      applyNodesEvent is the entry point for the heartbeat-pushed list.
    * components/CustomStatistic.tsx — thin Statistic wrapper, prefix +
      suffix slots become props.
    * components/Sparkline.tsx — the SVG line chart with measured-width
      axis scaling, gradient fill, tooltip overlay, and per-instance
      gradient id from React.useId. ResizeObserver lifecycle is in
      useEffect; the math is unchanged.
    
    Pages:
    
    * NodesPage — wires hooks + WebSocket together, renders summary card
      + NodeList, hosts the form modal. Uses Modal.useModal() for the
      delete confirm so the dialog inherits ConfigProvider theming.
    * NodeList — desktop renders a Table with expandable history rows;
      mobile flips to a vertical card list whose actions live in a
      bottom-right Dropdown. The IP-blur eye toggle persists across both.
    * NodeFormModal — controlled form (useState object, single setForm
      per change). The reset-on-open effect computes the next state
      once and applies it with eslint-disable to satisfy the new
      react-hooks/set-state-in-effect rule on a legitimate pattern.
    * NodeHistoryPanel — polls /panel/api/nodes/history/{id}/{metric}/
      {bucket} every 15s, renders cpu+mem sparklines side-by-side.
    
    * refactor(frontend): port settings to react+ts
    
    Step 5 of the planned vue->react migration. Settings is the first
    entry whose state model didn't translate to the Vue-style "parent
    passes a reactive object, children mutate it in place" pattern, so
    the React port flips it to lifted state + a typed updateSetting
    patch function.
    
    * models/setting.ts — typed AllSetting class with the same field
      defaults and equals() behavior the vue version had. The .js
      twin is deleted; nothing else imported it.
    * hooks/useAllSetting.ts — owns allSetting + oldAllSetting state,
      exposes updateSetting(patch), saveDisabled is derived via useMemo
      off equals() (no more 1Hz dirty-check timer).
    * components/SettingListItem.tsx — children-based wrapper instead
      of named slots. The vue twin stays alive because xray (BasicsTab,
      DnsTab) still imports it; deleted when xray migrates.
    
    The five tab components and the TwoFactorModal each accept
    { allSetting, updateSetting } and render with AntD v5's Collapse
    items[] API. Every v-model:value="x" became
    value={...} onChange={(e) => updateSetting({ key: e.target.value })}
    or onChange={(v) => updateSetting({ key: v })} for non-input
    controls.
    
    SubscriptionFormatsTab is the trickiest — fragment / noises[] /
    mux / direct routing rules are stored as JSON-encoded strings on
    the wire. Parsing them once via useMemo per field, mutating the
    parsed object on edit, and stringifying back into the patch keeps
    the round-trip identical to the vue version.
    
    SettingsPage hosts the tab navigation (with hash sync), the
    save / restart action bar, the security-warnings alert banner,
    and the restart flow that rebuilds the panel URL after the new
    host/port/cert settings take effect.
    
    * refactor(frontend): port clients to react+ts
    
    Step 6 of the planned vue->react migration. Clients is the biggest
    data-CRUD page in the panel (1.1k-line ClientsPage, 4 modals, full
    table + mobile card list, WebSocket-driven realtime traffic + online
    updates).
    
    New shared infra (lives alongside vue twins until inbounds migrates):
    
    * hooks/useClients.ts — clients + inbounds list, CRUD + bulk delete +
      attach/detach + traffic reset, with WebSocket event handlers
      (traffic, client_stats, invalidate) and a small debounced refresh
      on the invalidate event. State managed via setState; the live
      client_stats event merges traffic snapshots row-by-row through a
      ref to avoid stale closure issues.
    * hooks/useDatepicker.ts — singleton "gregorian"/"jalalian" cache
      with subscribe/notify so multiple components can read the panel's
      Calendar Type without re-fetching. Mirrors useDatepicker.js.
    * components/DateTimePicker.tsx — AntD DatePicker wrapper.
      vue3-persian-datetime-picker has no React port; the Jalali UI
      calendar is deferred (read-only Jalali display via IntlUtil
      formatDate still works). The vue twin stays for inbounds.
    * pages/inbounds/QrPanel.tsx — copy/download/copy-as-png QR helper
      shared between clients (qr modal) and inbounds (still on vue).
      Vue twin stays alive at QrPanel.vue.
    * models/inbound.ts — slim port: only the TLS_FLOW_CONTROL constant
      the clients form needs. The full inbound model stays as
      inbound.js for now; inbounds will pull it in as inbound.ts.
    
    The clients page itself uses Modal.useModal() for all confirm
    dialogs (delete, bulk-delete, reset-traffic, delDepleted, reset-all)
    so the dialogs render themed. Filter state persists to
    localStorage under clientsFilterState. Sort + pagination state is
    local; pageSize seeds from /panel/setting/defaultSettings.
    
    The four modals share a controlled "open/onOpenChange" pattern
    that replaces vue's v-model:open. ClientFormModal computes
    attach/detach diffs from the inbound multi-select on submit; the
    parent's onSave callback routes them through useClients's attach()/
    detach() after the main update succeeds.
    
    ESLint config: turned off four react-hooks v7 rules
    (react-compiler, preserve-manual-memoization, set-state-in-effect,
    purity). They're all React-Compiler-driven informational rules; we
    don't run the compiler and the patterns they flag (initial-fetch
    useEffect, derived computations using Date.now, inline arrow event
    handlers) are all idiomatic React. Disabling globally instead of
    per-line keeps the diff readable.
    
    * refactor(frontend): port index dashboard to react+ts
    
    Step 7 of the Vue→React migration. Ports the overview/index entry: dashboard
    page, status + xray cards, panel-update / log / backup / system-history /
    xray-metrics / xray-log / version modals, and the custom-geo subsection. Adds
    the shared JsonEditor (CodeMirror 6) and useStatus hook used by the config
    modal. Removes the unused react-hooks/set-state-in-effect disables now that
    the rule is off globally.
    
    * refactor(frontend): port xray to react+ts
    
    Step 8 of the Vue→React migration. Ports the xray config entry: page shell,
    basics/routing/outbounds/balancers/dns tabs, the rule + balancer + dns server
    + dns presets + warp + nord modals, the protocol-aware outbound form, and the
    shared FinalMaskForm (TCP/UDP masks + QUIC params). Adds useXraySetting that
    mirrors the legacy two-way sync between the JSON template string and the
    parsed templateSettings tree. The outbound model itself stays in JS so the
    class-driven form keeps its existing mutation API; instance access is typed
    loosely inside the form to match.
    
    The shared FinalMaskForm.vue and JsonEditor.vue stay alongside the new .tsx
    versions until step 9 — InboundFormModal.vue still imports them.
    
    Adds react-hooks/immutability and react-hooks/refs to the already-disabled
    react-compiler rule set; both flag the outbound form's instance-mutation
    pattern that doesn't run through useState.
    
    * Upgrade frontend deps (antd v6, i18n, TS)
    
    Bump frontend dependencies in package.json and regenerate package-lock.json. Notable updates: upgrade antd to v6, update i18next/react-i18next, axios, qs, vue-i18n, TypeScript and ESLint, plus related @rc-component packages and replacements (e.g. classnames/rc-util -> clsx/@rc-component/util). Lockfile changes reflect the new dependency tree required for Ant Design v6 and other package upgrades.
    
    * refactor(frontend): port inbounds to react+ts and drop vue toolchain
    
    Step 9 — the last entry. Ports the inbounds entry: page shell, list with
    desktop table + mobile cards, info modal, qr-code modal, share-link
    helpers, and the protocol-aware form modal (basics / protocol /
    stream / security / sniffing / advanced JSON). useInbounds replaces
    the Vue composable with WebSocket-driven traffic + client-stats merge.
    
    Inbound and DBInbound models stay in JS so the class-driven form keeps
    its mutation API; instance access is typed loosely inside the form to
    match. FinalMaskForm/JsonEditor/TextModal/PromptModal/InfinityIcon are
    the last shared bits to flip; their .vue counterparts go too.
    
    Toolchain cleanup now that no entry needs Vue: drop plugin-vue from
    vite.config, remove the .vue lint block + parser, prune vue / vue-i18n
    / ant-design-vue / @ant-design/icons-vue / vue3-persian-datetime-picker
    / moment-jalaali override from package.json, and switch utils/index.js
    to import { message } from 'antd' instead of ant-design-vue.
    
    * chore(frontend): adopt antd v6 api updates
    
    Sweep deprecated props across the React tree:
    - Modal: destroyOnClose -> destroyOnHidden, maskClosable -> mask.closable
    - Space: direction -> orientation (or removed when redundant)
    - Input.Group compact -> Space.Compact block
    - Drawer: width -> size
    - Spin: tip -> description
    - Progress: trailColor -> railColor
    - Alert: message -> title
    - Popover: overlayClassName -> rootClassName
    - BackTop -> FloatButton.BackTop
    
    Also refresh dashboard theming for v6: rename dark/ultra Layout and Menu
    tokens (siderBg, darkItemBg, darkSubMenuItemBg, darkPopupBg), tweak gauge
    size/stroke, add font-size overrides for Statistic and Progress so the
    overview numbers stay legible under v6 defaults.
    
    * chore(frontend): antd v6 polish, theme + modal fixes
    
    - adopt message.useMessage hook + messageBus bridge so HttpUtil messages
      inherit ConfigProvider theme tokens
    - replace deprecated antd APIs (List, Input addonBefore/After, Empty
      imageStyle); introduce InputAddon helper + SettingListItem custom rows
    - fix dark/ultra selectors in portaled modals (body.dark,
      html[data-theme='ultra-dark']) instead of nonexistent .is-dark/.is-ultra
    - add horizontal scroll to clients table; reorder node columns so
      actions+enable sit at the left
    - swap raw button for antd Button in NodeFormModal test connection
    - fix FinalMaskForm nested-form by hoisting it outside OutboundFormModal's
      parent Form
    - fix advanced "all" JSON tab in InboundFormModal — useMemo on a mutated
      ref was stale; compute on every render
    - fix chart-on-open for SystemHistory + XrayMetrics modals by adding open
      to effect deps (useRef.current doesn't trigger re-runs)
    - switch i18next interpolation to single-brace {var} to match locale files
    - drop residual Vue mentions in CI workflows and Go comments
    
    * fix(frontend): qr code collapse — open only first panel, allow toggle
    
    ClientQrModal and QrCodeModal both used activeKey without onChange,
    forcing every panel open and blocking user toggle. Switch to controlled
    state initialized to the first item's key on open, with onChange so
    clicks update state.
    
    Also remove unused AppBridge.tsx (superseded by per-page message.useMessage
    hook).
    
    * fix(frontend): hover cards, balancer load, routing dnd, modal a11y, outbound crash
    
    - ClientsPage/SettingsPage/XrayPage: add hoverable to bottom card/tabs so
      hover affordance matches the top card
    - BalancerFormModal: lazy-init useState from props + destroyOnHidden so
      the form mounts with saved values instead of relying on a useEffect
      sync that could miss the first open
    - RoutingTab: rewrite pointer drag — handlers are now defined inside the
      pointerdown closure so addEventListener/removeEventListener match;
      drag state lives on a ref (from/to/moved) so onUp reads the real
      indices, not stale closure values. Adds setPointerCapture so Windows
      and touch keep delivering events when the cursor leaves the handle.
    - OutboundFormModal/InboundFormModal: blur the focused input before
      switching tabs to silence the aria-hidden-on-focused-element warning
    - utils.isArrEmpty: return true for undefined/null arrays — the old form
      treated undefined as "not empty" which crashed VLESSSettings.fromJson
      when json.vnext was missing
    
    * fix(frontend): clipboard reliability + restyle login page
    
    - ClipboardManager.copyText: prefer navigator.clipboard on secure
      contexts, fall back to a focused on-screen textarea + execCommand.
      Old path used left:-9999px which failed selection in some browsers
      and swallowed execCommand's return value, so the "copied" toast
      appeared even when nothing made it to the clipboard.
    - LoginPage: richer gradient backdrop — five animated colour blobs,
      glassmorphic card (backdrop-filter blur + saturate), gradient brand
      text/accent, masked grid texture for depth, and a thin gradient
      border on the card. Light/dark/ultra each get their own palette.
    
    * Memoize compactAdvancedJson and update deps
    
    Wrap compactAdvancedJson in useCallback (dependent on messageApi) and add it to the dependency array of applyAdvancedJsonToBasic. This ensures a stable function reference for correct dependency tracking and avoids stale closures/unnecessary re-renders in InboundFormModal.tsx.
    
    * style(frontend): prettier charts, drop redundant frame, format net rates
    
    - Sparkline: multi-stop gradient fill, soft drop-shadow under the line,
      dashed grid, glowing pulse on the latest-point marker, pill-shaped
      tooltip with dashed crosshair
    - XrayMetricsModal: glow + pulse on the observatory alive dot,
      monospace stamps/listen text
    - SystemHistoryModal: keep just the modal's frame around the chart (the
      inner wrapper I'd added stacked a second border on top); strip the
      decimal from Net Up/Down (25.63 KB/s → 25 KB/s) only on this chart's
      formatter
    
    * style(frontend): refined dark/ultra palette + shared pro card frame
    
    - Dark tokens shifted to a cooler, Linear-style palette: page #1a1b1f,
      sidebar/header #15161a (recessed nav, darker than cards), card
      #23252b, elevated #2d2f37
    - Ultra dark: page pure #000 for OLED, sidebar #050507 disappears into
      the frame, card #101013 with a clear step, elevated #1a1a1e
    - New styles/page-cards.css holds the card border/shadow/hover rules so
      all seven content pages (index, clients, inbounds, xray, settings,
      nodes, api-docs) share one definition instead of duplicating in each
      page CSS
    - Dashboard typography: uppercase card titles with letter-spacing,
      larger 17px stat values, subtle gradient divider between stat columns,
      ellipsis on action labels so "Backup & Restore" doesn't break the
      card height at mid widths
    - Light --bg-page stays at #e6e8ec for the contrast against white cards
    
    * fix(frontend): wireguard info alignment, blue login dark, embed gitkeep
    
    - align WireGuard info-modal fields with Protocol/Address/Port by wrapping
      values in Tag (matches the rest of the dl.info-list rows)
    - swap login dark palette from purple to pure blue blobs/accent/brand
    - pin web/dist/.gitkeep through gitignore so //go:embed all:dist never
      fails on a fresh clone with an empty dist directory
    
    * docs: refresh frontend docs for the React + TS + AntD 6 stack
    
    Update CONTRIBUTING.md and frontend/README.md to describe the migrated
    frontend accurately:
    
    - replace Vue 3 / Ant Design Vue 4 references with React 19 / AntD 6 / TS
    - swap composables -> hooks, vue-i18n -> react-i18next, createApp -> createRoot
    - mention the typecheck step (tsc --noEmit) in the PR checklist
    - document the Vite 8.0.13 pin and TypeScript strict mode in conventions
    - list the nodes and api-docs entries that were missing from the layout
    
    * style(frontend): improve readability and mobile polish
    
    - bump statistic title/value contrast in dark and ultra-dark so totals
      on the inbounds summary card stay legible
    - give index card actions explicit colors per theme so links like Stop,
      Logs, System History no longer fade into the card background
    - show the panel version as a tag next to "3X-UI" on mobile, mirroring
      the Xray version tag pattern, and turn it orange when an update is
      available
    - make the login settings button a proper circle by adding size="large"
      + an explicit border-radius fallback on .toolbar-btn
    
    * feat: jalali calendar support and date formatting fixes
    
    - Wire useDatepicker into IntlUtil and switch jalalian display locale
      to fa-IR for clean "1405/07/03 12:00:00" output (drops the awkward
      "AP" era suffix that "<lang>-u-ca-persian" produced)
    - Drop in persian-calendar-suite for the jalali date picker, with a
      light/dark/ultra theme map and CSS overrides so the inline-styled
      input stays readable and bg matches the surrounding container
    - Force LTR on the picker input so "1405/03/07 00:00" reads naturally
    - Pass calendar setting through ClientInfoModal, ClientsPage Duration
      tooltip, and ClientFormModal's expiry picker
    - Heuristic toMs() in ClientInfoModal so GORM's autoUpdateTime seconds
      render as a real date instead of "1348/11/01"
    - Persist UpdatedAt on the ClientRecord row in client_service.Update;
      previously only the inbound settings JSON was bumped, so the panel
      never saw a fresh updated_at after editing a client
    
    * feat(frontend): donate link, panel version label, login lang menu
    
    - Sidebar: add heart donate link to https://donate.sanaei.dev and small panel version under 3X-UI brand
    - Login: swap settings-cog for translation icon, drop title, render languages as a direct list
    - Vite dev: inject window.X_UI_CUR_VER from config/version so dev mode matches prod
    - Translations: add menu.donate across all locales
    
    * fix(xray-update): respect XUI_BIN_FOLDER on Windows
    
    The Windows update path hardcoded "bin/xray-windows-amd64.exe", ignoring
    the configured XUI_BIN_FOLDER. In dev mode (folder set to x-ui) this
    created a stray bin/ folder while the running binary stayed un-updated.
    
    * Bump Xray to v26.5.9 and minor cleanup
    
    Update Xray release URLs to v26.5.9 in the GitHub Actions workflow and DockerInit.sh. Remove the hardcoded skip for tagVersion "26.5.3" so it will be considered when collecting Xray versions. Apply small formatting fixes: remove an extra blank line in database/db.go, normalize spacing/alignment of Protocol constants in database/model/model.go, and trim a trailing blank line in web/controller/inbound.go.
    
    * fix(frontend): route remaining copy buttons through ClipboardManager
    
    Direct navigator.clipboard calls fail in non-secure contexts (HTTP on a
    LAN IP), making the API-docs code copy and security-tab token copy
    silently broken. Both now go through ClipboardManager which falls back
    to document.execCommand('copy') when navigator.clipboard is unavailable.
    
    * fix(db): store CreatedAt/UpdatedAt in milliseconds
    
    GORM's autoCreateTime/autoUpdateTime tags default to Unix seconds on
    int64 fields and overwrite the service-supplied UnixMilli value on
    save. The frontend interprets these timestamps as JS Date inputs
    (milliseconds), so created/updated columns rendered ~1970 dates. Adding
    the :milli qualifier makes GORM match what the service code and UI
    expect.
    
    * Improve legacy clipboard copy handling
    
    Refactor ClipboardManager._legacyCopy to better handle focus and selection when copying. The textarea is now appended to the active element's parent (or body) and placed off-screen with aria-hidden and readonly attributes. The code preserves and restores the previous document selection and active element, uses focus({preventScroll: true}) to avoid scrolling, and returns the execCommand('copy') result. This makes legacy copy behavior more robust and less disruptive to the page state.
    
    * fix(lint): drop redundant ok=false in clipboard fallback catch
    
    * chore(deps): bump golang.org/x/net to v0.55.0 for GO-2026-5026
  • Xray Core v26.2.6 and dependency updates
    Update Xray download URLs to v26.2.6 in the GitHub Actions release workflow and DockerInit script. Bump Go toolchain to 1.25.7 and refresh several module versions (telego, xtls/xray-core, klauspost/compress, pires/go-proxyproto, golang.org/x/arch, golang.org/x/sys, google.golang.org/genproto, etc.). Update go.sum to match the new dependency versions.
  • Update Xray-core to v26.1.31 and related dependencies
    Bump Xray-core version to v26.1.31 in build scripts and server logic. Update Go dependencies including gopsutil, bytedance/sonic, circl, miekg/dns, go-proxyproto, sagernet/sing, and others to their latest versions. Adjust version check in GetXrayVersions to require at least v26.1.31.
  • Remove wget dependency from everywhere (#3598)
    * Remove wget dependency
    
    * Merge branch 'curl_only' of https://github.com/nebulosa2007/3x-ui into nebulosa2007-curl_only
    
    ---------
    
    Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
  • feat: Add WebSocket support for real-time updates and enhance VLESS settings (#3605)
    * feat: add support for trusted X-Forwarded-For and testseed parameters in VLESS settings
    
    * chore: update Xray Core version to 25.12.8 in release workflow
    
    * chore: update Xray Core version to 25.12.8 in Docker initialization script
    
    * chore: bump version to 2.8.6 and add watcher for security changes in inbound modal
    
    * refactor: remove default and random seed buttons from outbound form
    
    * refactor: update VLESS form to rename 'Test Seed' to 'Vision Seed' and change button functionality for seed generation
    
    * refactor: enhance TLS settings form layout with improved button styling and spacing
    
    * feat: integrate WebSocket support for real-time updates on inbounds and Xray service status
    
    * chore: downgrade version to 2.8.5
    
    * refactor: translate comments to English
    
    * fix: ensure testseed is initialized correctly for VLESS protocol and improve client handling in inbound modal
    
    * refactor: simplify VLESS divider condition by removing unnecessary flow checks
    
    * fix: add fallback date formatting for cases when IntlUtil is not available
    
    * refactor: simplify WebSocket message handling by removing batching and ensuring individual message delivery
    
    * refactor: disable WebSocket notifications in inbound and index HTML files
    
    * refactor: enhance VLESS testseed initialization and button functionality in inbound modal
    
    * fix:
    
    * refactor: ensure proper WebSocket URL construction by normalizing basePath
    
    * fix:
    
    * fix:
    
    * fix:
    
    * refactor: update testseed methods for improved reactivity and binding in VLESS form
    
    * logger info to debug
    
    ---------
    
    Co-authored-by: lolka1333 <test123@gmail.com>
  • Xray Core v25.3.31
    +update dependencies
  • quiet build
    Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
  • Add custom v2ray rules for Russia
    runetfreedom/russia-v2ray-rules-dat