Commit Graph
287 Commits
  • chore(ci): stop release and CodeQL runs on PRs, drop deploy smoke tests
    The release matrix (7 Linux cross-builds + a CGO Windows build) ran on every
    PR and on every branch push, so a PR from a repo branch built everything
    twice. Release binaries now build only on main (dev channel) and version
    tags; any other branch can still be built via workflow_dispatch.
    
    CodeQL keeps its push-to-main and weekly scans but no longer runs per PR.
    
    The deploy smoke workflow fired on every Release completion only to skip
    its jobs; deploy/test/smoke-noninteractive.sh stays for manual runs.
  • feat(clients): add calendar weekly renewal and schedule previews (#6524)
    * feat(clients): add calendar weekly renewal and schedule previews
    
    Expose fixed-day, calendar-weekly, calendar-monthly, and disabled renewal
    through one shared selector in individual and bulk client forms. Store the
    weekly weekday separately (Monday 1 through Sunday 7) and use panel-local
    calendar dates rather than a fixed 168-hour duration. Resolve skipped or
    repeated midnights to the first valid instant of the selected date, and skip
    an entirely nonexistent calendar date rather than changing the weekday.
    
    Reuse the existing renewal writer and share its boundary alignment and
    per-period catch-up calculation with an authenticated, read-only preview.
    Keep monthly precedence for legacy records, fixed-day interval semantics,
    maximum renewal allowances, first-use durations, and operator-disabled
    settings unchanged. Selecting a mode does not rewrite an existing cutoff;
    an unset calendar cutoff requires an explicit action to choose the first.
    The last-valid-second preview uses the stored exclusive expiry, even when
    the billing calculation aligns a legacy last-second cutoff up to midnight.
    
    Carry weekly schedules through client persistence, paging, enable toggles,
    inbound settings, and node traffic reconciliation. Migrate missing or nullable
    weekday columns to disabled by default without altering existing limits, and
    include the new isolated-schema PostgreSQL regression in the live CI gate.
    
    Regenerate API contracts and reference documentation, add lifecycle and form
    regressions, and document timezone, quota-reset, and upgrade considerations.
    All participating nodes must be upgraded before weekly mode is enabled;
    older binaries ignore the new field. Independent periodic traffic resets and
    the optional month-end subscription-header display are not changed.
    
    * fix(clients): validate renewal schedules across inbound write paths
    
    Reject conflicting weekly/interval/monthly schedules and out-of-range
    weekdays on inbound creation and edits, legacy one-client apply paths,
    record/link synchronization, and traffic metadata writes. Validate imported
    traffic snapshots as well, before any inbound or client is persisted, so
    an inbound API cannot create a client that the clients page cannot toggle.
    
    Merge a weekly-related schedule as one timestamp-selected tuple rather
    than filling its zero fields from another renewal mode. Preserve empty
    migration snapshots and the existing non-weekly monthly/interval merge
    semantics. Renewal caps, counters, credentials, and deadlines are unchanged.
    
    Add regressions for nine write paths, unchanged records and runtime calls
    after rejection, valid inbound clients remaining editable, and duplicate
    record merges between individually valid renewal modes.
    
    * docs(clients): clarify depleted-client deletion risks on downgrade
    
    Explain in English and Chinese that older versions not only stop weekly
    renewal: their depleted-client cleanup can delete a weekly-only client once
    its expiry or quota is exhausted. This is conditional on cleanup, not an
    automatic deletion caused by downgrade itself.
    
    Recommend backing up and converting weekly schedules to a mode supported
    by every participating version before rollback, and avoiding cleanup while
    mixed versions or unconverted clients remain. Merely disabling weekly
    renewal does not restore the old binary's missing purge protection.
    
    * fix(clients): bound weekly renewal date searches
    
    Limit the search for a valid weekly calendar date to eight candidates so
    an unusual timezone cannot monopolize the single traffic writer. Exhaustion
    returns the original instant, allowing the existing catch-up forward-progress
    guard to stop without advancing expiry, consuming an allowance, resetting
    traffic, or falling back to a fixed-duration schedule that can drift.
    
    Reject a non-future calendar suggestion in the read-only preview instead of
    offering an immediately expired initial cutoff. Also report failed weekly
    catch-up as a search error when allowances remain, not as cap exhaustion.
    Existing preview errors use the form's current warning; no API schema or
    locale changes are needed.
    
    Exercise exhaustion with a synthetic valid TZif containing twelve skipped
    Sundays. This fault-injection case was red without the bound; it is not a
    claim that a production IANA timezone was observed hanging. Keep the Havana
    and Apia regressions for real skipped/repeated midnights and absent dates.
    
    * fix(tests): isolate weekly renewal preview timezone
    
    Stop the weekly search regression from replacing process-global time.Local.
    CI caught that assignment and its cleanup racing with background timer reads
    through time.Now, even though the top-level tests do not use t.Parallel.
    
    Pass the timezone and current instant into the unchanged preview calculation.
    The public service still validates the request and resolves the panel timezone;
    API responses, renewal accounting, and persisted client data are unchanged.
    
    Use fixed dates for both suggestion and catch-up exhaustion, removing the
    test's dependency on today's date and its unnecessary database setup. Keep a
    bounded-lifetime background clock reader to expose future global-timezone
    mutations under the existing race gate rather than disabling that check.
    
    * ci: retrigger PR checks
    
    Create an empty commit to request a fresh pull-request CI run after release dependency downloads failed with network errors.
    
    No source, dependency, or workflow changes are included. Retry the existing checks without bypassing them.
    
    * ci: retry PR checks and record deferred download hardening
    
    Request another CI run after the amd64 release job compiled successfully but failed during dependency fetching with exit code 4 (network failure).
    
    Record possible follow-up improvements for the Linux release fetch helper:
    - Print each download URL and destination, and preserve error details.
    - Reuse the existing curl configuration with up to five retries; add connection and per-attempt timeouts and a bounded retry window.
    - Download to a temporary file and promote it to the final filename only after a successful, non-empty transfer. Keep the job failing if downloads ultimately fail.
    - Validate successful downloads, recovery after a temporary failure, and correct failure after persistent errors before shipping such a change.
    
    These improvements are intentionally deferred, not implemented or tested by this commit. This commit is empty: renewal logic, dependencies, workflow configuration, check requirements, and TLS verification remain unchanged.
    
    ---------
    
    Co-authored-by: JacktheRanger <219502738+JacktheRanger@users.noreply.github.com>
  • fix(frontend): key geo entries by page position and clear test-suite noise
    Zod 4: use the `error` param instead of the deprecated `message`.
    lint:deprecated missed these because tsgolint's no-deprecated does not
    resolve object-literal properties on a `string | Params` union.
    
    Geodata: key geo entry rows by page position. antd deprecates rowKey's
    index argument, and kind:value repeats within a page because the reader
    drops domain attributes (22 pairs in geosite_IR.dat, 108 in geosite_RU).
    
    Nord/PIA: the "All cities/regions" option used a null value, which antd
    warns on. Map it through a sentinel at the Select boundary so form state
    stays null, with tests that fail when the sentinel is not mapped back.
    
    Tests:
    - Run the oxlint guard through node; .bin/oxlint is a sh shim Windows
      cannot spawn, and the swallowed error left both guard cases vacuous.
    - Start unit workers with --no-experimental-webstorage; msw's localStorage
      probe made Node 25+ warn once per forked worker.
    - Set IS_REACT_ACT_ENVIRONMENT, which RTL never sets with globals: false,
      and settle the async updates it exposed inside act(). The row-cells
      memo test now fails when memo is removed.
    - Disable antd's click wave in Storybook; it re-rendered inside the next
      story's act() and tripped "not configured to support act".
    - Assert InboundFormModal's validation log instead of leaking it, and
      give the rule-form test a well-formed clients/list response.
  • ci: update Claude workflow model settings
    Use Claude Opus 5.5 with high effort for issue analysis and PR reviews.
  • fix(ci): keep a refused Claude credential from reddening a pull request (#6585)
    * fix(ci): keep a refused Claude credential from reddening a PR
    
    An expired subscription ends the claude-code-action step with exit 0, so the
    classifier that exists for "the API refused this run" never sees it -- its
    condition is a failed step -- and the final "posted nothing" step reddens the
    pull request although nothing is wrong with the repository.
    
    Verified against five real runs (35159059540, 35184688775, 35185722358,
    35186543654, 35187380192): step 8 success, step 10 found no cause, step 11
    failure, transcript {"error":"oauth_org_not_allowed"} plus a result entry with
    api_error_status 403. A usage-limited run carries 429 and a rejected
    rate_limit_event, and a real review carries is_error false with no status, so
    the 401/403 test fires on the refused credential alone.
    
    * fix(ci): stop a refused credential reddening the issue analysis
    
    The same exit-0 refusal reaches this workflow's "posted no reply" check, which
    fails for the same reason and shows up as seven failed runs in a day. It never
    attaches to a pull request -- the trigger excludes them -- so this is the same
    step and the same 401/403 transcript test applied where the refusal lands.
    
    Reported only as a warning annotation: nothing was analysed, and there is no
    comment worth posting about a credential the maintainer has to renew.
  • 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.
  • refactor(ci): add an adversarial pass and name the analyst briefing
    REVIEW.md told the reviewer which repository rules to check but never to try
    breaking the change, so the conditions this panel actually meets went
    unexamined. "Try to break it" adds six, each tied to a mechanism here rather
    than to a generic checklist: an upgrade over an operator's existing rows and
    the rollback that reads them again, a restart that drops in-memory state under
    the cron jobs, a sub-node racing the master on the same row, an operation
    applied twice, an inbound or client at the empty and the thousand end, and a
    dependency that is down. It closes with the gate that running a case is not
    reporting it - each one still has to clear the verification bar below it, so
    the section cannot become a licence for hypotheticals.
    
    repo-context.md said nothing about which bot reads it. Only the issue analyst
    does, since the review job's briefing moved inline in acf3603d, so it becomes
    issue-analyst-context.md and its title names the analyst instead of "the Claude
    bot". bot_context_test.go pins that path in a constant, so the rename carries
    through the constant, the four test names and the two comments that named the
    old file - one of which still said "the bot prompts", plural.
    
    Backticks come off mtg-multi in the new section: the same test file reads any
    hyphenated backticked token in REVIEW.md as a CI job name, and fails on one
    ci.yml does not define.
  • refactor(ci): review pull requests with one senior-engineer role
    The review job ran the official code-review plugin, which fans a pull
    request out to five Sonnet reviewers plus a Haiku scorer per finding and
    drops everything scored under 80, and the briefing file spent most of its
    lines overriding that plugin. Both are gone: the job hands one Senior
    Software Engineer prompt to the action inline, the way the issue analyst
    does, and denies the Agent tool so the single role is mechanical rather
    than a request.
    
    REVIEW.md moves from the emoji markers to CRITICAL/HIGH/MEDIUM/LOW with a
    pre-existing qualifier. The uncapped rule is scoped to findings the pull
    request introduced or worsened so it cannot collide with the cap of three
    pre-existing ones. "A finding is a report, not a patch" stays as it was.
    
    Workflow housekeeping: GH_TOKEN, REPO and PR live in the job env instead
    of six step copies; the skip gate is per pull request, so a head pushed
    after the automatic review is reviewed only on @claude review; the comment
    counters sum gh's per-page jq output, which read "0\n0" as a review on a
    pull request with more than 100 comments; --max-turns rises to 300 because
    every read now costs the single agent a turn instead of a subagent.
  • 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.
  • refactor(ci): make the Claude workflow review pull requests and nothing else
    claude-bot.yml ran three jobs: the pull-request review, an @claude mention
    responder, and a conflict resolver that committed and pushed to contributor
    branches. Only the review is wanted, so the other two are gone and the file
    is renamed to say what is left.
    
    Consequences worth knowing:
    
    - secrets.CLAUDE_BOT_PAT is no longer referenced by any workflow. It was the
      only push credential handed to an agent in this repository and can now be
      deleted from the repository settings.
    - @claude goes unanswered everywhere. claude-issue-analyst.yml deliberately
      excludes mentions (!contains(body, '@claude')) so the two jobs would not
      both reply; with the mention job gone, only `@claude review` on a pull
      request still reaches anything. Dropping that clause from the analyst would
      restore mention answering on issues.
    - The workflow display name changes, so a branch protection rule keyed on
      "Claude Bot / review" has to become "Claude PR Review / review". The job
      name, which is what statusCheckRollup reports, is unchanged.
    
    The review job itself is byte-identical. The workflow-level permission drops
    to issues: read, which is all the remaining job needs - it already declares
    its own.
  • chore(ci): give the race job a 25m test timeout
    The race job failed with "panic: test timed out after 10m0s" in
    internal/web/service (FAIL at 600.106s) while every other package passed
    and the non-race go-test job ran the same package in 57s.
    
    Nothing hung. The race detector costs this repo ~8.5-10x (internal/database
    8.4s -> 73s, internal/sub 17.8s -> 149s), and internal/web/service has 671
    tests, ~40 of which each pay a full InitDB + AutoMigrate. That puts it right
    on go test's 10-minute default per-package timeout: the last four race jobs
    finished in 10m10s-10m28s before this one crossed the line.
    
    Pass -timeout 25m in ci.yml and `make race` so the largest package has real
    headroom while a genuine deadlock is still bounded. Verified locally:
    ok internal/web/service 265.425s, 658 tests, no data races.
  • feat(release): publish SHA-256 sums and verify them in install.sh/update.sh (#6393)
    * feat(release): publish SHA-256 sums and verify them in install.sh/update.sh
    
    The installer and updater fetched the release archive and extracted it
    after checking only that the file is not empty, and the release workflow
    published no checksums. TLS protects the transport, not the bytes: a
    truncated or swapped asset, a bad mirror or a TLS-terminating proxy was
    installed as root. #5396 added this verification for the Xray archive;
    the panel's own archive was the remaining unverified download.
    
    Publish <asset>.sha256 next to every release archive (Linux and Windows)
    and verify it before extracting. A mismatch aborts the install; a missing
    sidecar, which every release before this change has, only warns, so
    installing older tags keeps working.
    
    Assisted-by: Claude Code:claude-fable-5-1
    
    * fix(install): fail closed when the checksum sidecar cannot be fetched
    
    Review follow-up. Any curl failure on the sidecar (5xx, reset, DNS) was
    treated as "no checksum published", so whoever can swap the archive
    could also drop the 90-byte sidecar request and skip the check. Only a
    404, which every release before the sidecar existed returns, is still
    tolerated with a warning; every other outcome aborts and removes the
    downloaded archive.
    
    Assisted-by: Claude Code:claude-fable-5-1
    
    * fix(install): restore the closing brace lost in the main merge
  • fix(ci): skip a head the review bot already reviewed, and report a refused run
    Ten review runs fired in under two hours on 3 September and every one after
    11:25 came back rejected: the five-hour usage window was at 100 percent
    (overageStatus rejected, org_level_disabled) while the seven-day window sat at
    29. Two of them reviewed the same head SHA and one pull request was reviewed
    four times, because a draft/ready toggle re-fires pull_request_target and the
    skip decision is only reachable after a full checkout and a model boot.
    
    Settle it in the workflow instead: a bot comment carrying "Reviewed head:" and
    the pinned SHA means this head is done, so the pr-head checkout, the brief and
    the action are all skipped. An explicit "@claude review" is exempt, so a
    maintainer can still force one.
    
    A refused run also failed the job twice over - the action's exit 1 plus "the
    review posted nothing" - with nothing on the pull request to say why, which
    reads as a broken bot rather than an exhausted budget. The job now classifies
    its own transcript: a rejected rate_limit_event, or a 529 that survived every
    retry, posts one line on the pull request and stays green. Anything else still
    fails loudly.
    
    Also tightens that check, which counted ANY bot comment quoting the head SHA as
    a legitimate skip; the conflict-resolution job quotes SHAs too, so a dead run
    could go green on one.
  • refactor(ci): split the issue analyst out and brief the review job from a file
    The issue analyst moves verbatim from claude-bot.yml into its own
    claude-issue-analyst.yml, so claude-bot.yml now holds only the pull-request
    side: review, @claude mentions and conflict resolution.
    
    The review job's briefing was a single 2,600-character quoted string inside
    claude_args, unreadable and unreviewable. It now lives in
    .github/claude/review-job.md, assembled at run time with a "This run"
    section that hands the reviewer the pinned head SHA, the pull request and
    the exact check-runs command, and reaches the CLI through
    --append-system-prompt-file. The agent-mode action sets no system-prompt
    append of its own, so the file flag cannot collide with one.
    
    Findings no longer carry the fix: REVIEW.md and the brief both forbid
    suggestion blocks, patches and replacement snippets, overriding the
    code-review skill's --comment step, which attaches a committable suggestion
    to any small fix. A finding states what is wrong, where, what triggers it
    and what breaks; the maintainer decides the change.
  • fix(ci): pin the head the review job checks out
    The review job checked the pull request out through refs/pull/N/head, a
    ref the author can move after a maintainer types "@claude review". Code
    scanning flagged it twice on the issue_comment path: an untrusted
    checkout in a privileged context (alert 111) and the time-of-check /
    time-of-use race that ref creates (alert 110).
    
    Resolve the head once, up front, and refuse the run when the fork was
    pushed to after the request that vouched for it, mirroring the freshness
    gate resolve-conflicts already uses; the checkout then names that
    immutable SHA. pull_request_target runs take the head SHA straight from
    the payload, so they skip the comparison. The trailing "posted nothing"
    check no longer fires on top of a refusal, which would otherwise report
    a second, misleading failure.
  • feat(ci): give the review bot a severity scale and a tally
    REVIEW.md said what blocks and what does not, but never how to mark a finding,
    so every review invented its own shape and none carried a severity. It now
    names the three markers the hosted Code Review service uses - Important, Nit,
    Pre-existing - and keys them to what the pull request did rather than to how
    alarming a defect looks alone: a defect it introduces or worsens is Important,
    one it merely brought into view is Pre-existing and cannot be a reason to hold
    it. Pre-existing was missing entirely, and checking what this panel emits means
    reading far outside the diff, so those findings had nowhere to go except a
    wrong Important or silence.
    
    The volume cap said how many and never which. It now collapses a nit repeated
    across files into one finding, prefers a nit in code the pull request wrote
    over one in code it only moved, caps pre-existing findings at three, and states
    that Important findings are never capped - a section listing two caps otherwise
    reads as licence to trim what matters. The review opens with a tally so the
    author sees the shape before the detail.
    
    Two contradictions went with it. The file told the reviewer to skip what CI
    enforces and then to check that a new i18n key reaches all 13 locales, which
    i18n-dead-keys.test.ts pins in both directions - the rule moves to "Do not
    report" with the reason. "Anything CI already enforces: npm audit" overstated
    what runs; CI audits production dependencies at high and above, so a
    dev-dependency advisory is out of scope by design.
    
    The reviewer could not read its own CI. Only postgres-durable-first runs
    against PostgreSQL, and XRAY_E2E_BINARY and XUI_SCALE_TEST are set by no job,
    so a dialect or migration change can carry a wall of green while the paths it
    touches never executed. That belongs to the verification bar, next to the rule
    that a behaviour claim needs a file:line citation, and "CI passed" now needs a
    run actually read. Also names the two house choices no linter defends: neither
    golangci-lint nor oxlint rejects a testify or Tailwind import.
    
    Both kinds of claim rot on a rename, so a test pins them the way
    repo-context.md's claims are already pinned - the CI jobs REVIEW.md names must
    exist in ci.yml, the skip gates it calls unset must stay unset, and the locale
    count must match the directory.
    
    The review itself moves from high to max effort, and the prompt records why it
    names REVIEW.md at all: the code-review skill reads CLAUDE.md on its own but
    not REVIEW.md, so dropping that clause would silently stop the file applying.
    Drops a CLAUDE.md reference to tools/seedperf/, which no longer exists - the
    review reads that file as project context, so a stale path there misleads it.
  • fix(ci): give the review bot the pull request's own code and CI verdict
    Three consecutive review runs (#6105, #6265, #6272) posted accurate findings
    but ended with the same "nothing was verified" paragraph, and the transcripts
    show why: under pull_request_target the only checkout is the base branch, so
    every Read of a changed file returned the pre-merge version and the agent
    fell back to fetching blobs one at a time through the API — 452 Bash calls on
    #6105 alone. It tried `git fetch origin pull/N/head` in all three runs and was
    denied every time.
    
    Check the head out read-only beside the base tree and say so in the prompt, so
    the reviewer greps the code actually under review. Nothing builds or executes
    from pr-head/: this job carries a write-scoped token, which is exactly the
    pwn-request REVIEW.md classes as blocking.
    
    CI had already run the full gate on each head SHA, but no run ever looked —
    `check-runs` appears in none of the three transcripts. Point the reviewer at
    it so a red or missing required check becomes a finding instead of a
    disclaimer.
    
    Also pass an explicit review level: with none given the skill reuses the last
    one typed, which in CI does not exist (ReportFindings recorded level=null on
    #6272). And allow WebFetch/WebSearch — the PIA review was denied both while
    trying to confirm the bundled PIA public key, then had to file that same check
    as unverified.
  • fix(ci): repair the review comment and the conflict-resolution guard
    Two failures from the same afternoon, both in the bot workflow.
    
    The review of #6272 ran for 34 minutes across four subagents and posted
    "No issues found. Checked for bugs and CLAUDE.md compliance." — three
    lines for a 73-file diff. The agent had written a per-area coverage
    summary in its own last turn and then dropped it on the floor, because
    the code-review skill's comment template carries findings and nothing
    else. A comment that cannot distinguish a thorough clean review from a
    run that died early is not evidence, so REVIEW.md now states what the
    posted comment must show and the system prompt points the run at it.
    
    The same run logged 67 permission denials. Only the inline-comment MCP
    tool was named in --allowedTools, so `gh api`, writing the diff to a
    scratch file, and reading it back were all auto-denied: agents spent
    turns hunting for a writable directory, and the openapi.json copy check
    REVIEW.md calls blocking could not be run at all ("gh api was
    unavailable in this sandbox"). Name the tools the review actually uses.
    
    The conflict resolution on #6243 resolved both conflicted files
    correctly and was then rejected by its own guard: "Edits outside the
    conflicted set: CLAUDE.md". The agent never touched CLAUDE.md — it had
    Edit rights on exactly two paths and no shell. claude-code-action
    deletes and restores CLAUDE.md, .claude/, .mcp.json and friends from
    the base branch before it runs, because the PR head is untrusted, and
    that restore is what dirtied the tree. Name that set once, exclude it
    from the stray-edit check, and hand back rather than resolve when a
    conflict lands inside it — the restore would silently overwrite the
    resolution and stage the base copy.
  • fix(ci): make the review bot post its findings and acknowledge mentions
    Three separate ways the bot went silent after the move to the official
    code-review skill:
    
    - The skill skips a PR it has already commented on without comparing the
      reviewed head to the current one, so #6272 got no review of the commits
      pushed after the first pass. A prior review now only justifies a skip
      when its "Reviewed head:" SHA matches the current head, and never when
      the run came from an explicit "@claude review".
    - The review agent launched its subagents in the background and ended its
      turn to wait for them. A headless run terminates on end_turn, so the
      findings were discarded and the job still reported success. The prompt
      now requires foreground subagents, and a new step fails the job when a
      run posts nothing for the current head, instead of passing green.
    - A custom prompt puts claude-code-action in agent mode, which never adds
      the eyes reaction, so a mention gave no sign it had been picked up.
  • refactor(ci): replace the in-house review lanes with the official code-review skill
    The four pull_request_target review jobs in claude-bot.yml (Senior
    Developer / QA / Tester / Arbiter and their shared rubric) are replaced by
    a single review job running the official code-review plugin - the same
    skill behind Anthropic's hosted Code Review and the review workflow
    /install-github-app generates. The hosted service needs a Team/Enterprise
    organisation, so the plugin runs in CI on the maintainer's subscription
    instead: inline findings on PR open and ready-for-review, plus manual
    (re-)review when the owner or a collaborator comments "@claude review".
    
    The official example triggers on pull_request, but GitHub withholds
    secrets from fork runs and essentially every 3x-ui pull request is from a
    fork, so the job keeps the lanes' pull_request_target posture: the
    workspace is the base revision and nothing from the pull request is
    checked out or executed.
    
    What the lanes uniquely knew is distilled into REVIEW.md, handed to the
    skill via --append-system-prompt and pinned by bot_context_test.go the way
    repo-context.md is: the runtime.Runtime dispatch rule, migration and
    upgrade safety, the four-step route contract chain including the unchecked
    docs copy, the i18n rule, the three link implementations, and the
    wire-format verification bar. The mention job now ignores "@claude
    review" comments on pull requests so the review trigger does not also
    wake the generic bot, and the lane-only rubric file goes with the lanes.
    
    The remaining prompts also lose their tone micro-rules (no emoji, no
    exclamation marks, no filler) and the workflow's comment banners are
    removed.
  • Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262)
    * chore(frontend,docs): move to TypeScript 7 and replace ESLint with oxlint
    
    TypeScript 7 is the native Go port and ships no programmatic compiler
    API, so typescript-eslint cannot run at all: it peer-pins
    typescript >=4.8.4 <6.1.0 (canary too) and hard-crashes with
    "typescript-eslint does not support TS 7.0". Upstream support is
    tracked in typescript-eslint#10940 and targets TS >=7.1.
    
    Rather than wait, or carry Microsoft's side-by-side alias (which keeps
    a second TS 6 install alive purely to feed the linter), both projects
    move to oxlint, which never depended on the TypeScript API.
    
    Typecheck drops from ~9.7s to ~2.2s and 167 packages leave frontend/.
    
    oxlint has no no-restricted-syntax, so the #6121/#6127 cleared-
    InputNumber guard is reimplemented as a JS plugin in
    frontend/tools/oxlint/. It was verified to still fire in
    pages/settings/** and pages/xray/** and to stay exempt in *Modal.tsx.
    
    The type-aware @deprecated sweep survives too, as
    `npm run lint:deprecated`: oxlint's type-aware mode runs on
    oxlint-tsgolint, which drives the TS 7 typescript-go checker, so the
    TS 7 move is what makes it possible.
    
    Behaviour is preserved rather than tightened. jsx-a11y/prefer-tag-over-role
    is off in both configs because it was never part of the recommended sets
    ESLint actually ran, and oxlint honours the existing eslint-disable
    comments, so no source churn was needed.
    
    Two real fixes fell out of the stricter linting:
    - outbound-link-parser.test.ts used `out?.streamSettings` behind an `as`
      cast, which hid the optional chain from ESLint and would throw on a
      null parse; the rest of the file already used `out!`.
    - InputAddon's conditional role/tabIndex/onKeyDown is genuinely
      accessible but oxlint cannot evaluate it, so it gets a scoped disable.
    
    * chore(docs): replace Prettier with oxfmt
    
    oxfmt is the oxc project's Prettier-compatible formatter, so this pairs
    with the oxlint move and drops the last JS-based tool from the docs
    toolchain.
    
    The swap is behaviour-preserving. Running Prettier and oxfmt over the
    same files, with the existing .prettierrc.json settings migrated via
    `oxfmt --migrate=prettier`, produces byte-identical output on every
    file. (Comparing them outside the project directory is misleading:
    Prettier silently falls back to its defaults when it cannot find its
    config, which looks like a mismatch but is not one.)
    
    The 18 files reformatted here were already failing `pnpm format:check`
    before this change — Prettier wanted the exact same edits. The check is
    not part of docs-ci.yml, which is why the drift went unnoticed.
    
    .prettierignore becomes ignorePatterns in .oxfmtrc.json, keeping the
    deliberate MDX exclusion: reflowing MDX prose merges headings into
    paragraphs and collapses lists inside Steps/Callout components. Both
    that and the generated fumadocs-openapi reference output were verified
    untouched.
    
    oxfmt is pinned to 0.63.0 rather than latest. pnpm 11's built-in
    minimumReleaseAge policy rejects same-day releases, and 0.64.0 would
    have made pnpm silently append 20 waiver lines to pnpm-workspace.yaml.
    
    * style(frontend): adopt oxfmt and format src
    
    frontend/ has never had a formatter, so this reformats 344 of 497 files
    in src/. The change is purely whitespace, quoting and line wrapping —
    no logic is touched. It is kept in its own commit so it does not bury
    the TypeScript 7 / oxlint migration or the git blame for the code
    itself.
    
    Settings match docs/ and the code as it was already written: single
    quotes, semicolons, trailing commas, 2-space indent, 100 columns. That
    was measured rather than assumed — src/ was already uniformly
    single-quoted and 2-space indented, with p90 line length at 75.
    
    Formatting is scoped to src/ (mirroring `oxlint src`) and
    .oxfmtrc.json ignores src/generated. Both matter: `make gen-check`
    compares src/generated and public/openapi.json, and
    `make msw-worker-check` byte-compares public/mockServiceWorker.js
    against the installed MSW runtime, so reformatting any of them breaks
    the gate.
    
    Reflowing also moves `eslint-disable-next-line` comments off the line
    they guard, which broke two suppressions that had been silently
    correct before:
    - clone-inbound-modal.test.tsx: the object literal became multi-line,
      leaving `} as any;` four lines below its no-explicit-any disable.
    - ClientsPage.tsx: the useMemo dependency array moved onto its own
      line, out from under its exhaustive-deps disable.
    Both comments were relocated onto the line they actually guard, and
    verified to still suppress by removing them and watching the errors
    return.
    
    * ci: enforce formatting in CI and make verify
    
    Adding oxfmt in the previous two commits gave both projects a formatter
    but nothing that checks it, which is how docs/ had already drifted to 18
    unformatted files: docs-ci.yml runs typecheck, lint, test and build, but
    never format:check, so Prettier's complaints were only ever visible to
    whoever ran it by hand.
    
    Wire `format:check` into the frontend job in ci.yml and the docs job in
    docs-ci.yml, and add a `format-check` target to `make verify` so the
    local gate keeps mirroring CI as the Makefile header promises.
    
    Verified the step actually bites rather than passing vacuously: adding
    a badly formatted line to a source file in each project makes both
    `make format-check` and `pnpm format:check` fail, and reverting it makes
    them pass again.
    
    No workflow referenced ESLint or Prettier by name — they all invoke the
    package scripts — so the tooling swap needed no other CI changes.
    
    * ci: trigger CI on Makefile changes
    
    The path filters listed **.go, go.mod, go.sum, frontend/**, .nvmrc and
    ci.yml itself, but not the Makefile — so a change to the canonical task
    runner that ci.yml is meant to mirror could land without any job
    running. The previous commit, which edits both, only triggers because
    it happens to touch ci.yml too.
    
    * fix(frontend): replace deprecated Ant Design 6 APIs in the geo components
    
    `npm run lint:deprecated` reported five uses of props Ant Design 6 has
    deprecated. All five are gone, and the matching runtime warnings no
    longer appear in the test output.
    
    Tag `bordered={false}` becomes `variant="filled"` and Space `direction`
    becomes `orientation`; both are the one-to-one replacements named in
    antd's own deprecation messages, and `direction`/`orientation` share the
    same Orientation type.
    
    Input `addonAfter` is the one that is not a rename. It becomes a
    `Space.Compact block` wrapping the Input and the browse Button, which is
    antd's documented migration. `block` keeps the field filling its form
    row as the addon did. Note this is a deliberate visual change: the
    button used to be a borderless `type="text"` icon sitting inside the
    addon's grey box, and is now a regular button whose border joins the
    input. The tooltip, aria-label, ref, id and onBlur wiring are unchanged,
    so the react-hook-form binding in RuleFormModal and the existing tests
    still address it the same way.
    
    Only these five were deprecated. The other `bordered` props in the tree
    sit on QRCode, Table, Descriptions and Alert, where the prop is not
    deprecated, and these were the only two Space `direction` uses in the
    codebase.
    
    * fix(frontend): restore lint rules lost in the oxlint migration, and test the guard
    
    Addresses the review on #6262.
    
    The frontend config re-enabled only no-explicit-any and no-unused-vars
    and left the rest of tseslint's recommended set to oxlint's correctness
    category. It does not cover all of it. Confirmed by linting one probe
    file against both configs: docs/ (which enumerates the rules) reports
    all nine, frontend/ reported four. So ban-ts-comment,
    no-empty-object-type, no-namespace, no-require-imports and
    no-unsafe-function-type had silently stopped being enforced — a `//
    @ts-ignore` or a `namespace` block would have landed unflagged. The ten
    rules are now mirrored from docs/.oxlintrc.json, and src/ still passes.
    
    The #6121/#6127 guard was 57 lines of hand-written AST walking with no
    test. It now has one: fixtures for the three banned shapes plus an
    onNumber()-wrapped control, asserting the rule fires three times and
    that .oxlintrc.json still wires it to the right paths. Verified it fails
    for the right reason by making walk() enumerate nothing, which is the
    silent-death mode the review described — the traversal depends on
    Object.keys() seeing AST children as own enumerable properties.
    
    The fixtures deliberately violate the rule, so their oxlint config is
    named guard.oxlintrc.json rather than .oxlintrc.json: oxlint discovers
    nested configs by directory, which would otherwise turn the fixtures
    into three lint errors. The test passes it explicitly with -c.
    
    Also from the review:
    - lint and format now cover tools/ as well as src/, so the one piece of
      hand-written lint logic in the repo is no longer the least covered
      file in it.
    - lint-staged runs oxfmt before oxlint --fix. Formatting became a hard
      CI gate in this PR while the hook only ran the linter, so a commit
      could pass the hook and fail CI on formatting alone.
    - .oxfmtrc.json ignores public/, so the artefacts that make gen-check
      and make msw-worker-check byte-compare stay safe even if oxfmt is
      invoked without a path argument.
    - The MDX and generated-reference rationales that .prettierignore
      carried are back as comments in docs/.oxfmtrc.json — oxlint and oxfmt
      both accept JSONC, so relocating them was unnecessary.
    
    Not applied: the review also suggested restoring ../internal/web/dist to
    the ignore lists. Both tools reject `..` patterns outright ("patterns
    are resolved within the config file's directory"), and being outside
    frontend/ it is unreachable anyway.
  • fix(frontend): keep the MSW worker in step with the lockfile (#6222)
    The tracked frontend/public/mockServiceWorker.js is generated by msw and pinned
    at 2.14.7, while package-lock.json installs 2.15.0. msw rewrites the worker on
    postinstall, so npm ci leaves the tree dirty on a clean checkout and every
    contributor either commits an unrelated 30-line diff or discards it.
    
    Regenerate the worker for the locked version and add a check that compares it
    against the installed runtime, wired into make verify and CI so the pair cannot
    drift again.
  • ci: actually run the PostgreSQL schema and migration tests (#6224)
    * ci: actually run the PostgreSQL schema and migration tests
    
    TestHostAutoMigrateCreatesColumns_Postgres and TestMigrate_Postgres skip
    unless XUI_DB_TYPE and XUI_DB_DSN are set. CI sets them only for the
    durable-first step, so both tests have never run: a green pipeline says
    nothing about the PostgreSQL schema or the migration path.
    
    The job already has a PostgreSQL service. Point those two tests at it and
    fail if either skips, the same guard the durable-first step uses.
    
    * ci: make the PostgreSQL guard fail on a renamed test, and self-test the workflow
    
    The guard asserted the absence of `--- SKIP`, which only catches a test that
    ran and skipped. A renamed or deleted test makes `-run` match nothing, so
    `go test` prints "no tests to run" and exits 0 — the step stays green while
    testing nothing, which is the exact failure this PR set out to close.
    
    Both steps now count `--- PASS` lines and require the expected number: at
    least one for durable-first, exactly two for the schema tests.
    
    Also adds `.github/workflows/ci.yml` to both `paths` filters so a change to
    the workflow runs the workflow — without it this PR's own CI never fired and
    the new step would first execute on main after merge — and hoists the
    duplicated DSN to job-level `env`.
    
    ---------
    
    Co-authored-by: n0ctal <n0ctal@users.noreply.github.com>
  • ci(release): stamp released binaries with their source revision (#6223)
    * ci(release): stamp released binaries with their source revision
    
    The release job builds `main.go`, which Go records as a file list rather than a
    package, so the binary carries no VCS metadata at all: `go version -m xui-release`
    reports command-line-arguments and nothing else. There is no way to tell which
    commit a published binary came from, which is exactly what you want when a user
    reports a bug against "the latest release".
    
    Build the package with -buildvcs=true instead. Same output, same flags, plus
    vcs.revision and vcs.time in the binary.
    
    * ci(release): give the Windows job the git it needs to stamp
    
    -buildvcs=true fails the build when it cannot read VCS state, and the MSYS2
    shell the Windows job runs in has no git on PATH. Install it there so the
    Windows binary carries the same revision as the Linux ones instead of the flag
    turning into a build break.
    
    ---------
    
    Co-authored-by: n0ctal <n0ctal@users.noreply.github.com>
  • fix(ci): resync the bot prompts with the repo and close the gaps an audit found
    The three prompts still enforced the comment ban CLAUDE.md replaced with
    the 2-line cap on Aug 1 (1ff90c5b), so the review bot would flag every
    legitimate short comment; frontend/CLAUDE.md and CONTRIBUTING.md carried
    the same stale rule. The PR reviewer's recipe for reading a post-change
    file (headRefOid + pr diff) was unfulfillable with its allowlist - it now
    fetches refs/pull/N/head and reads blobs via git show, object-only, no
    checkout. Conventions the reviewer checks now include the unchecked docs
    openapi.json copy step, the docs/lib/xray third link implementation, the
    both-ways route contract, and the i18n dead-key half of the rule.
    
    Also: drop the SUBPROCESS_ENV_SCRUB=0 override on the two untrusted-input
    jobs (the mention job proves gh works scrubbed); teach the triage prompt
    the issue forms (pre-applied labels, required fields, no re-asking); add
    a security-report exception plus SECURITY.md so vulnerabilities are not
    confirmed publicly; add a clarification follow-up job so a reporter's
    reply to "clarification needed" is actually processed; review PRs again
    on ready_for_review and skip drafts; stamp the reviewed head SHA so
    force-pushes visibly date a review; scope gh issue/pr edit to label and
    title flags; per-job concurrency; comment guards now match the actual
    bot login after the run started; artifact names survive re-runs; the
    mention prompt's repo map and env-var facts corrected (XUI_PORT,
    XUI_TUNNEL_HEALTH_*, distro env files, memory.high, encrypt-tokens).
    The bug and feature forms also referenced a "needs triage" label that
    does not exist in the repo and was silently never applied - dropped.
  • fix(ci): close the TOCTOU race in the conflict-resolution bot
    The resolve-conflicts job runs on issue_comment, a privileged trigger: it
    holds GITHUB_TOKEN, the Claude OAuth token and the push PAT, and it checks
    out fork code with `gh pr checkout`. The only gate was that the commenter
    is the repository owner, which says nothing about the code that ends up in
    the workspace. A contributor could force-push to the pull request head
    between the owner asking for the merge and the runner fetching it, so the
    owner reviews one tree and the job runs another.
    
    Verify before anything is checked out that the head repository was last
    pushed to before the triggering comment was written, and refuse the run
    otherwise. Pin the head SHA reported by that check and abort if the commit
    `gh pr checkout` lands on differs, which closes the remaining window
    between the check and the fetch. Require author_association to be OWNER
    alongside the existing login comparison.
    
    This also clears CodeQL actions/untrusted-checkout/high, which for
    issue_comment triggers demands both an actor/association check and a
    comment-vs-head-date check dominating the checkout.
  • fix(ci): harden the conflict resolver against the branch it checks out
    resolve-conflicts is the one job that puts a pull request's own tree in
    the working directory while holding CLAUDE_CODE_OAUTH_TOKEN,
    CLAUDE_BOT_PAT and a write-scoped token, which is what CodeQL alert 101
    (actions/untrusted-checkout) points at. Nothing in the job executes that
    tree and the trigger is gated on the repository owner, so the alert is
    not reachable as written, but two of its guards were weaker than they
    read.
    
    Git hooks were neutered only after gh pr checkout had already run, so
    the guard sat one step behind the checkout it exists to cover; it now
    precedes it. The conflicted paths are concatenated into the
    --allowedTools value handed to the model, so a path carrying a comma or
    a parenthesis would widen that allowlist. Only both-modified paths reach
    that code today, which means they already exist in the base repository,
    but the merge is now handed back to the maintainer unless every
    conflicted path is plain [A-Za-z0-9._/-].
    
    The file's header comment block is dropped.
  • 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.
  • fix(ci): stop the conflict job trusting the branch it is merging
    A second audit of the hardened workflow found the "no shell at all"
    claim in resolve-conflicts was still false, by two routes that live
    outside this file.
    
    The job runs the model in the workspace right after `gh pr checkout`,
    so for a fork pull request the working directory is attacker-controlled.
    claude-code-action writes `enableAllProjectMcpServers = true` into
    ~/.claude/settings.json before starting Claude Code
    (base-action/src/setup-claude-code-settings.ts), and the CLI honours a
    project `.mcp.json` unless `strictMcpConfig` is set, which the action
    never sets. A contributor branch carrying an `.mcp.json` therefore got
    its command spawned at session start, with --allowedTools gating tool
    calls but not server startup. The same tree also supplied CLAUDE.md and
    .claude/ as project instructions. The job now passes
    `--strict-mcp-config` and `--setting-sources user`, so nothing in the
    merged tree configures the session.
    
    The second route was `Edit` with no path scope, the only unscoped file
    grant left. Editing `.git/config` to set `core.fsmonitor` or a
    `credential.helper` gets a command run by the next step's git calls,
    which hold CLAUDE_BOT_PAT, and the stray-file guard could never see it
    because `git diff --name-only` lists tracked paths only. The merge step
    now emits one `Edit(//<workspace>/<file>)` rule per conflicted path and
    the model gets exactly those plus /tmp, with `.git/**` denied outright
    and Bash, WebFetch, WebSearch and Task denied by name. Hooks are
    disabled for the run (`core.hooksPath=/dev/null`, `commit --no-verify`).
    
    Conflict handling gets three real gaps closed: modify/delete, rename and
    both-added conflicts (git status DD/AU/UD/DU/AA/UA) leave no markers, so
    they used to sail through the marker check and get committed unresolved
    - they are now detected up front and handed back untouched; the marker
    scan covers `=======` and `|||||||`, not just the outer pair; and after
    staging, `git diff --diff-filter=U` must come back empty or nothing is
    committed. A `=======` markdown underline of exactly seven characters in
    a conflicted file will now hand the merge back rather than commit it,
    which is the safe direction.
    
    Smaller things the audit was right about:
    - the mutating gh rules are prefix rules, so `Bash(gh issue close:*)`
      reached every issue in the repository. They now carry the triggering
      number: `Bash(gh issue close ${{ github.event.issue.number }}:*)`.
    - `Write(//tmp/**)` is granted alongside `Edit(//tmp/**)`: the docs say a
      Write(path) rule is never matched by the file checks, so the Edit rule
      is what authorises it, but the tool has to be listed to exist at all.
      Without this the model could not create /tmp/comment.md.
    - the mention prompt lost its thread context when it moved to agent mode
      and referred to "<number>" literally; it now gets repo, number, title
      and whether the thread is a pull request.
    - `git log`/`git show` are gone from mention: `--output=<file>` makes
      them a file-write primitive.
    - `@claude resolve pr conflicts` on a plain issue matched no job at all.
    - the commit step gated on `skip != 'true'`, so it also ran when the
      merge step died before writing any output; it now needs `skip ==
      'false'`.
    - bot-authored pull requests (dependabot opens three ecosystems' worth)
      no longer start a review run that the action refuses to serve.
    - resolve-conflicts drops to `contents: read`, since the push is the
      PAT's job, and fails with a comment when that PAT is missing.
  • fix(ci): close the write paths an audit found still open in the bot
    Making the jobs read-only in the previous commit was not enough: two of
    the mechanisms that grant write access were invisible in the workflow
    file itself.
    
    Every job now passes a `prompt:` input. Without one, claude-code-action
    picks tag mode for a mention, and src/modes/tag/index.ts then appends
    `--permission-mode acceptEdits`, its own allowedTools including
    `Bash(git commit:*)` and a push wrapper, and calls setupBranch. So the
    mention job could edit files and commit them no matter what its own
    allowedTools said, and its system prompt claiming otherwise was simply
    wrong. A `prompt:` selects agent mode, which adds nothing. It also
    removes tag mode's hidden requirement that the comment contain the
    trigger phrase, which would have made resolve-conflicts a no-op for a
    comment that said only "resolve pr conflicts".
    
    resolve-conflicts no longer hands git to the model. `Bash(git:*)` is a
    prefix rule, so it permitted `git push origin HEAD:main`, `--force`,
    `git remote set-url`, and shell execution through `git config alias.x
    '!sh -c ...'` - the action ships scripts/git-push.sh precisely because
    `git push:*` allows `--receive-pack='sh -c ...'`. The job now splits in
    three: a step checks out the PR branch, merges the base and collects the
    conflicted paths; the model gets Read/Glob/Grep/Edit and no shell at all;
    a final step verifies and pushes. That step refuses to commit if a
    conflict marker survives, if the model wrote /tmp/ABORT, or if anything
    outside the conflicted set was touched, and it stages those paths
    individually instead of `git add -A`. The PAT is now written to the push
    URL only in that last step, after the model's session has ended, instead
    of sitting in .git/config while untrusted branch content is read.
    
    The bare `Write` grant in the three answering jobs becomes
    `Edit(//tmp/**)`, since only prose kept it out of the checkout and out of
    $GITHUB_ACTION_PATH, whose scripts run after the model step. Each prompt
    now says to fall back to an inline --body if the write is refused, so a
    denied write cannot silently cost a reply. mention gains the transcript
    upload and the no-reply guard the other jobs already have, keyed to the
    triggering comment's timestamp.
    
    Restores the header note about the 21000-character expression cap, with
    the current block sizes.
  • refactor(ci): make the bot read-only except for PR conflict resolution
    The bot is meant to investigate and explain, not to write code. It could
    do considerably more than that: handle-pr-fix applied fixes and pushed
    them to any trusted author's PR, an @claude mention on a pull request
    could edit files, and an @claude mention on an issue opened a pull
    request against main. All of it is gone.
    
    Now every job that answers automatically runs with a contents: read
    token, so pushing is impossible rather than merely forbidden:
    
    - handle-pr-fix is deleted. handle-pr-review takes every pull request
      instead of only the ones from outside contributors, and it comments.
    - mention drops contents: write, the push-URL routing step, and the
      Edit tool. Its Bash allowlist is now an explicit read-only set - the
      gh subcommands it needs plus git log/show/diff/blame - so gh api,
      gh pr merge and gh pr create are no longer reachable. Asked for a
      fix, it now writes the change out in full instead of applying it.
    
    One narrow exception replaces all of that: resolve-conflicts. It runs
    only when the repository owner comments "resolve pr conflicts" on a
    pull request, and it may merge the base branch into that PR's head
    branch and resolve the conflicts, nothing else. It keeps both sides of
    every conflict, takes the base version of generated artifacts it cannot
    regenerate here, and aborts the merge rather than guess when a hunk
    needs a human. It never force-pushes, merges, or closes.
    
    Also removes the pull-request-opening step whose guard never worked:
    gh api prints the 404 body on stdout, so `ahead=$(gh api ... || echo 0)`
    became `{"message":"Not Found",...}0`, never equal to "0", and every
    reply-only mention run ended red on `gh pr create`. Uploads the
    handle-pr-review transcript the way handle-issue already does, so a run
    that dies inside the sandbox leaves evidence.
  • fix(ci): unbreak the issue-triage bot, which answered nothing
    Since 2026-07-20 every `issues` run reported success while posting no
    comment at all - #6094 through #6103 carry zero replies. The cause is
    the sandbox, not the prompt or the model.
    
    `handle-issue` and `handle-pr-review` pass allowed_non_write_users,
    which is what lets the bot run for reporters who have no write access.
    claude-code-action reacts to that input by turning subprocess isolation
    on and installing bubblewrap, and that sandbox cannot start on the
    runner: every Bash call dies during setup, before the command itself
    runs, with
    
        bwrap: Can't create file at /home/.mcp.json: Permission denied
    
    `gh` is reachable only through Bash, so the triage investigated the
    issue, wrote its reply to /tmp/comment.md, and could never post it.
    The action itself did not crash, so the job stayed green.
    
    Opt both jobs out with CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=0. The scrub is
    a best-effort wipe of secrets from subprocess environments, not an
    access control; what actually bounds these jobs is unchanged - a
    contents: read token that cannot push, and a Bash allowlist holding
    only specific `gh issue`, `gh label`, `gh search` and `gh release`
    subcommands. Code changes stay confined to handle-pr-fix and mention,
    which only trusted actors and the owner can trigger.
    
    Add a step to each job that fails the run when no bot comment landed on
    the issue or pull request, so the next silent breakage shows up red
    instead of green, and lower retention-days to the repository maximum of
    7 so the artifact upload stops warning.
  • chore(deps): migrate to react-router 8 and refresh frontend dependencies
    react-router-dom 7 is superseded by react-router 8, which folds the DOM
    bindings back into the core package. RouterProvider now comes from
    `react-router/dom`, while the hooks and `createBrowserRouter` move to
    `react-router`. Updates the nine importing modules and the router line in
    docs/architecture.md to match.
    
    Also refreshes antd, react-i18next, storybook, eslint, lint-staged and
    playwright to current patch/minor releases, and restores alphabetical order
    in devDependencies for the @vitest/browser-playwright and playwright entries.
    
    Bumps brace-expansion to 5.0.8, the only release outside the affected range
    of GHSA-mh99-v99m-4gvg (unbounded expansion length causing an OOM crash).
    `npm audit fix` could not apply this on its own: the lockfile pinned 5.0.7
    and npm will not re-resolve a transitive-only dependency in place, so the
    entry was updated directly and reinstalled.
  • fix(ci): keep the triage prompt under the 21000-char expression cap
    The previous commit pushed handle-issue's prompt to 21587 characters and
    GitHub stopped parsing the file: "(Line: 39, Col: 19): Exceeded max
    expression length 21000". Because the prompt interpolates ${{ }}, GitHub
    treats the whole block scalar as a single expression, and the cap applies
    per expression. The failure mode is quiet and total - no job fails,
    the workflow itself disappears, its registered name reverts from "Claude
    Bot" to the file path, and the only signal is a run attributed to the
    push with no jobs in it.
    
    Drop the hand-written stack description, repository map and runtime-fact
    list from that prompt and point at CLAUDE.md and docs/architecture.md
    instead. Both are maintained, both are already in the checkout, and the
    copy in the prompt had drifted from them anyway - it still described the
    mtg worker, omitted internal/tunnelmonitor/ and memory.high, and filed
    internal/web/runtime/ under "wiring". Only the support-facing facts that
    live in neither file are kept: the install one-liner, the random initial
    credentials, the distro-dependent env file, the Docker image and the
    capabilities fail2ban needs.
    
    handle-issue is now 15069 characters, and a header comment records the
    limit so the next edit does not rediscover it in production.
  • fix(ci): repair the Claude bot and narrow what it can reach
    Three problems, all in .github/workflows/claude-bot.yml.
    
    It was silently dead. No comment had been posted since 2026-07-20 while
    every run reported success: roughly twenty issues and pull requests each
    burned 18-56 turns and up to $2.59, ended with permission denials, and
    published nothing. Comment bodies are markdown, markdown is full of
    backticks, and inside a quoted `--body "..."` backticks are command
    substitution, so the write was rejected and a failed triage looked
    exactly like a clean one. The body now goes to /tmp through Write and out
    through --body-file, in every branch of both jobs, and each job re-reads
    the thread afterwards so a rejected write fails loudly instead of
    reporting success. The run transcript is kept as an artifact.
    
    It could reach much further than it claimed. Both jobs that any GitHub
    user can trigger declared themselves READ-ONLY in prose while holding
    Bash(gh:*), which is not a GitHub-scoped allowlist: `gh alias set --shell`
    runs its argument through sh -c and `gh extension install` fetches and
    executes code, both as single commands whose first token is gh. That is a
    general shell on a runner holding CLAUDE_CODE_OAUTH_TOKEN, which does not
    expire with the job. `gh api` accepted any method, issues: write is
    repo-scoped rather than issue-scoped, and `gh pr review --approve`,
    `gh pr close` and `gh pr checkout` were forbidden in prose only. Those two
    jobs now list the subcommands they actually run. The untrusted title and
    body are fenced in tags carrying github.run_id, unguessable at the time
    the issue is written, and the invariants an allowlist cannot express -
    one issue number, labels and title only, /tmp as the sole writable path,
    never $GITHUB_ENV - are stated explicitly. Both checkouts get
    persist-credentials: false. handle-pr-fix and mention keep their
    wildcards: only owners, members and collaborators can trigger them, and
    narrowing the maintainer's own path risks more than it protects.
    
    Its review hid findings and its triage quoted stale facts. "Prefer a few
    high-signal findings over many low-value ones" is read literally by
    Opus - it finds the bug, judges it below the stated bar and says
    nothing - while the Severity and Confidence tiers already existed to do
    that filtering. The review also never said that the working directory is
    the base revision, so it could assert that a case was unhandled in code
    the pull request had already rewritten, and label it confirmed, on an
    outside contributor's first patch. Four CLAUDE.md conventions were
    missing, each a guaranteed miss: openapigen's StructAllow allowlist, the
    layering rules including the runtime.Runtime dispatch requirement that
    silently breaks multi-node when bypassed, the assertion standard, and
    golden share-link fixtures regenerated to turn a red test green. On the
    triage side the invalid and duplicate branches were gated three times
    over and so never fired, leaving spam to collect a full investigation and
    a courteous reply; /etc/default/x-ui was given as the env file when it is
    distro-dependent, making the PostgreSQL migration advice a silent no-op
    on RHEL and Arch; an env list labelled "full" omitted XUI_PORT and the
    XUI_TUNNEL_HEALTH_* family; XTLS was offered as a security option the
    panel does not have. docs/architecture.md was invisible to both prompts
    despite being maintained and already in the checkout. From the bot's own
    output: it published a trigger only the maintainer can use, retitled
    issues without saying so, asked for screenshots it cannot open, and once
    invented a reason for a number it had miscounted.
    
    All four jobs move to Opus 5, at xhigh effort rather than max - the
    recommended tier for agentic work, and one below the overthinking that
    max invites on routine triage.
  • fix(ci): publish dev-latest edit-first instead of probing for existence
    The dev-latest publish step probed for the release with gh release
    view before choosing edit or create. During the api.github.com 503
    storm the probe itself failed, mis-routing an existing release into
    the create path, which then died on a permanent 422 already-exists
    error that no amount of retrying can fix.
    
    The release exists on every run but the very first, so edit first and
    fall back to create only when the edit fails. The retry log line now
    names the gh subcommand instead of just the binary.
  • fix(ci): resolve the mtg-multi tag from the release-page redirect
    The api.github.com outage that failed the previous release run outlasted
    the retry window, while asset downloads from github.com kept working the
    whole time. The latest-release lookup was the only api.github.com
    dependency left in the build jobs, so resolve the tag from the release
    page redirect on github.com instead: tag resolution now shares exactly
    the failure domain of the downloads it feeds, and an API-only outage can
    no longer fail a build that could otherwise finish. No token needed for
    the redirect, on either platform.
  • fix(ci): survive transient GitHub 5xx outages in the release workflow
    A GitHub API 503 storm failed the release run four attempts in a row:
    the mtg-multi latest-release lookup died on every platform (even s390x,
    which never packages the sidecar), and the matrix default fail-fast then
    cancelled the six healthy builds alongside the one that hit the outage.
    
    Retry every external fetch with backoff (curl --retry-all-errors, wget
    --retry-on-http-error, Invoke-* -MaximumRetryCount), scope the mtg-multi
    tag lookup to the platforms that actually package the sidecar, disable
    fail-fast on the build matrix, and retry the idempotent dev-latest
    publish commands. The workflow file itself now triggers the run's path
    filters, so editing it exercises the release build immediately instead
    of failing silently at the next code push.
  • chore(deps): bump actions/setup-go from 6 to 7 (#5995)
    Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6 to 7.
    - [Release notes](https://github.com/actions/setup-go/releases)
    - [Commits](https://github.com/actions/setup-go/compare/v6...v7)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-go
      dependency-version: '7'
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • chore(deps): bump actions/setup-node from 6 to 7 (#5992)
    Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6 to 7.
    - [Release notes](https://github.com/actions/setup-node/releases)
    - [Commits](https://github.com/actions/setup-node/compare/v6...v7)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-node
      dependency-version: '7'
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • fix(ci): install the docs-pinned pnpm instead of floating on 11.x
    pnpm/action-setup resolved 'version: 11' to the newest 11.x, and its self-installer crashes upgrading to 11.12.0 (Cannot use 'in' operator to search for 'integrity'), failing both docs workflows at setup. Reading docs/package.json instead installs the exact packageManager pin (pnpm@11.9.0), which also keeps the workflows and the lockfile toolchain on a single source of truth.
  • chore: standardize the toolchain on Node 24 LTS
    The repo now pins Node 24 everywhere instead of mixing 22 and hardcoded workflow versions. The docs workflows read .nvmrc like the main CI already did, so the Storybook bundle in the Pages deploy builds on the same runtime as the PR gate. The docs gen:api script runs its TypeScript entry natively, dropping the experimental type-stripping flag that Node 24 makes default; the matching frontend cleanup (engines and gen:api) landed with the Storybook commit.
  • feat(docs): publish the component Storybook on the docs site
    The docs site and the component workbench were entirely disconnected. The Pages deploy now builds the frontend Storybook and bundles it into the artifact under /storybook, so the live component reference ships with the documentation, and the navbar links to it. Story changes trigger a redeploy so the published workbench cannot go stale.
  • feat(frontend): make Storybook a validated, fully covered component workbench
    Storybook existed only as an undocumented local tool: 9 of 24 reusable components had stories, autodocs pages were bare prop tables, nothing built or tested the stories, and no contributor doc mentioned the workbench existed.
    
    Every reusable component under src/components/ now has a co-located story with enriched autodocs (component descriptions plus per-prop argTypes, kept as string metadata since the repo bans line comments). Stories double as headless Chromium tests through the Storybook vitest addon, with axe accessibility checks enforced as errors and play-function interaction tests covering the modals, the RHF field bridge, the config block, and the select-all buttons. The preview now mirrors the panel's real theme DOM (body class, shared AntD theme config, seeded theme storage) so what stories render matches production.
    
    CI and make verify gain a static Storybook build as a compile gate, and the frontend test job installs Chromium so story tests run on every PR. Contributor docs (frontend README, CONTRIBUTING, agent guides) document the workbench, the story conventions, and the Controls setup. Node engines move to 24 LTS and gen:api drops the type-stripping flags that Node 24 makes default.
  • 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.
  • ci(claude-bot): structure PR review and issue triage prompts
    Rework the handle-pr-review, handle-pr-fix, and handle-issue prompts to produce professional, structured output. The review job now rates findings by severity and confidence across explicit review areas and reports a Summary, Findings, and a text-only verdict in one plain comment; the fix job reuses the same lens to prioritize what it applies versus leaves for the author; issue triage gains a structured bug-confirmation format and explicit outcomes for mislabeled and not-a-bug reports, closing conservatively. Severity uses text labels to respect the no-emoji house style, and the adapted ignore-list keeps i18n and generated files flaggable.
  • ci(claude-bot): auto-open the PR after an owner @claude fix on an issue
    claude-code-action only pushes a branch and posts a Create PR link by design; it never opens the PR itself. Add a post-step to the mention job that opens a PR from the action's branch_name output when the trigger was an issue (guarded against no-op branches and against an existing PR).
    
    Simplify the mention prompt so the agent just makes edits with Edit/Write and lets the workflow commit and open the PR, instead of running git/gh pr create itself (which fought the action's built-in flow and left only a link).