Commit Graph
6 Commits
  • feat(api): scoped, optionally expiring API tokens (#6201)
    * security(api): add scoped expiring API tokens
    
    * security(api): make scoped token lifecycle enforceable
    
    ---------
    
    Co-authored-by: n0ctal <293235942+n0ctal@users.noreply.github.com>
  • fix(sub): honor trustedProxyCIDRs before forwarded URLs (#6135)
    * fix(sub): honor trustedProxyCIDRs before forwarded URLs
    
    * fix(sub): avoid unused trust-setting lookups
    
    Skip the trustedProxyCIDRs lookup when no forwarded header can affect a subscription URL. Keep the shipped proxy default in one exported setting constant and document the subscription-link behavior for custom proxy boundaries.
    
    * fix(frontend): meet config text contrast requirements
    
    Keep compact configuration text readable in the light theme and satisfy the Storybook accessibility check.
    
    ---------
    
    Co-authored-by: PathGao <gaoyanbo@gaoyanbodeMacBook-Air.local>
  • fix(ui): explain the REALITY client version gate and drop the impossible placeholder (#6125)
    * fix(ui): explain the REALITY client version gate and drop the impossible placeholder
    
    An empty Min Client Ver looks unrestricted, but Xray-core silently
    falls back to a built-in minimum (currently 26.3.27) that rejects
    third-party cores such as Mihomo and sing-box with a bare REALITY
    verification failure, and nothing in the panel points at the field.
    Add tooltips to both version fields explaining the fallback and its
    TLS-fingerprint-freshness rationale.
    
    The Max Client Ver placeholder (25.9.11) sat below the built-in
    minimum, so filling in both placeholders produced a range that
    rejects every client. Remove it; empty genuinely means no upper
    limit for that field.
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    
    * docs(reality): warn that an empty min client version rejects old cores
    
    Common pitfalls covered bad targets, SNI mismatches, leaked keys and
    wrong flow, but not the client version gate that currently bites
    Mihomo and sing-box users. Add it to all four doc languages.
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    
    * fix(ui): word the version hints against the effective minimum
    
    Address the automated review: the Max Client Ver hint said only 'not
    lower than Min Client Ver', which re-establishes the empty-means-unset
    mental model when the effective floor is the core's built-in minimum.
    Both hints now name the effective minimum and tie the quoted 26.3.27
    to the core build the panel runs, since operators can install any
    Xray-core version.
    
    Also from review: full-width quotes and a missing verb in the zh doc
    bullet, the idiomatic Arabic opening, and a format-only x.y.z
    placeholder on Max Client Ver so the field still conveys its shape.
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    
    ---------
    
    Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
  • 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.
  • docs: vendor the documentation site into the monorepo
    Fold the standalone 3x-ui-docs project (Next.js 16 + Fumadocs, deployed to
    docs.sanaei.dev) into docs/ so the panel and its documentation share a single
    source of truth, the way sing-box keeps its docs in-tree. The old repo becomes
    redundant and can be retired.
    
    - Import the full site under docs/ (app, components, content, lib, public,
      scripts, config). The self-contained pnpm project sits alongside the existing
      engineering notes with no filename collisions.
    - Re-point "Edit on GitHub" links from MHSanaei/3x-ui-docs to this repo's
      docs/content/docs path (docs/lib/shared.ts, docs/app/.../page.tsx).
    - Add docs-ci.yml and docs-deploy.yml under .github/workflows/, scoped to
      docs/** and run with working-directory: docs, since GitHub only runs
      workflows from the repo-root .github/. deploy-static.yml's GitHub Pages
      publish (CNAME docs.sanaei.dev) carries over unchanged.
    
    Follow-up (outside this commit): attach the docs.sanaei.dev custom domain to
    this repository's Pages (or set the Vercel project's root directory to docs),
    confirm the site is live from the monorepo, then delete MHSanaei/3x-ui-docs.