Commit graph

2329 commits

Author SHA1 Message Date
root
fc77154c8b feat: add i18n translations for node management 2026-04-24 17:10:42 +08:00
root
cb4b1eba85 feat: register NodeController routes and nodes page
- Add nodeController field and route group in api.go
- Add /panel/nodes page route in xui.go
- Verified node.go does not add duplicate checkAdmin middleware
2026-04-24 17:08:52 +08:00
root
16eb179eaf feat: add NodeController with list, getConfig, and updateConfig endpoints
Expose node management API endpoints for the cluster feature:
- GET /node/list — returns connected nodes with online status
- GET /node/config — returns current node + DB configuration
- POST /node/config — validates and persists node settings to x-ui.json
2026-04-24 17:06:11 +08:00
root
85c6b661ac feat: add GetNodeStates query for node management 2026-04-24 17:02:47 +08:00
root
67435b892b chore: bump version to v1.5.4.1-beta 2026-04-24 16:16:00 +08:00
root
f5862abc2e feat: add CodeMirror YAML editor for Clash template and fix settings save button bug
- Replace plain textarea with CodeMirror editor (YAML syntax highlighting, line numbers, auto-indent) for Clash subscription template
- Fix confAlerts crash when subClashURI/subURI/subJsonURI is null/undefined (prevented save button from enabling)
- Add yaml.js CodeMirror mode asset
- Include docs and .gitignore cleanup
2026-04-24 16:15:22 +08:00
root
582037ae70 fix: settings save button and multiple UI bugs
- Fix duplicate :min attributes on a-input-number (webPort, subPort, tgCpu)
- Fix mismatched closing tags (a-input/a-switch instead of a-input-number)
- Fix twoFactorEnable toggle receiving MouseEvent instead of boolean
- Fix noise input handlers referencing undefined global `event`
- Add error handling to settings change detection polling loop
- Bump version to v1.5.4-beta
2026-04-24 15:44:48 +08:00
root
5ec81ea3d0 fix: add error handling for Xray, geo, and toolchain downloads in CI 2026-04-24 15:09:24 +08:00
root
314c4e75d7 fix: use absolute path for toolchain find on cache miss 2026-04-24 15:05:23 +08:00
root
aadd8fdd89 style: apply gofmt formatting 2026-04-24 14:43:44 +08:00
root
96a1bc9f1f fix: resolve doubled toolchain path in CI build
The find command on cache hit returns an absolute path
(e.g., /tmp/toolchain/x86-64--musl--stable-2025.08-1),
but the PATH/CC lines were prepending /tmp/toolchain/ again,
causing /tmp/toolchain//tmp/toolchain/... to fail.
2026-04-24 14:40:58 +08:00
root
288635adfc fix: Clash YAML injection, path validation, and default template
- Quote all YAML string values with %q to prevent injection
- Remove unused host parameter from GetClash
- Add backend path normalization for SubClashPath
- Log StreamSettings JSON unmarshal errors
- Expand template panel by default and provide default template
2026-04-24 14:35:28 +08:00
root
11cdb07e89 feat: add Clash YAML subscription endpoint with template injection
Add /clash/:subid endpoint that returns complete Clash YAML config.
User provides full template (DNS, routing, proxy-groups, rules) in
settings, panel generates proxies from inbound/client data and injects
via proxies: [] placeholder replacement.

- New SubClashService reads template, generates vmess/vless/trojan/ss
  proxy entries with transport (ws/grpc/h2/tcp/httpupgrade), TLS, and
  Reality support
- Settings: subClashEnable, subClashPath, subClashURI, subClashTemplate
- UI: Clash settings tab, QR code on subpage, Desktop dropdown with
  clash-verge:// deep link preferring Clash URL
- Version bump to v1.5.2-beta
2026-04-24 11:25:10 +08:00
root
1a02ebb024 fix: MariaDB JSON_EACH compatibility for subscription and traffic queries
Replace SQLite-only JSON_EACH with DB-type branching (JSON_TABLE for
MariaDB) in subscription, client traffic, and migration queries.
Bump version to v1.5.1.
2026-04-24 10:16:48 +08:00
root
eca9b219cf docs: add missing task tracking records for multi-node and traffic fixes
Add task tracking records for commits that were missing documentation:
- 2026-04-10: multi-node backend foundation (7 commits)
- 2026-04-15: improve mariadb flow and traffic flush
- 2026-04-23: install cron before acme.sh
- 2026-04-24: resolve client traffic InboundId from DB
- 2026-04-24: fix traffic flush blocked by stale inboundId=0 delta
2026-04-24 03:04:15 +08:00
root
51f17922fa fix: resolve shared-mode traffic flush blocked by stale inboundId=0 delta
The traffic-pending.json file could contain a stale client traffic delta
with inboundId=0 (created before the InboundId resolution fix). When
flushToDatabase tried to INSERT this into client_traffics, it violated
the foreign key constraint fk_inbounds_client_stats, causing the entire
transaction to roll back and blocking ALL traffic from being written to
MariaDB.

- Skip deltas with InboundID==0 in flushToDatabase with a warning log
- Share a single TrafficPendingStore between XrayTrafficJob and the
  flush loop to eliminate a race condition from dual file instances
- Add test for zero InboundID skip behavior
2026-04-24 02:56:23 +08:00
root
157fb93f24 chore: bump version to v1.4.5-beta 2026-04-24 02:31:00 +08:00
root
99e2e6c2e2 fix: resolve client traffic InboundId from DB in shared mode, set online clients
In shared mode the Xray API returns InboundId=0 for client traffic.
Collect() now looks up the real InboundId from the client_traffics table
by email, and skips unknown emails with a warning. Also computes and
sets online clients in XrayTrafficJob since addClientTraffic is bypassed.
2026-04-24 02:29:02 +08:00
root
6784f3e738 fix: install cron before acme.sh for all distros
Add cronie (rhel/fedora/centos/arch/opensuse) and dcron (alpine) to
install_base, and ensure crond is enabled+started before acme.sh runs.
2026-04-23 17:23:44 +08:00
root
f8c572e112 fix: detect stale mariadb service file when server package is missing
has_local_mariadb_service() only checked if the systemd unit file existed,
but not whether the mariadb-server package was actually installed. When the
package was removed but the service file remained, the script would skip
server installation and fail on restart. Now verifies the server package
is installed via dpkg/rpm in addition to the unit file check.
2026-04-23 15:20:34 +08:00
root
27c2430d4f fix: show actual systemctl error when MariaDB restart fails
restart_mariadb_service() and start_mariadb_service() suppressed stderr
with 2>/dev/null, hiding the real failure reason. Now captures and displays
the systemctl error output and service status on failure for diagnostics.
2026-04-23 15:05:05 +08:00
Sora39831
df20cc7e0b feat: add local mariadb port and remote ip access controls 2026-04-22 11:20:55 +08:00
Sora39831
cc66b073a4 fix: add remote mariadb config menu, pending verification 2026-04-22 10:33:24 +08:00
Sora39831
326abb3a44 fix: avoid admin credential prompt on fresh mariadb install 2026-04-22 10:10:04 +08:00
Sora39831
fa73367e7e fix: avoid migrate blocking and allow uninstall of partial installs 2026-04-22 09:52:10 +08:00
Sora39831
afa0d5a5bd fix: accept direct panel port input in install flow 2026-04-22 09:45:56 +08:00
Sora39831
e23e69bc48 Refine MariaDB setup and uninstall behavior 2026-04-15 17:48:18 +08:00
Sora39831
e50b2f471d feat: improve mariadb flow, db settings init, and traffic flush 2026-04-15 16:58:49 +08:00
Sora39831
85cd0b60f2 docs: add multi-node shared control guidance 2026-04-10 15:33:04 +08:00
Sora39831
6b58044e00 feat: add node management shell and installer flows 2026-04-10 15:31:35 +08:00
Sora39831
87282dde33 feat: add durable traffic deltas and shared flush loop 2026-04-10 15:25:16 +08:00
Sora39831
3cfa554786 feat: add cache-backed worker sync and heartbeat loops 2026-04-10 15:15:42 +08:00
Sora39831
34b9f01d0a feat: guard shared writes and bump version transactionally 2026-04-10 11:22:49 +08:00
Sora39831
fd0af148cb feat: add shared metadata models and helpers 2026-04-10 11:16:16 +08:00
Sora39831
36826706ec feat: add node config and startup validation 2026-04-10 11:13:52 +08:00
Sora39831
735e1d8ef0 chore: ignore local worktrees 2026-04-10 11:07:21 +08:00
Sora39831
46bf1b1404 docs: add multi-node shared control design spec 2026-04-10 10:33:53 +08:00
Sora39831
135ef32477 Add panel domain persistence 2026-04-09 21:39:39 +08:00
Sora39
87566d22ef
Merge pull request #9 from Sora39831/fix/v1.3.0-beta
Fix frontend bugs, state leaks, and enhance asset generation
2026-04-08 15:48:34 +08:00
Sora39831
8e9e36e1b8 Fix turnstile tab re-render and bump version 2026-04-08 15:34:50 +08:00
Sora39831
8a43a516ac Fix turnstile reload after auth tab switch 2026-04-08 15:18:00 +08:00
Sora39831
ae08f4a50f fix: separate register turnstile layout 2026-04-07 17:32:57 +08:00
Sora39831
b921ed740c chore: add generated fingerprinted assets 2026-04-07 17:17:41 +08:00
Sora39831
5ad2203f24 build: generate fingerprinted assets before compile 2026-04-07 16:43:18 +08:00
Sora39831
cfb169d2fb refactor: resolve template assets through manifest helper 2026-04-07 16:41:55 +08:00
Sora39831
e6752e04db feat: load fingerprinted asset manifest 2026-04-07 12:24:33 +08:00
Sora39831
faeb8dd244 feat: add asset generation command 2026-04-07 12:08:10 +08:00
Sora39831
05ece0bd8e feat: add fingerprinted asset generator 2026-04-07 11:59:25 +08:00
Sora39831
019603d55f docs: add cloudflare asset optimization design 2026-04-07 11:32:30 +08:00
Sora39831
cc6d3daa3a fix: harden migration and setting writes 2026-04-07 02:12:02 +08:00