Commit Graph

2278 Commits

Author SHA1 Message Date
0xJacky
9f1b9bbbba refactor(ws): implement SafeWebSocketWriter for serialized access
- Introduced SafeWebSocketWriter to ensure thread-safe writes to WebSocket connections.
- Updated WebSocket handling in certificate issuance, revocation, Nginx log tailing, and system upgrades to use the new writer.
- Enhanced WebSocket client management in the site navigation module for improved message handling and connection stability.
2026-04-04 02:01:20 +00:00
Simon Zöllner
b9e1951423 Fix #1619, WebSocket check fails during initial setup on custom ports (#1620)
* enhance(ws): improve session security

* Fix #1619, WebSocket check fails during initial setup on custom ports in docker

---------

Co-authored-by: 0xJacky <me@jackyu.cn>
2026-04-04 09:50:48 +08:00
0xJacky
d895c4a336 enhance(ws): improve session security 2026-04-04 09:48:18 +08:00
0xJacky
7d9887bfe8 fix: enhance WebSocket origin validation for trusted node requests 2026-04-03 11:31:41 +08:00
0xJacky
02931d6c31 feat: enhance TLS certificate handling and server configuration 2026-04-02 22:44:10 +08:00
renovate[bot]
f290060e55 chore(deps): update all non-major dependencies (#1612)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-02 11:04:57 +08:00
renovate[bot]
314efd0c25 chore(deps): update pnpm.catalog.default @antfu/eslint-config to v8 (#1617)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-02 11:00:27 +08:00
0xJacky
fb37c94276 feat: implement short token endpoint for WebSocket authentication
- Added `InitTokenRouter` to define the `/token/short` endpoint for issuing short tokens.
- Created `IssueShortToken` function to handle short token generation and response.
- Updated WebSocket middleware to require short token for authentication, preventing CSWSH attacks.
- Modified user store and login handling to integrate short token functionality.
- Enhanced documentation to reflect changes in WebSocket security requirements.
2026-04-02 00:06:04 +08:00
renovate[bot]
f89f8ff822 chore(deps): update pnpm.catalog.default unplugin-vue-components to v32 (#1605)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-28 11:13:41 +08:00
renovate[bot]
c9dfdd4197 chore(deps): update all non-major dependencies (#1603)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-23 01:16:38 +00:00
renovate[bot]
95120616df chore(deps): update all non-major dependencies (#1595)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-19 01:03:16 +00:00
0xJacky
926b3248b3 feat: enhance service initialization logic with mutex handling and return types 2026-03-16 13:59:45 +00:00
0xJacky
1a9cd29a30 style: center align WeChat community QR code in documentation v2.3.5 2026-03-16 05:33:37 +00:00
0xJacky
3a38914fe2 feat: add official WeChat community group information to documentation 2026-03-16 05:31:54 +00:00
0xJacky
58b183956a chore(deps): update risefront dependency from v1.3.2 to v1.3.3 2026-03-16 03:45:52 +00:00
0xJacky
95ab34bbe1 feat: implement migration to encrypt sensitive JSON fields in database models 2026-03-16 11:34:10 +08:00
0xJacky
9e41ecf9df feat: add support for root block configuration in NgxConfig and implement parsing logic 2026-03-16 03:15:27 +00:00
0xJacky
88a86edcd2 fix: preserve previous data when saving certificate updates 2026-03-16 00:56:58 +00:00
0xJacky
cb92cc4da8 feat: add ACMEUserID to certificate issuance and auto-certification requests 2026-03-16 00:52:12 +00:00
0xJacky
af6d3b9ae4 chore: prepare v2.3.5 2026-03-15 16:17:04 +00:00
0xJacky
f89916e0fb feat: add ResolveConfPathInDirPreserveLeaf function for symlink handling in configuration paths 2026-03-16 00:03:32 +08:00
0xJacky
20412b5b54 refactor: configuration path resolution for sites and streams v2.3.4 2026-03-15 22:20:29 +08:00
0xJacky
5741b9f9ff style: update Delete component styles for improved UI consistency 2026-03-15 21:41:53 +08:00
renovate[bot]
f8ef0494b0 chore(deps): update pnpm.catalog.default vite-plugin-build-id to v0.7.0 (#1568) 2026-03-15 20:49:48 +08:00
0xJacky
b06cce311a fix: correct recovery code verification logic in OTP handling 2026-03-15 19:18:03 +08:00
0xJacky
bc8df5beda feat: add DELETE endpoint for DDNS configuration and implement deletion logic 2026-03-15 02:44:48 +00:00
0xJacky
a2e1e8e31c fix: add IP address family handling and tests for DNS functionality #1572 2026-03-15 02:28:49 +00:00
0xJacky
7f7e569460 chore: prepare v2.3.4 2026-03-15 02:17:16 +00:00
0xJacky
f61bcec547 refactor: enhance backup restoration process with integrity checks 2026-03-15 09:52:03 +08:00
0xJacky
1593e6fb7d feat: integrate WebSocket usage in proxy availability store 2026-03-14 23:53:18 +08:00
0xJacky
1cec07d6ea feat: implement demo mode for terminal with restricted commands 2026-03-14 23:49:58 +08:00
0xJacky
413dc631ee feat: add WebSocketTrustedOrigins configuration and implement origin validation for WebSocket connections
- Introduced `WebSocketTrustedOrigins` setting in `app.example.ini` and corresponding documentation.
- Refactored WebSocket origin checks across multiple API endpoints to utilize the new middleware for improved security.
- Added tests for the new origin validation logic to ensure proper handling of trusted origins and node secret requests.
2026-03-14 23:37:10 +08:00
0xJacky
7b66578adb chore(deps): update various dependencies 2026-03-14 15:25:18 +00:00
0xJacky
34fef1f0c5 refactor: replace array sorting method with toSorted for improved readability 2026-03-14 14:30:10 +00:00
0xJacky
b3e3aa77a3 fix: update translation file references and add new entries 2026-03-14 14:29:46 +00:00
renovate[bot]
7e981067e5 chore(deps): update docker/login-action action to v4 (#1574)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-14 22:22:50 +08:00
renovate[bot]
2060aeeb0a chore(deps): update docker/metadata-action action to v6 (#1578)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-14 22:22:38 +08:00
renovate[bot]
0586b4b93d chore(deps): update docker/build-push-action action to v7 (#1577)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-14 22:22:23 +08:00
renovate[bot]
333691c3f7 chore(deps): update pnpm.catalog.default eslint to v10 (#1548)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-14 22:21:56 +08:00
renovate[bot]
b9dc838939 chore(deps): update pnpm.catalog.default @vitejs/plugin-legacy to v8 (#1585)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-14 22:21:13 +08:00
renovate[bot]
aabd58c160 chore(deps): update docker/setup-buildx-action action to v4 (#1575)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-14 22:19:17 +08:00
renovate[bot]
ca58403e8c chore(deps): update github artifact actions (#1570)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-14 22:18:55 +08:00
0xJacky
0ecd9ad090 chore(deps): update dependencies to latest versions 2026-03-14 14:18:16 +00:00
0xJacky
a6491e437f feat: add logrotate settings validation and testing 2026-03-14 22:04:43 +08:00
0xJacky
029142f944 chore: update dependencies and refactor settings management 2026-03-14 21:11:59 +08:00
renovate[bot]
6ec542fd97 chore(deps): update all non-major dependencies (#1562)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-18 01:09:50 +00:00
0xJacky
e5da6dd96d chore: update version to 2.3.3 and increment build number v2.3.3 2026-02-15 00:55:30 +00:00
renovate[bot]
9c09c2c973 chore(deps): update all non-major dependencies (#1553)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-13 01:38:20 +00:00
0xJacky
0649cf786f feat: Implement PID path extraction from nginx -T output
- Added regex pattern for parsing the pid directive in nginx configurations.
- Introduced `getPIDPathFromNginxT` function to extract the pid file path, handling both absolute and relative paths.
- Enhanced `GetPIDPath` function to prioritize user settings, compile-time defaults, and runtime overrides, ensuring robust path resolution.
- Added unit tests for PID regex parsing to validate various scenarios, including standard, indented, and commented directives.

This update improves the handling of pid paths, particularly for nginx-unprivileged setups, and ensures accurate logging and configuration management.
2026-02-08 12:23:50 +00:00
Jacky
72932f4a6c Nginx duplicate includes (#1550)
* fix: prevent duplicate include directives in nginx.conf

The FixNginxConfIncludeSites, FixNginxConfIncludeStreams, and
FixNginxConfIncludeConfD functions now check if the include directive
already exists before adding a new one. This prevents duplicate include
directives that could cause nginx to load configurations twice, leading
to errors like 'duplicate upstream' in stream configurations.

Fixes the issue where stream and http includes were being added
multiple times to nginx.conf:
- include /etc/nginx/sites-enabled/*;
- include /etc/nginx/streams-enabled/*;
- include /etc/nginx/conf.d/*.conf;

Added test TestFixNginxConfNoDuplicateIncludes to verify the fix.

Co-authored-by: Jacky <me@jackyu.cn>

* fix: align Fix function patterns with Check functions and defer backup creation

- Change Fix functions to use same glob patterns as Check functions:
  - 'sites-enabled/*' instead of 'sites-enabled'
  - 'streams-enabled/*' instead of 'streams-enabled'
  - 'conf.d/*' instead of 'conf.d'
- Move backup file creation after the duplicate check to avoid
  creating unnecessary backup files when no changes are needed

This fixes two issues:
1. Fix functions would incorrectly skip adding includes when a
   non-glob include existed (e.g., conf.d/default.conf)
2. Backup files were created even when early-returning due to
   duplicate detection

* Fix: Add backup creation for fallback paths in nginx.conf fix functions

The backup creation was moved inside the block-found branch, but the fallback
paths (when no http/stream block exists) still write to the file without
creating a backup first. This fix adds backup creation before each fallback
write operation to restore the original behavior where all code paths that
modify the file are protected by a backup.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-02-08 20:02:10 +08:00