You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interactive In-Panel REST API Documentation (/panel/docs):
Built a dedicated, interactive REST API Documentation dashboard (docs.html) directly inside the TX-UI web panel.
Added primary navigation entry in common_sider.html with an API icon and full localization across all 13 supported languages.
Features real-time endpoint search, category filtering (Auth, Clients, Inbounds, Server, Settings, Xray), HTTP method badges, parameter tables, request body schemas, and response previews.
Included interactive cURL generator tailored to current host/port/basePath, one-click copy buttons with instant toast feedback, and multi-language integration code examples (Python, Bash, Node.js).
Added /panel/docs and /panel/api-docs route mappings in XUIController (xui.go).
Synchronized all 6 project READMEs (README.md, README.fa_IR.md, README.zh_CN.md, README.ru_RU.md, README.es_ES.md, README.ar_EG.md) with the latest v0.9.3 feature set.
Updated API reference tables across all READMEs with Node Client connected device management, Xray core rollback controls, SQLite database optimization/cleanup endpoints, and advanced Xray configuration routes.
Updated API.md with in-panel documentation links and dedicated protocol credential documentation (password, ssPassword, masquePass, auth).
Automatic & Manual Config State Rollback on Core Error:
Pre-flight Configuration Verification: Added TestConfigFile via xray -test -c <path> to validate configuration files before overwriting active config.json, preventing malformed JSON or incompatible options from reaching production.
Immediate Core Exit Detection: Implemented startup monitoring window in xray/process.go to catch instant runtime core exits (e.g., port binding conflicts or core initialization errors) and capture detailed diagnostic logs.
Automatic Fallback to Last Working State: On restart failures or core exit errors, RestartXray automatically reverts config.json to config.json.last_working and restores the database template (lastWorkingXrayTemplateConfig), immediately restarting Xray with the known-good configuration to prevent service disruption.
Crash Recovery in Background Job: Enhanced CheckXrayRunningJob to automatically recover and rollback to config.json.last_working if the core exits unexpectedly and restarting with the current config fails.
Failed Config Preservation: Automatically archives invalid configurations to config.json.failed upon test or startup errors for post-mortem troubleshooting.
Manual Rollback API & UI Controls:
Added backend endpoints: POST /panel/api/server/rollbackXrayConfig and POST /panel/xray/rollback.
Added status endpoints: GET /panel/api/server/getRollbackStatus and GET /panel/xray/getRollbackStatus.
Added rollback action tag and rolled-back warning badge to the Dashboard Xray status card (index.html).
Added "Rollback Config" action button and rollback notice alert to the Xray Settings page (xray.html).
Added localization strings across English (translate.en_US.toml) and Persian (translate.fa_IR.toml).
Xray-core Update to v26.10.21:
Updated Xray-core to latest release commit 1b1647cd9ddf (v26.10.21).
Synchronized go.mod, go.sum, and vendor dependencies.
Xray v26.10.21 Features:
Finalmask Source IP ACL Filter: Added filter mask type to TCP and UDP Finalmask streams with allowedSourceIPs and blockedSourceIPs tag-based multi-input controls in Web UI (stream_finalmask.html) and models (inbound.js, outbound.js).
Automatic Filter Mask Stripping: Implemented StripFilterMasks in xray/finalmask.go and integrated with subService.go, subJsonService.go, and inbound.js (getFinalMaskForShare) to ensure server-side access control lists are stripped from client share links and subscriptions.
XDRIVE Transport Enhancements: Migrated Google Drive service option to canonical google-drive while preserving backward compatibility with existing databases; added eagerWindowMs and holeTimeoutMs configuration fields in both inbound (stream_xdrive.html) and outbound (outbound.html) modals; enabled UDP mask configuration for XDRIVE.
Extended TLS Cipher Suites: Expanded TLS_CIPHER_OPTION across inbound.js and outbound.js to include RSA-AES-GCM/CBC, ECDHE-CBC-SHA256, and 3DES cipher suites supported by Xray-core.
Design Pattern Consistency & UI Optimization:
Standardized all newly added form components, tag selectors, and modal inputs with Ant Design Vue design tokens and theme-aware dropdown styling (:dropdown-class-name="themeSwitcher.currentTheme").
Added comprehensive localization for Finalmask filter and XDRIVE settings in translate.en_US.toml and translate.zh_CN.toml.
Single-User vs Multi-User 2022 Protocol Enforcement: Fixed Xray core crash (shadowsocks 2022 (multi-user): only blake3-aes-*-gcm methods are supported) by enforcing single-user mode for 2022-blake3-chacha20-poly1305 in CheckShadowsocks2022Keys and automatically stripping clients array in BuildInboundConfig.
Traditional Multi-User Shadowsocks Method Injection: Added automatic client method assignment for legacy ciphers (aes-128-gcm, aes-256-gcm, chacha20-ietf-poly1305, xchacha20-ietf-poly1305) in BuildInboundConfig, eliminating unsupported cipher method errors while stripping method for SS 2022 users as strictly required by core spec.
Graceful Single-User Hot-Add Promotion: Resolved proxy is not a UserManager error in hotAddUserToInbound and hotRemoveUserFromInbound; gracefully catches single-user proxy states and schedules seamless core reload into multi-user mode without alarming warning logs.
Accurate Subscription Link Credential Routing: Updated subService.go and subJsonService.go to prioritize client.SSPassword over generic Password for Shadowsocks inbounds, guaranteeing valid SIP002 and Shadowsocks 2022 links (method:serverKey:clientKey@host:port).
Clarified Inbound & Client UI Form Semantics: Labeled Shadowsocks 2022 inbound password field as Server PSK (Master Key) in form/protocol/shadowsocks.html to eliminate ambiguity with user client passwords, added warning alert on selecting 2022-blake3-chacha20-poly1305 single-user cipher, and improved placeholder text and password generation in clients.html.
Full Protocol-Separated Password Generation & Persistence (Trojan, Shadowsocks & MASQUE):
Added dedicated RandomUtil.randomMasquePassword() in utils.js alongside randomTrojanPassword() and randomShadowsocksPassword(method).
Fully decoupled credentials in Node Clients modal (clients.html): provided distinct form items with dedicated generator controls for Password (Trojan), Key (Shadowsocks), and Password (MASQUE), eliminating shared password fields.
Added ssPassword and masquePass fields to NodeClient and Client structs in model.go with automatic GORM database migration, ensuring each protocol preserves its dedicated credential.
Resolved password reversion bug across all protocols: updated NodeClientController.update to properly bind and persist ssPassword and masquePass, ensuring edited passwords are not reverted or overwritten.
Synchronized node_client.go (credsChanged, synthesiseClient, MergeIntoInboundConfig) and inbound.go (syncNodeClientOnUpdate, BuildInboundConfig) to route distinct credentials per protocol and protect against cross-protocol overwrite.
Added proactive Shadowsocks 2022 key auto-repair in BuildInboundConfig to prevent core startup failures (proxy/shadowsocks_2022: bad key) and unwanted config rollbacks.
Added safe fallback polyfills in common/js.html, clients.html, and form/client.html preventing cached asset runtime exceptions.
Complete Internationalization (i18n) Synchronization Across All 13 Languages:
Audited all TOML localization files against translate.en_US.toml, achieving 100% key coverage (0 missing keys across all languages).
Added natural, native translations for missing core rollback keys, Finalmask IP ACL filters, XDRIVE configuration, Node Client device management, bulk linking, and protocol credential tooltips across:
Separated client password generation across all views: introduced dedicated RandomUtil.randomTrojanPassword() (alphanumeric string) and RandomUtil.randomShadowsocksPassword(method) (strict 16/32-byte Base64 key).
Refactored form/client.html into distinct form items for Trojan, Shadowsocks, and MASQUE, eliminating mixed password generators.
Enhanced Node Clients management (clients.html): added distinct Trojan (Trojan ⟳) and Shadowsocks (SS 🔑) generator badges, dynamic placeholder hinting key format, intelligent default protocol detection in showAdd(), and automatic cipher-aware Base64 key generation in bulk creation (handleBulkModalOk).
Added backend safeguards in node_client.go (addClientToInboundSettings and hotAddUserToInbound) guaranteeing valid Shadowsocks 2022 Base64 keys when attaching or dynamically loading clients into Shadowsocks 2022 inbounds.
Updated fix_client_passwords.py script: separated Trojan and Shadowsocks generators, added automatic validation and repair of bad Shadowsocks 2022 keys (ErrBadKey fix), added MASQUE protocol support, and synchronized credentials with node_clients.
Corrected conditional visibility in form/protocol/shadowsocks.html so single-user legacy Shadowsocks correctly displays the password input field.
Cipher Suite Cleanup:
Removed duplicate and redundant Shadowsocks ciphers (chacha20-poly1305, xchacha20-poly1305) from SSMethods across inbound.js and outbound.js, standardizing on canonical chacha20-ietf-poly1305 and xchacha20-ietf-poly1305.
Xray API Dynamic User Alteration:
Fixed xray.AddUser for Shadowsocks 2022: corrected protobuf account payload from shadowsocks_2022.ServerConfig to shadowsocks_2022.Account{Key: password} and added fallback to method when cipher is not explicitly passed.
Backend Validation & Subscription Alignment:
Enforced client and single-user password presence checks in internal/web/service/inbound.go.
Enhanced genShadowsocksLink in subService.go and genServer in subJsonService.go to support single-user Shadowsocks link generation and correct multi-user SIP002/SIP022 formatting.
MASQUE Subscription Link & JSON Generation:
Included masque in database subscription queries in subService.go (getInboundsBySubId, getInboundsByEmail) and added fallback to users settings array, resolving HTTP 400 errors when fetching subscriptions for MASQUE users.
Implemented genMasqueLink in subService.go with full support for external proxies, TLS parameters (sni, alpn, fp, insecure, ech), and Finalmask export.
Implemented genMasque in subJsonService.go generating valid Xray client proxy outbounds with network: "masque", TLS settings, and MASQUE credentials (user, pass).
Added unit test coverage in sub_test.go (TestMasqueSubService_LinkAndExternalProxy, TestMasqueSubJsonService).