498 Commits
Author SHA1 Message Date
Zakk 9e0f73ee7b build(gui): bump vite from 4.5.14 to 6.4.3, with the define it rejects replaced
Dependabot's bump fails the build: vite.config.js defined the global apiRoot
as a template literal evaluated on every read (the backend address lives in
localStorage and the address dialog changes it), and Vite 5+ only accepts a
literal in define. The global is a getter on window now, installed by a plugin
imported first in main.js, returning the same expression on every read; the
call sites are untouched.
2026-09-18 21:33:27 +10:00
Markson Hon 4f8a83b0ff Merge pull request #1984 from Zakkaus/subscription-status
fix(subscription): show the usage once; tidy the header and the sidebar handle
2026-09-18 14:21:23 +08:00
Markson Hon 872d5621d0 Merge pull request #1985 from Zakkaus/log-modal-width
fix(gui): keep the log dialog's close button on the card at wide viewports
2026-09-18 14:21:06 +08:00
Zakk dc5f547cf2 fix(gui): lay out the status sidebar cards evenly
The card header put the server name, the subscription name and the group tag
on one flex row: a long tag such as "PROXY - 负载均衡 (2)" squeezed the name
into two lines while staying centred against them, and the subscription name
wrapped wherever the row broke. Bulma's small message also pads the header
and the body differently, so a gap opened under the title and the body text
sat a step further in.

The name takes the row, a tag that does not fit drops to its own line, the
subscription name always sits under both, and header and body share their
padding.
2026-09-18 16:09:07 +10:00
Zakk 1d4afae43e fix(gui): keep the log dialog's close button on the card at wide viewports
The card asked for 65rem. The root font is 0.9em up to 1400px and 16px above
it, so on any wider viewport — a 200% display scaling or a zoomed-out window
gets there — 65rem is 1040px while the wrapper Buefy sizes the dialog with is
capped at 960px: the card ran 80px past it and the close button, which sits on
the wrapper's corner, ended up in the middle of the header. 60rem is 960px at
the 16px root and never wider than the wrapper.
2026-09-18 16:06:18 +10:00
Zakk 0917ad4cfd fix(gui): tidy the subscription header and shrink the sidebar handle
"HOST(2) (info)" becomes "HOST (2) · info". The handle that brings the status
sidebar back was a 36px glyph in a shadowed box, the largest control on a
phone screen; it is a 32px target with a tooltip now.
2026-09-18 15:55:15 +10:00
Zakk b1fd2c1215 feat(gui): use the vector icon for the brand, the favicon and the installer
The navbar and the login dialog showed logo2.png, a raster wordmark that
blurred on 2x displays and needed a colour filter to survive the dark theme.
The brand is now the circular icon as SVG with the name as text, so it
renders sharp at every size and takes the navbar's colour in both themes; on
narrow phones the name goes first, then the icon.

The favicon is the SVG with a multi-size .ico fallback, and the PWA-era PNGs,
the tile icon and the Windows installer icon are rendered from the same file.
2026-09-18 15:44:06 +10:00
Markson Hon 7edc08901f Merge pull request #1975 from Zakkaus/log-viewer
fix(log): show the log in the web viewer without --log-file, keep the footer on screen
2026-09-18 13:40:48 +08:00
Zakk 15c727e1e1 fix(log): show the log in the web viewer without --log-file, keep the footer on screen
Without --log-file the viewer said "log printed to console, please see log in
console", which the Windows service, the launchd job and every "log to
console" setup cannot do. The logger now also keeps its last 4 MiB in memory
and the viewer reads that tail when there is no file; the lines carry the
same timestamp and level prefix as the file adapter's.

The log area also gave way to nothing: at 50vh a short window pushed the
filters and the export button below the fold with only a scrollbar to hint at
them. It now shrinks so the footer stays visible.
2026-09-18 15:29:18 +10:00
Zakk b3f2a4fbd3 fix(gui): ship only the icons the interface uses
lucide-static's stylesheet declares eot, woff2, woff, ttf and a legacy SVG
font for all 2112 icons, so Vite copied every format into web/ and the
embedded binary grew from about 26 MB to 48 MB; the SVG font alone is 20 MB of
glyph outlines. The interface uses 44 icons.

A Vite plugin (gui/build/lucide-subset.mjs) scans src/ for icon names — class
usage, icon props, dialog options and the Buefy pack's internalIcons — subsets
lucide.woff2 to those glyphs with subset-font and serves the result as a
virtual stylesheet with the 8 KB font inlined. A name the font does not have
fails the build naming it, where it used to render an empty box.
2026-09-18 15:28:20 +10:00
Markson GuGa Beyond 7603fd3eaa gui: bundle only the woff lucide icon font
lucide-static's font CSS references all five webfont formats (eot, ttf,
svg, woff, woff2), so Vite emitted ~23 MB of icon fonts into the web panel;
the SVG font alone was ~20.6 MB. All of them render the same glyphs.

scripts/lucide-font.mjs now regenerates src/assets/lucide-font.css from the
upstream CSS with a woff-only @font-face (woff is supported by every
browser since IE9) and runs automatically via the prebuild/preserve hooks,
so a lucide-static upgrade stays in sync. The build output drops from
~23 MB of font files to a single ~414 KB woff while keeping all icon
classes.
2026-09-18 13:15:50 +08:00
Zakk d82e7e3269 fix(gui): tell the user the GFWList is current instead of failing
The backend now reports an up-to-date list as a result, so the dialog shows an
info toast with the version rather than "could not update GFWList: … is up to
date".
2026-09-18 06:39:00 +10:00
Zakk f126526af0 fix(gui): put the log footer controls on one baseline
The selects, the switch and the export button each had their own height, so
the row read as three misaligned groups.
2026-09-18 06:26:22 +10:00
Zakk 99d0f1623f feat(gui): export the log from the dialog
Reading a long log in a modal is painful; a button now saves what the dialog
shows, filters included, as a timestamped text file.
2026-09-18 06:24:48 +10:00
Zakk 399cc053eb fix(gui): make the log readable on a phone and point feedback at discussions
A virtual scroller needs one fixed row height, so every log line was clipped at
the screen edge and a phone showed a column of timestamps with no messages. On
a narrow screen the tail is rendered plainly with the lines wrapped, and the
header says how many older lines are hidden.

The About text also still pointed at the issue tracker, which upstream has
closed in favour of discussions.
2026-09-18 06:18:07 +10:00
Zakk 37d9ce7dd0 feat(i18n): render the new ASSET_UNREACHABLE backend error
A download that never got a reply has no HTTP status, so it gets its own
message with the reason instead of "(HTTP )".
2026-09-18 06:14:55 +10:00
Zakk 6f09b73d73 refactor(gui): drop the dead 401 retry queue
Auth recovery reloads the page, so nothing ever filled the queue and nothing
called its retry function; the two modal imports it needed were unused too.
Also read the token with getItem instead of hasOwnProperty on localStorage.
2026-09-18 06:12:19 +10:00
Zakk 80b3b769db fix(gui): make the custom inbound form usable
The outbound select rendered blank because nothing was selected, which reads as
an empty list — the reason two discussions report that a custom inbound cannot
be added at all (v2rayA/v2rayA #1907, #1894, #1926). It now preselects the
first outbound group, the fields sit on a grid instead of wrapping into a row
with the Add button wedged against the select, and the optional username and
password of the inbound have their own fields, with a lock on the rows that
carry credentials.
2026-09-18 05:57:17 +10:00
Zakk d3798f0481 fix(gui): show the core version banner for this load, not the last one
node.vue read coreVersionValid from localStorage when it was created, and the
/version response of the current load only wrote localStorage afterwards. An
upgrade that made the core incompatible therefore showed nothing until the page
was reloaded, and a fixed one kept the warning for one more load. The parent
owns the value now and passes it down.
2026-09-18 05:34:10 +10:00
Zakk 60578fa7bb fix(gui): keep node fields intact on edit and hide the burger on desktop
- a shadowsocks userinfo arrives percent-escaped, and js-base64 decoded those
  escapes as data, so opening a node for editing rewrote its password;
- the simple-obfs path is exported as obfs-uri, which the dialog did not read,
  so saving an edited node dropped it;
- a plain trojan ws/h2 node lost its Host header, because the model never read
  the host parameter although the serializer writes it;
- the plugin options were decoded twice, which turned %2F into a separator and
  threw on a literal percent sign;
- the selection is remapped by what a row points at instead of its id, which a
  subscription update reassigns;
- the burger set its display for every width, so a desktop window showed it
  next to the full menu.
2026-09-18 05:22:40 +10:00
Zakk ba85f63f8a fix(gui): centre the tag text again and give the wordmark a phone size
Truncating the navbar tags with display: inline-block blockified them as
flex items, so their text dropped to the baseline instead of the middle of
the pill. Keep Bulma's inline-flex centring and truncate an inner span
(7px above and below the text at every width now). The wordmark stays
40px tall next to them, which crowded the row; 34px below 769px, 26px
below 381px, and below 331px the tags and the menu button take the row.
2026-09-18 04:26:40 +10:00
Zakk 0fab385de6 fix(gui): drop the close-button drop-shadow, keep the burger reachable at 320px
reset.scss put filter: drop-shadow(0 0 5px #000) on every non-hovered
.modal-close, which on the light theme drew a black halo around the glyph.
The brand row is a flex row whose items do not shrink, so below ~400px the
status and proxy-group tags pushed the burger past the right edge and the
menu could not be opened at all; let the tags shrink with an ellipsis and
give the burger a fixed basis. Verified at 320/360/412/480: no horizontal
overflow, the burger is in view and opens the menu.
2026-09-18 04:22:58 +10:00
Zakk 8df17a87d9 fix(gui): burger from the icon set, aligned phone toolbar, darker close glyph
The navbar burger was still Bulma's three spans, the only control not drawn
from the icon set; render it through Buefy's burger slot as the Lucide menu
glyph (x when open) with an aria-label and the expanded state. On phones the
toolbar wrapped into three ragged rows because Bulma's per-field margins
fought the flex layout: stack the two groups as full-width rows with one
0.5rem gap, actions first and create/import right-aligned under them. The
close glyph was 0.55 black on a light head; darken it.
2026-09-18 04:20:12 +10:00
Zakk 9fd4fec854 fix(gui): visible close glyph, one backdrop, a real dropdown in the collapsed menu
The dialog close button drew Bulma's two white bars, invisible on the light
card head; colour them from the text colour (19:1 light, 9.6:1 dark) and add
a hover surface. Four different backdrop values were in the tree, so a light
card sat on a near-black overlay that read as a shadow; keep one value in
App.vue and drop the per-component copies. The core-version notice becomes a
b-notification inside the content column instead of an edge-to-edge message.
In the collapsed navbar the language and account menus were clipped after
one row, because Bulma gives that menu overflow: auto with a max-height;
let it overflow and give the dropdown its own surface, border, shadow and
bounded scroll.
2026-09-18 04:16:50 +10:00
Zakk 1303eb4030 fix(gui): close button on the dialog, menus in the collapsed navbar, visible burger
Bulma positions .modal-close fixed to the viewport, so the close button of
every dialog sat in the corner of the screen instead of the dialog; make it
absolute inside Buefy's .animation-content, which now shrinks to its card.
With mobile-modal dropdowns off, the collapsed navbar's language and
account menus floated over the page; anchor them under their row, capped at
the viewport width with their own scroll. The phone burger was a 3.5rem box
whose bars kept the scaled root font; give it a 48px square and explicit
bars.
2026-09-18 04:10:46 +10:00
Zakk f51c97d1b7 fix(gui): phone dialogs, dropdowns and notices
Buefy turned every dropdown into a centred modal with a backdrop below
769px, so the account and language menus opened as dialogs; the close
button of a dialog is fixed to the viewport while Bulma floats the card
in the middle, so it sat far above the card it closes; repeated clicks on
a failing action stacked a screenful of identical toasts because every
call passed queue: false.

Keep dropdowns as menus on phones, give dialogs the full screen so the
close button lands on the card's top-right corner, and queue notices
(the per-call queue: false is gone). Inline Lucide glyphs are centred on
the text instead of sitting on the baseline, and the brand row keeps px
sizes under 768px, where the root font scales to 0.8em.
2026-09-18 04:05:38 +10:00
Zakk c199dee749 fix(gui): one welcome toast per session, no toast duplicate of the core-version banner
Every load and every remount showed the "service is running" toast, and a
core version mismatch showed twice: the persistent banner in node.vue and
a sticky red toast over it. Show the welcome once per browser session
(again when a new version is found) and leave the mismatch to the banner.
2026-09-18 03:59:41 +10:00
Zakk 4295642b46 feat(gui): draw every icon from Lucide
Icons came from a home-made icon font (32 glyphs) plus Material Design
Icons for Buefy's internals and a few controls. Both are replaced by the
Lucide webfont from lucide-static: it is registered as Buefy's default
pack (with internal icon mappings for check, alert, chevrons, eye, close,
loading), every inline <i> uses a Lucide class, the sidebar handle image
becomes an icon, and the iconfont directory, its two @imports, @mdi/font
and webpack-iconfont-plugin-nodejs are removed.
2026-09-18 03:57:08 +10:00
Zakk bd8ce2ee40 feat(gui): show backend errors in the user's language via errorCode
Backend PR #1959 adds errorCode and params to FAIL responses. A
backendMessage() helper picks $t("backend.<code>") when the code is known,
interpolating the params (HTML-escaped, since Buefy toasts render through
v-html) and the English message as {message}; unknown codes fall back to
the message as before. Every toast that showed res.data.message goes
through it, and the two places that matched backend text ("invalid
config", "the last request is being processed") check the code first
with the text as fallback for older backends. The backend section has
32 keys in all six locales.
2026-09-18 03:57:08 +10:00
Zakk f4a74027d7 fix(gui): align the proxy-group tag with the status tag
The group tag's inline-block wrapper added a line box that pushed the
tag a pixel or two below the status tag beside it; make the wrapper an
inline-flex row centred on the cross axis.
2026-09-18 03:44:01 +10:00
Zakk 68cdece946 fix(gui): readable logo on dark surfaces
logo2.png is a dark-blue wordmark on transparent (about 1.6:1 against
the dark navbar and login dialog). Invert and hue-rotate it under the
dark theme so it reads as a light blue; the light theme is untouched.
2026-09-18 03:42:47 +10:00
Zakk f342778bb2 fix(gui): real touch-size toolbar buttons on phones
reset.scss scales the root font to 0.8em below 768px, so the previous rem
sizes shrank again and the create/import/ping buttons ended up ~24px tall
with ~9px text. Size them in px (14px text, ~36px tall) under 768px.
2026-09-18 03:35:46 +10:00
Zakk b6a4cf4e5c fix(gui): phone top area — no stray tab glyph, larger toolbar buttons, toasts below the navbar
The "connected" marker on a tab was a b-icon hidden by CSS whose glyph is
styled at 32px; on some phones it rendered as a stray character between
the tabs. Mark the tab through header-class instead and colour the label.
Toolbar buttons shrank to 0.65rem under 450px (with the root font already
scaled down) because everything had to fit one row; the toolbar wraps now,
so use 0.85rem. Buefy's toast layer started at the viewport top and
covered the fixed navbar and, on phones, the toolbar buttons under it;
start it below the navbar.
2026-09-18 03:30:02 +10:00
Zakk 3dc7640522 fix(gui): compact the mobile node cards
Below 769px Buefy renders each row as a card. A long host name wrapped
over three lines and the checkbox took a line of its own, so one card was
about 350px tall and a phone screen showed one and a half nodes. Keep
the address on one line with the tail visible, and put the checkbox at
the right end of the ID line. A card is now about 200px.
2026-09-18 03:22:42 +10:00
Zakk d3f4395caa fix(gui): give the floating node toolbar an opaque themed surface
While stuck to the top the toolbar's background was rgba(0,0,0,.05/.1),
invisible on the dark theme, so the table rows scrolled through the bar
and showed between and behind the buttons (disabled buttons are half
transparent). Replace the inline colour with classes: a light surface
with a shadow in the light theme, the dark surface token in dark-theme.scss,
one shade darker while rows are selected.
2026-09-18 03:14:20 +10:00
Zakk ef5ea6cfc9 feat(gui): let the import dialog say whether it holds a server link or a subscription
Backend PR #1959 makes POST /api/import take "kind" so the server no
longer guesses from the URL scheme. The import dialog gets a "server link
/ subscription address" toggle whose value is sent as kind; the batch
dialog and the server edit form always send "server". An older backend
ignores the field and keeps guessing. Keys for the toggle are added to
all six locales and the combined prompt key is dropped.
2026-09-18 02:54:20 +10:00
Zakk 3a8a4bc5fd i18n(gui): bring ko.js to parity with en.js
Add every key en.js has and ko.js lacked (a hundred-plus keys for
the settings, TUN, custom inbound, proxy group, DNS and server form
sections), translate values that were still the English text, drop
keys en.js no longer has, and keep {placeholder} names and key order
identical to en.js. Korean throughout.
2026-09-18 02:51:06 +10:00
Zakk 6913e9af9b i18n(gui): bring pt-br.js to parity with en.js
Add every key en.js has and pt-br.js lacked (a hundred-plus keys for
the settings, TUN, custom inbound, proxy group, DNS and server form
sections), translate values that were still the English text, drop
keys en.js no longer has, and keep {placeholder} names and key order
identical to en.js. Brazilian Portuguese throughout.
2026-09-18 02:51:06 +10:00
Zakk c7a5b00353 i18n(gui): bring ru.js to parity with en.js
Add every key en.js has and ru.js lacked (a hundred-plus keys for
the settings, TUN, custom inbound, proxy group, DNS and server form
sections), translate values that were still the English text, drop
keys en.js no longer has, and keep {placeholder} names and key order
identical to en.js. Russian throughout.
2026-09-18 02:51:05 +10:00
Zakk 120e073f41 i18n(gui): bring fa-ir.js to parity with en.js
Add every key en.js has and fa-ir.js lacked (a hundred-plus keys for
the settings, TUN, custom inbound, proxy group, DNS and server form
sections), translate values that were still the English text, drop
keys en.js no longer has, and keep {placeholder} names and key order
identical to en.js. Persian throughout.
2026-09-18 02:51:05 +10:00
Zakk ec93e918f7 i18n(gui): localize hard-coded strings and make messages name the action
Around 120 user-visible strings bypassed vue-i18n (server form labels
and placeholders, table headers, tab titles, dialog labels, option texts,
a few toasts), so every locale showed them in English, and several
messages were vague: generic "SUCCESS"/"FAIL" toasts and raw backend
text with no context. Route the strings through $t() reusing the keys
that already existed under configureServer.*, add the missing keys to
en.js and zh.js, give the common actions (import, connect, update
subscription, save settings, add/delete proxy group, start/stop core)
their own success and failure texts with the backend detail in
{message}, and drop the keys nothing references any more. Other locales
follow in the next commits.
2026-09-18 02:51:05 +10:00
Zakk 9d087a4a02 fix(gui): keep JSON query parameters after the axios bump
axios 0.28+ serializes object params as touch[id]=… while the backend
unmarshals ctx.Query("touch") and ctx.Query("whiches") as JSON, so share,
latency tests and the server edit form failed with "bad request". Install
a params serializer that JSON-encodes object values as 0.21 did.
2026-09-18 02:38:01 +10:00
Zakk 4d40205fac build(gui): drop webpack-era files and dependencies, bump axios, make lint run
The GUI has been built with Vite since the vue-cli setup was replaced, but
vue.config.js, babel.config.js, public/index.html, registerServiceWorker.js
and eight dependencies from that setup were still in the tree; Vite never
read them and yarn lint failed on every file because babel.config.js
named the uninstalled @vue/cli-plugin-babel/preset. Remove them, let
@babel/eslint-parser run without a config file, and bump axios to the
0.30 line (security fixes; dependabot #1656). webpack-iconfont-plugin-nodejs
stays because the checked-in font preview still names it.

yarn lint now executes: 0 errors, 1186 warnings, all pre-existing.
2026-09-18 02:35:38 +10:00
Zakk 3b44741e9c fix(gui): proxy-group membership, selection, log polling and small display defects
toggleNodeInGroup built the replacement member list from the view filtered
to the selected outbound, so adding a node to another group sent a
one-element list and the backend wiped that group; build it from the full
connected list. checkedRows kept references to row objects that a /touch
refresh replaced; re-point the selection at the new rows. loadBalanceValid
was a computed reading localStorage with no reactive dependency; it is now
passed down from the version response. modalSharing duplicated node.vue's
ClipboardJS on the same selector, copying twice. The theme toggle set
theme-dark on <html> but no rule painted it, leaving a white canvas. The
status pill had a fixed width that "Waiting for network" overflowed. The
tab title showed "v2raya:80" for a relative backend address, and
backendPort.js overwrote a stored absolute address on every load;
modalPortWhiteList derived port 80 from a relative apiRoot. The log dialog
glued the first line of each poll onto a phantom empty row and re-requested
the same range when a poll was slow; disconnectNode swallowed errors and
savePickerChanges restarted the core a second time.
2026-09-18 02:17:47 +10:00
Zakk d1b944a662 fix(gui): round-trip trojan ws host/path, hysteria2 auth, and insecure flags
Plain trojan nodes with a WebSocket or HTTP/2 transport lost host and path
on save because generateURL emitted them only under the trojan-go branch.
The hysteria2 parser kept only the userinfo username although the backend
treats user:pass as the whole auth string. TUIC, AnyTLS and Juicity links
carry allow_insecure (and AnyTLS minIdleSession) that the models had no
field for, so editing an imported node dropped them; the form now shows
them. TUIC emits the camelCase pin parameters that ExportToURL uses.
2026-09-18 02:14:57 +10:00
Zakk a7f9b4d519 fix(gui): make WireGuard and vmess fingerprint round-trip with the backend
The WireGuard tab never produced a link the backend accepts: the model had
no protocol key, so generateURL returned null and Save was a silent no-op,
and both the parser and the generator used a layout (public key as
userinfo, privateKey/localAddress/persistentKeepalive parameters) that
kernel/serverObj/wireguard.go does not read. Use its layout: private key
as userinfo, publicKey/address/keepAlive/mtu/allowedIPs/preSharedKey as
parameters.

The vmess JSON carried the uTLS fingerprint as "fp" while the Go struct
tags it "fingerprint", so the value was dropped on save and lost when an
existing node was edited. Emit "fingerprint" and accept both on load. A
node name containing a literal "%" threw URIError in decodeURIComponent
and opened an empty form; keep the raw name when decoding fails.

The axios error interceptor's WebKit/localhost branch returned undefined,
resolving the failed request so callers dereferenced a missing response;
reject instead. handleGroupChanged dropped networkPaused when refreshing
the node table.
2026-09-18 01:51:48 +10:00
Zakk 77ab97f34d fix(gui): close the settings spinner on cancel and tolerate unknown select values in view mode
Saving a setting that restarts the core is cancelled by waitingConnected
once the core reports connected, which is the normal path; loading.close()
sat in .then only, so the full-page spinner stayed. The read-only server
view converted every select through its matching option and threw when a
subscription node carried a value the option list does not offer.
2026-09-18 01:42:03 +10:00
Zakk 945a8a8c97 fix(gui): guard runtime errors and follow the active locale in more places
- Latency test: a network error left the selected rows on "testing..."
  forever; reset them in .catch.
- Relative times only knew zh and en from localStorage; use the vue-i18n
  locale and load the dayjs locales for fa, ru, pt and ko.
- i18n: an unknown stored _lang silently fell back to English; ignore it
  and detect from the browser. Set <html lang> to the chosen locale.
- networkInspect polled err.response.status on plain network errors
  (TypeError every 3 s); the GFW list update spinner never closed on a
  rejected request; the routing dialog threw in render when a saved rule
  named a .dat file that no longer exists.
- axios: the "https frontend talking to http backend" branch fired for
  every error on HTTPS deployments because parseURL fabricates http:// for
  a relative apiRoot; require an absolute http:// backend URL, and do not
  dereference the parsed URL when err.config is absent.
- The status tag is focusable and announced as a button but only reacted
  to clicks; Enter and Space now activate it.
2026-09-18 01:41:28 +10:00
Zakk 33eb75b44e fix(gui): emit sni, not peer, in anytls links
The form wrote the SNI as peer=, but kernel/serverObj/anytls.go reads only
sni when building the outbound, so a node created or edited in the GUI
connected without SNI. The parser already accepts both names.
2026-09-18 01:21:24 +10:00
Zakk 937e0fd8d9 fix(gui): keep the node toolbar's button groups in flow
The create/import group was absolutely positioned inside the sticky
toolbar. With no rows selected the left group is display: none, the
toolbar collapsed to its padding, and the two buttons overlapped whatever
followed, most visibly the welcome card on an empty page. Lay both groups
out as one flex row; below the tablet breakpoint Buefy nests them in
.field-body > .field.is-grouped, so those are stretched as well.
2026-09-18 01:18:16 +10:00