Commit Graph
65 Commits
  • feat(json): swap raw textareas for a CodeMirror 6 JsonEditor
    A new JsonEditor.vue component wraps CodeMirror 6 + lang-json with
    line numbers, JSON syntax highlighting, bracket matching, code
    folding, search (Ctrl+F), undo/redo, lint (red squiggle and gutter
    icon on invalid JSON), tab indent, and line wrapping. It is wired
    into the four raw-JSON spots that previously used <a-textarea
    class="json-editor">: the Xray Advanced Template tab, the Outbound
    JSON tab, the Balancer Observatory pane, and the Inbound Advanced
    tab (settings / streamSettings / sniffing).
    
    Chrome colors are driven by EditorView.theme so they win the
    specificity fight cleanly against CodeMirror's own injected styles.
    A single buildDarkTheme() factory yields a Dark+ palette (#1e1e1e
    background, #252526 active line, #2d2d30 panels) for the regular
    dark mode and a near-black variant (#0a0a0a / #141414 / #1f1f1f
    border) for ultra-dark — both pair with oneDarkHighlightStyle for
    the syntax colors. Light mode stays on basicSetup's default.
    
    CodeMirror lazy-loads as a ~17 kB gzipped chunk that only appears
    on the Xray/Inbounds bundles.
  • feat(tabs): collapse settings and xray tab bars to evenly-spread icons
    On phones the five Settings tabs and six Xray tabs overflowed the
    viewport. Now the tab labels are stripped (v-if="!isMobile"), the
    nav-list stretches to full width via display:flex + width:100%, and
    each tab claims an equal share with flex:1 1 0 so the icons spread
    across the row instead of bunching. Icons bumped to 18px with a
    tooltip carrying the original label for discoverability.
  • feat(nodes): mobile card list, info modal, and tighter summary layout
    NodeList now branches on isMobile: a vertical card list mirrors the
    inbound mobile redesign — status dot + name + an Info icon that opens
    an a-modal with the full per-node stats (address, status, CPU/mem,
    xray version, uptime, latency, last heartbeat). The card head expands
    to surface NodeHistoryPanel inline (parity with the desktop expandable
    row), and the more-dropdown carries probe/edit/delete.
    
    NodesPage also gets two layout fixes: an 8px vertical gutter between
    the summary card and the node list on mobile (was 0), and a 2x2 grid
    for the four summary statistics on phones via :xs="12" plus a 16px
    inner vertical gutter, so Total/Online/Offline/Avg Latency no longer
    crowd each other.
  • feat(inbounds): collapse mobile cards to id/email + info button
    Mobile inbound cards now show only #id and remark; mobile client cards
    show only the status badge and email. The full stat grid (protocol,
    port, node, traffic, all-time, clients, expiry — and per-client
    remained/online/expiry) moves behind a new info icon that opens an
    a-modal, so the list stays scannable on small screens.
  • feat(inbounds): align tunnel, tun, and hysteria UI with Xray docs
    * tunnel: rename settings to Xray's current schema (address →
      rewriteAddress, port → rewritePort, network → allowedNetwork) in
      the model, form modal, info modal, and the bundled API inbound
      template; expose portMap so per-port forwarding can be configured
      from the panel.
    * tun: add the full TUN protocol form and read-only info blocks
      (name, mtu, gateway, dns, userLevel, autoSystemRoutingTable,
      autoOutboundsInterface) — previously the protocol was selectable
      but the form rendered blank.
    * hysteria: surface the stream-level version, obfs password, and
      udpIdleTimeout fields that the model already supported.
    
    Refs https://xtls.github.io/config/inbounds/tunnel.html
    Refs https://xtls.github.io/config/inbounds/tun.html
    Refs https://xtls.github.io/config/transports/hysteria.html
  • fix(warp): set license against Cloudflare API and surface errors inline
    The license update was always failing because the Cloudflare response has
    no `success` field — the check rejected every successful PUT. On real
    errors (e.g. "Too many connected devices."), the toast leaked the raw URL
    + JSON body. Now the WARP API's error envelope is parsed into a clean
    message and shown inline next to the Update button.
  • fix(forms): validate JSON tabs before applying or saving
    InboundFormModal: switching out of the Advanced tab now parses the three
    JSON textareas and rebuilds the structured Inbound via Inbound.fromJson,
    so the Basic tab reflects what was pasted. Invalid JSON keeps the user
    on Advanced with a specific parse error.
    
    XrayPage: Save now parses xraySetting upfront and snaps the user back to
    the Advanced tab on invalid JSON instead of letting the backend reject a
    generic blob.
  • fix(inbounds): hide node UI when no enabled node exists
    The Deploy-to selector, node column, node stat row, and node filter all
    appeared whenever a node row existed in the DB. Local-only deployments
    with no nodes (or only disabled nodes) saw a dropdown that only had
    "Local Panel" and a filter that did nothing.
    
    useNodeList now exposes hasActive (any node with enable === true).
    Inbounds form and list gate node UI on hasActive instead of map size.
  • fix(outbound): accept JSON-only configs and sync JSON to basic form on tab switch
    Pasting a JSON config and clicking OK failed with "Something went wrong"
    because validation read the empty form-side tag input instead of the
    JSON's tag. Switching from the JSON tab to Basic also discarded any
    JSON the user had pasted.
    
    - onOk now validates and submits from the JSON tab using the parsed JSON
    - Tab switch JSON→Basic deserializes the JSON back into the structured form
    - Invalid JSON keeps the user on the JSON tab with a clear parse error
    - Empty form-tag / duplicate-tag errors are now specific, not generic
  • feat(api-tokens): manage multiple named tokens; add tab/section anchor URLs
    Replace the single regenerable API token with a named-token list:
    - New ApiToken model + service with constant-time auth matching
    - Seeder migrates the legacy `apiToken` setting into a "default" row
    - Security tab gets create/enable/delete UI; api-docs page links to it
    - Dedicated "API Tokens" section in the in-panel docs
    
    URL anchors now reflect the active tab/section on Settings, Xray, and
    API Docs pages, so deep links like `/panel/settings#security` work.
    
    Translations for the 8 new SecurityTab strings added across all locales.
  • feat(routing): drag-reorder rules, split balancer column, mobile card layout
    - Grip-handle drag-and-drop on the # cell to reorder rules, built on
      Pointer Events so the same code works for mouse, touch, and pen
      (HTML5 drag doesn't fire from touch on iOS Safari). 5px threshold
      keeps quick taps from triggering a reorder; up/down arrow menu
      items stay as a keyboard/a11y fallback. Drop indicator is a 2px
      blue line on the target edge; dragged row fades to 40%.
    - Split the old combined target column into Outbounds and Balancer
      columns. Each row now has exactly one populated cell — green
      outbound tag or purple balancer tag.
    - Mobile drops the a-table (520px+ of column widths overflowed every
      phone) for a stacked card layout: # + grip + actions on top, an
      "Inbound → Outbound/Balancer" flow row in the middle, and criteria
      chips (domain, IP, port, src IP/port, L4, protocol, user, VLESS)
      below for whichever fields are actually set. Multi-value chips
      collapse to "first +N" with full value on hover.
  • style(api-docs): redesign TOC, section icons, endpoint rows, and code blocks with ultra-dark support (#4332)
    * style(api-docs): redesign TOC, section icons, endpoint rows, and code blocks with ultra-dark support
    
    * style(api-docs): rename visibleSections to visibleEndpoints, drop dead toc-stuck CSS
    
    - visibleSections counted endpoints, not sections — rename matches
      the displayed "X / Y endpoints" label.
    - .toc-nav.toc-stuck was never toggled by any code path.
    
    * docs(api): add missing POST /panel/api/inbounds/:id/resetTraffic entry
    
    This route was added in #4334/#4338 but endpoints.js wasn't updated,
    breaking TestAPIRoutesDocumented (91 routes in source, 90 documented).
    
    ---------
    
    Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
  • fix(auth): invalidate sessions when 2FA is enabled, fix dev 401 loop
    Add UserService.BumpLoginEpoch and call it from updateSetting when
    TwoFactorEnable flips false → true. Existing cookies (issued under
    the looser no-2FA policy) get a 401 on their next request and are
    forced through the login flow. Disabling 2FA is a relaxation and
    does not bump the epoch — sessions stay valid.
    
    Also fix the dev-mode 401 redirect: targeting `${basePath}login.html`
    breaks when basePath isn't "/" (Vite has no file at e.g.
    "/test/login.html"; the SPA fallback loops the 401). Navigate to
    basePath instead — Vite's bypassMigratedRoute and Go's index
    handler both serve login.html for that path.
    
    Strip stale doc-comment from netsafe and IndexController.logout
    in line with the project's no-inline-comments convention.
  • Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275)
    * refactor(session): store user ID in session instead of full struct
    
    Replaces storing the full User object in the session cookie with just
    the user ID. GetLoginUser now re-fetches the user from the database on
    every request so credential/permission changes take effect immediately
    without requiring a re-login. Includes a backward-compatible migration
    path for existing sessions that still carry the old struct payload.
    
    * feat(auth): block panel with default admin/admin credentials and guide credential change
    
    checkLogin middleware now detects default admin/admin credentials and
    redirects every panel route to /panel/settings until they are changed.
    The settings page auto-opens the Authentication tab, shows a
    non-dismissible error banner, and lists 'Default credentials' first in
    the security checklist. Login response includes mustChangeCredentials
    so the login page can redirect directly. Logout is now POST-only.
    Password must be at least 10 characters and cannot be admin/admin.
    
    * feat(settings): redact secrets in AllSettingView and add TrustedProxyCIDRs
    
    Introduces AllSettingView which strips tgBotToken, twoFactorToken,
    ldapPassword, apiToken and warp/nord secrets before sending them to
    the browser, replacing them with boolean hasFoo presence flags. A new
    /panel/setting/secret endpoint allows updating individual secrets by
    key. Secrets that arrive blank on a save are preserved from the DB
    rather than overwritten. Adds TrustedProxyCIDRs as a configurable
    setting (defaults to localhost CIDRs). URL fields are validated before
    save.
    
    * fix(security): SSRF prevention, trusted-proxy header gating, CSP nonce, HTTP timeouts
    
    Adds SanitizeHTTPURL / SanitizePublicHTTPURL to reject private-range
    and loopback targets before any outbound HTTP request (node probe,
    xray download, outbound test, external traffic inform, tgbot API
    server, panel updater). Forwarded headers (X-Real-IP, X-Forwarded-For,
    X-Forwarded-Host) are now only trusted when the direct connection
    arrives from a CIDR in TrustedProxyCIDRs. CSP policy is tightened with
    a per-request nonce. HTTP server gains read/write/idle timeouts. Panel
    updater downloads the script to a temp file instead of piping curl into
    shell. Xray archive download adds a size cap and response-code check.
    backuptotgbot is changed from GET to POST.
    
    * feat(nodes): add allow-private-address toggle per node
    
    Adds AllowPrivateAddress to the Node model (DB default false). When
    enabled it bypasses the SSRF private-range check for that node's probe
    URL, allowing nodes hosted on RFC-1918 or loopback addresses (e.g.
    a private VPN or LAN setup).
    
    * chore: frontend UX improvements, CI pipeline, and dev tooling
    
    - AppSidebar: logout via POST /logout instead of navigating to GET
    - InboundList: persist filter state (search, protocol, node) to
      localStorage across page reloads; add protocol and node filter dropdowns
    - IndexPage: add health status strip (Xray, CPU, Memory, Update) with
      quick-action buttons
    - dependabot: weekly go mod and npm update schedule
    - ci.yml: add GitHub Actions workflow for build and vet
    - .nvmrc: pin Node 22 for local development
    - frontend: bump package.json and package-lock.json
    - SubPage, DnsPresetsModal, api-docs: minor fixes
    
    * fix(ci): stub web/dist before go list to satisfy go:embed at compile time
    
    * chore(ui): remove health-strip bar from dashboard top
    
    * Revert "feat(auth): block panel with default admin/admin credentials and guide credential change"
    
    This reverts commit 56ce6073ce09f08147f989858e0e88b3a4359546.
    
    * fix(auth): make logout POST+CSRF and propagate session loss to other tabs
    
    - Switch /logout from GET to POST with CSRFMiddleware so it matches the
      SPA's existing HttpUtil.post('/logout') call (previously 404'd silently)
      and blocks GET-based logout via image tags or link prefetchers. Handler
      now returns JSON; the SPA already navigates client-side.
    - Return 401 (instead of 404) from /panel/api/* when the caller is a
      browser XHR (X-Requested-With: XMLHttpRequest) so the axios interceptor
      redirects to the login page on logout-in-another-tab, cookie expiry,
      and server restart. Anonymous callers still get 404 to keep endpoints
      hidden from casual scanners.
    - One-shot the 401 redirect in axios-init.js and hang the rejected
      promise so queued polls don't stack reloads or surface error toasts
      while the browser is navigating away.
    - Add the CSP nonce to the runtime-injected <script> in dist.go so the
      panel loads under the existing script-src 'nonce-...' policy.
    - Update api-docs endpoints.js: GET /logout doc entry was missing.
    
    * fix(settings): POST /logout after credential change
    
    * fix(auth): invalidate other sessions when credentials change
    
    When the admin changes username/password from one machine, sessions
    on every other machine kept working until they manually logged out
    because session storage is a signed client-side cookie — there is
    no server-side session list to revoke.
    
    Add a per-user LoginEpoch counter stamped into the session at login
    and re-verified on every authenticated request. UpdateUser and
    UpdateFirstUser bump the epoch (UpdateUser via gorm.Expr so a single
    update statement is atomic), so any cookie issued before the change
    no longer matches the user's current epoch and GetLoginUser returns
    nil — the SPA's 401 interceptor then redirects to the login page.
    
    Backward compatible: the column defaults to 0 and missing cookie
    values are treated as 0, so sessions issued before this change
    remain valid until the first credential update.
    
    ---------
    
    Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
  • fix(api-docs): resolve no-useless-escape lint errors
    - endpoints.js: replace `\"` with `\\"` in xray response example so the
      rendered docs actually show escaped JSON-in-JSON (the original
      single-quoted `\"` collapsed to a bare `"` and produced malformed output).
    - CodeBlock.vue: drop the unnecessary `\[` inside the regex character
      class `[{}\[\]]`; `[` does not need escaping inside `[...]`.
  • feat(api-docs): enhance in-panel API documentation (#4312)
    * feat(api-docs): enhance API documentation with missing endpoints, search, collapse, and route sync test
    
    - Add 29 undocumented routes across 4 new sections (Settings, Xray Settings,
      Subscription Server, WebSocket) plus 4 missing Server API endpoints
    - Fix inaccuracies: history metric keys, node metric keys, VLESS enc description
    - Add response schemas to 15+ key endpoints
    - Add search bar and expand/collapse all controls to the docs page
    - Add collapsible endpoint sections with endpoint count
    - Add Go test (TestAPIRoutesDocumented) to verify all Go routes are documented
    
    * feat(api-docs): add JSON syntax highlighting and top-right copy button to code blocks
    
    * fix(api-docs): use distinct colors for JSON syntax highlighting (green strings, amber numbers)
    
    * feat(api-docs): add request body examples, error responses, WebSocket message types, and subscription response headers
    
    * fix(api-docs): use ClipboardManager.copyText instead of copy to fix API token copy button
  • fix: delete button missing after searching for a user (#4315)
    When searching for a user, the projected DBInbound only contains the
    matching clients, so isRemovable evaluated to alse (since a single
    match made clients.value.length === 1), hiding the Delete button.
    
    Pass the original total client count from the parent's clientCount
    prop and use it in the isRemovable check instead of the projected
    clients array length.
  • fix(hysteria2): restore missing masquerade config in inbound form (#4316)
    * fix(hysteria2): restore missing masquerade config in inbound form
    
    Fixes #4303
    
    The Hysteria2 Masquerade option was missing from the Stream settings
    tab after the v3.0.0 form rewrite. Added the UI form and ensured the
    masquerade block is passed through in subscription JSON generation.
  • fix: preserve space between date and time in log modal (#4326)
    Vue 3's whitespace: condense strips bare whitespace text nodes and
    trailing whitespace inside elements, causing the &lt;template&gt; trick
    to fail. Use mustache interpolations (which compile to _createTextVNode)
    for all spacing between fields so they survive compilation.
  • feat(inbounds): restore copy-clients-between-inbounds modal
    The menu item, backend endpoint (POST /panel/api/inbounds/:id/copyClients),
    and i18n keys were already in place after the Vue3 migration, but the modal
    itself was never ported — clicking the menu just toasted "coming soon".
    
    Adds CopyClientsModal.vue: source inbound dropdown (multi-user inbounds
    except the target), per-client checkbox selection via a-table row-selection,
    optional Flow override when the target supports TLS flow, and result toasts
    for added/skipped/errors.
  • Feat: clarify VLESS encryption auth selection (#4271)
    * feat(traffic_writer): enhance traffic writer with concurrency safety and state management
    
    * Revert "feat(traffic_writer): enhance traffic writer with concurrency safety and state management"
    
    This reverts commit e6760ae39629a592dec293197768f27ff0f5a578.
    
    * feat(vless): clarify VLESS encryption auth selection and enhance parsing logic
  • feat(panel): xray metrics dashboard with observatory probe history
    Polls xray's /debug/vars on the 2s status tick, stores memstats and per-outbound observatory delay in the metric history ring buffer, and exposes them through a new XrayMetricsModal opened from the Charts card. Restructures the dashboard to consolidate uptime, usage, version, and Telegram link into stat-style or action-style cards consistent with the existing AntD aesthetic.
  • feat(inbounds): add sub/client link endpoints; hide panel version on login
    - New GET /panel/api/inbounds/getSubLinks/:subId and /getClientLinks/:id/:email
      return the same protocol URLs the panel UI's Copy button emits, honouring
      X-Forwarded-Host / X-Forwarded-Proto. Documented in the API docs page.
    - Refactor: sub package no longer imports web. The embedded dist FS is
      injected via sub.SetDistFS, and the link generator is registered with the
      service layer via service.RegisterSubLinkProvider, avoiding the circular
      import the new endpoints would otherwise introduce.
    - Security: stop emitting window.X_UI_CUR_VER on login.html and drop the
      visible version chip from the login page, so the panel version is no
      longer pre-auth info disclosure. Authenticated pages still receive it.
    - Bump config/version.
  • feat(panel): in-panel API documentation page
    New /panel/api-docs route with a one-page reference covering every
    /panel/api/* endpoint (Auth, Inbounds, Server, Nodes, Custom Geo,
    Backup) plus a Bearer-token primer that reads the current token and
    exposes Show/Copy/Regenerate inline. Sidebar gets an API Docs entry
    right after Xray; the menu label is shared via menu.apiDocs across all
    13 locales.
  • fix(theme): default to dark, polish theme cycle visibility and hover
    New installs land on plain dark instead of ultra-dark. The cycle button
    icon now has an explicit colour so it stays visible inside the mobile
    drawer (the previous color:inherit didn't cascade through the teleported
    node), and hover/focus matches the menu's blue across sidebar, login,
    and sub pages.
  • feat(sidebar): pin Logout above trigger, inline 3-state theme cycle
    The desktop sider stretched to match the page height, so below lg
    (992px) where dashboard cards stack into one column the collapse
    trigger plus Logout slid off-screen. Pin the sider with
    `position: sticky; height: 100vh; align-self: flex-start` so the chrome
    stays viewport-tall. Split the menu into `.sider-nav` (flex: 1,
    scrollable) and `.sider-utility` so Logout sits directly above the
    48px trigger reserved by padding-bottom.
    
    Replace the `<ThemeSwitch>` a-sub-menu with a single inline icon
    button next to the '3X-UI' brand (sun / moon / moon+star SVG). One
    click cycles Light -> Dark -> Ultra Dark -> Light. ThemeSwitch.vue
    removed since it is now inlined.
    
    Override AD-Vue dark Menu selected + hover/active state on the
    sider-nav, sider-utility, and drawer menus to use the same light-blue
    tint AD-Vue's light theme uses (rgba(64,150,255,0.2) / #4096ff). The
    default dark variant was too subtle against #252526, so the current
    page and Logout-on-hover barely distinguished themselves.
  • fix(inbounds): bulk-delete keeps last client to satisfy backend constraint
    DelClient rejects the removal that would leave an inbound with zero
    clients (the constraint exists because Xray protocols need at least
    one client to keep the inbound functional). The bulk-delete flow
    fired one DelClient call per picked client in a loop, so picking
    every client meant the final iteration always errored out with
    "no client remained in Inbound" and surfaced as a red toast even
    though N-1 deletions had already gone through.
    
    Now confirmBulkDelete detects the "all selected" case up front,
    drops the last client from the request, and surfaces the partial
    operation in the confirm dialog ("N-1 / N — last selected will
    remain. Delete the inbound to remove all."). The pre-existing
    single-row delete path and partial-selection bulk delete paths are
    untouched. If the only client in the inbound is selected, a
    Modal.warning explains the constraint instead of asking for confirm.
  • feat(xray/nord): searchable server list + colored load tag, surface API errors
    Frontend (NordModal.vue):
    - Server selector gets show-search with the option label set to
      `${cityName} ${name} ${hostname}` so admins can find a specific
      server inside a 100+ entry country list by typing.
    - Each option renders the load as a colored a-tag (green <30%,
      orange 30-70%, red >70%) instead of plain text — quicker visual
      scan when sorting through servers in the dropdown.
    
    Backend (nord.go):
    - GetCountries / GetServers now check resp.StatusCode and return
      "NordVPN API error: <status>" on non-200, matching the pattern
      GetCredentials already used. Previously a 4xx/5xx body was
      returned as a "success" string and the frontend silently failed
      to parse it, surfacing only as an empty "No servers found".
    - GetCredentials drops its own ad-hoc 10s http.Client and reuses
      the shared nordHTTPClient (15s) — one client, one timeout.
  • fix(inbounds): paginate expanded client list, restore ID column, hide empty Remark
    - ClientRowTable now applies the General-Settings pageSize to its
      expanded client list. The 3.0 rewrite dropped pagination, so users
      with thousands of clients per inbound hit a 30-60s browser hang on
      expand (#4233).
    - ID column was marked responsive: ['xs'] so it was hidden on desktop;
      removed the restriction so it shows as the first column everywhere.
    - Remark column is now omitted entirely when no inbound has a non-empty
      remark, matching the existing Node-column pattern.
  • add loopback and dns servers tag to inbound lists in RuleFormModal (#4244)
    * add loopback and dns servers tag to inbound lists in RuleFormModal
    
    * fix: remove clientIp from dns section when its empty
  • feat(xray/outbounds): TCP probe mode + Test All + timing breakdown
    - service.TestOutbound now dispatches on `mode`:
      - "tcp": parallel net.DialTimeout to every server/peer endpoint
        (vmess/vless/trojan/ss/socks/http/wireguard). No xray spin-up,
        no semaphore — safe to run concurrently across outbounds.
      - "http" (default): existing temp-xray + SOCKS path, now with an
        httptrace.ClientTrace breakdown (DNS / Connect / TLS / TTFB)
        alongside the total delay and status code.
    - testSemaphore renamed to httpTestSemaphore — only HTTP probes
      serialise, TCP runs free.
    - TestOutboundResult carries the per-mode extras: timing fields for
      HTTP, per-endpoint dial list for TCP, plus a `mode` echo.
    - Controller reads `mode` from the form and passes it through.
    - useXraySetting: testOutbound accepts mode (default "tcp"); new
      testAllOutbounds(mode) runs a worker pool (concurrency 8 for TCP,
      1 for HTTP) and skips blackhole / loopback / blocked outbounds —
      also skips freedom / dns under TCP since they have no endpoint.
    - OutboundsTab: TCP/HTTP radio toggle and a Test All button land in
      the toolbar; the per-row ⚡ now uses the selected mode. Results
      surface in a popover with the full timing breakdown plus the
      endpoint list for TCP probes. Latency header replaces the duplicate
      "check" column title.
    
    Practical effect: testing ten outbounds in TCP mode drops from ~50–100s
    (serial HTTP) to ~1–2s (parallel dial × 8). HTTP mode stays as the
    authoritative probe and now shows where the latency actually lives.
  • feat(inbounds): bulk-select clients + UX polish
    - ClientBulkModal: add `comment` and VLESS `reverseTag` fields so the
      bulk-add modal can set them on every generated client (matching the
      single-client form)
    - ClientRowTable: add multi-select checkboxes (desktop + mobile) with a
      tri-state select-all and a sticky bulk-action bar; emits a new
      `delete-clients` event so the parent can wipe the picked clients in
      one go. Hidden entirely when the inbound has only one client (the
      last one must stay)
    - ClientRowTable: new "Remained" column shows live remaining quota
      per client (∞ for unlimited, red when depleted)
    - InboundInfoModal: Remained cell now shows the ∞ tag when the client
      has no totalGB limit, matching how Total Usage already renders it
    - InboundsPage: add Online tag (+ per-bucket popovers listing client
      emails) to the summary card so it mirrors the per-inbound row, and
      wire an `onDeleteClients` handler that loops the existing single-
      delete endpoint then refreshes once
    - InboundList: forward the `delete-clients` event; hide empty remarks
      on both the desktop table (custom #bodyCell) and the mobile card
    - useInbounds: aggregate an `online` email list across all inbounds
      so the summary popover has data to render
  • feat(frontend): swap QRious for ant-design-vue's a-qrcode
    - Migrate SubPage, QrPanel and TwoFactorModal from a QRious canvas to
      <a-qrcode type="svg">, which renders the QR matrix as crispEdges
      SVG rectangles — pixel-perfect at any display size or DPR, no more
      white scan-line artifacts from non-integer canvas scaling
    - Drop the now-unused qrious dependency and its manualChunks entry
    - Default the panel to ultra-dark on first load (existing user
      preferences in localStorage are preserved)
    - Let the sub controller read subpage.html from web/dist/ first and
      fall back to the embedded copy, so Vite rebuilds in dev no longer
      require a Go recompile to refresh the asset hashes
  • feat(frontend): refresh dark theme + redesign login page
    - Swap navy dark palette for VS Code Dark+ neutrals (#1e1e1e/#252526/
      #2d2d30) across theme tokens, page backgrounds and DateTimePicker
    - Add brand header to the mobile drawer and desktop sider, and recolor
      the drawer body so it reads as one panel with the menu
    - Redesign login page with a centered card, cycling Hello/Welcome
      headline and per-theme animated gradient-blob backgrounds
  • feat(xray/balancer): restore observatory editor + auto-sync selectors
    The Vue3 migration dropped the Observatory / Burst Observatory section
    that used to sit under the balancer table. Without it, leastPing /
    leastLoad strategies had nowhere to populate Xray's required
    subjectSelector, so balancers that depended on probe data silently
    ran with an empty observer config.
    
    - Auto-seed and sync `observatory` for leastPing balancers and
      `burstObservatory` for leastLoad balancers (subjectSelector
      recomputed from every matching balancer's selector list). Drops
      the observatory when no matching strategy remains.
    - Defaults (probeURL, interval, connectivity, sampling) match the
      values the legacy panel shipped, themselves taken from the Xray
      docs at xtls.github.io/config/{observatory,burstobservatory}.html.
    - Surface both observatories under the table as a radio-switched
      JSON textarea so admins can tune probe settings inline without
      dropping into the full xray template tab.
  • refactor(panel): rename injected globals + collapse QR modal entries
    Rename the SPA globals injected by Go to drop the ad-hoc dunder shape
    and free up the bare `webBasePath` name (still the DB setting key)
    from colliding with the JS global it used to share:
      window.__X_UI_BASE_PATH__ -> window.X_UI_BASE_PATH
      window.__X_UI_CUR_VER__   -> window.X_UI_CUR_VER
    
    Also rework the QR-Code modal to fold every QR (subscription + JSON
    sub URL, share links, WireGuard config/peer links) into a single
    a-collapse with one panel per QR. Subscription panels are listed
    first and open by default; everything else stays collapsed so a
    multi-link inbound no longer scrolls forever.
  • fix(outbound): default VLESS encryption to "none"
    A blank encryption field caused Xray to reject the outbound config with
    'VLESS users: please add/set "encryption":"none"'. Default the
    constructor parameter, coerce empty values, and final-guard toJson so
    every code path emits a valid encryption value.
  • fix: backup path with webbasepath (#4223)
    * Update BackupModal.vue
    
    add base path to importDB API call
    
    * fix
    
    add base path to importDB API call
  • feat(xray/dns): align DNS settings with Xray docs + UI polish
    - DNS server modal: rename expectIPs -> expectedIPs (per docs); add
      per-server tag, clientIP, serveStale, serveExpiredTTL, timeoutMs;
      flip skipFallback default to false; hydration still accepts legacy
      expectIPs for back-compat.
    - DNS tab: add hosts editor (domain -> IP/array), serveStale +
      serveExpiredTTL controls, "Use Preset" button bringing back the
      legacy preset gallery (Google / Cloudflare / AdGuard + Family
      variants — fixed AdGuard Family IPs that were wrong in legacy),
      and a "Delete All" button to wipe the server list at once.
    - i18n: add 15 new dns.* keys across all 13 locales.
    - Frontend-wide formatter pass on Vue components (whitespace and
      attribute layout only, no behavior changes).
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>