354 Commits

Author SHA1 Message Date
0xJacky
4e4174d89a fix(backup): require secure session for restore 2026-04-27 11:53:31 +08:00
0xJacky
fd61e8ea6f fix(config): restrict executable nginx directives 2026-04-27 11:32:04 +08:00
0xJacky
3e411d38dd Harden config write paths 2026-04-21 22:40:50 +08:00
0xJacky
05e544c8f5 fix(upstream): separate http and websocket routes 2026-04-19 11:50:08 +08:00
0xJacky
25dea9f620 fix(setup): harden first-run installation flow 2026-04-18 23:47:45 +08:00
0xJacky
80a6a7273d enhance: protect sensitive settings with 2FA reveal flow 2026-04-18 20:19:50 +08:00
0xJacky
7ed73f621a feat(analytic): implement WebSocket keepalive mechanism 2026-04-18 11:02:52 +00:00
0xJacky
c38e0a28b8 fix(sites): honor configured healthcheck protocol (#1628)
The site healthcheck built its request URL from the indexed site URL
(e.g. http://example.com) and never rewrote the scheme to match the
user-configured HealthCheckConfig.Protocol. As a result, sites
configured for HTTPS were probed over HTTP and always shown as
unreachable. TestHealthCheck compounded the issue by using
siteConfig.Scheme (default "http") instead of req.Config.Protocol.

Introduce rewriteCheckURLScheme which aligns only the URL scheme with
the configured protocol while preserving path, query, and port, and
call it from CheckSiteWithConfig. TestHealthCheck now passes the stored
site URL and relies on the same rewrite, so the "Test" button exercises
the same code path as the scheduled checker.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 16:03:23 +08:00
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
0xJacky
d895c4a336 enhance(ws): improve session security 2026-04-04 09:48:18 +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
0xJacky
cb92cc4da8 feat: add ACMEUserID to certificate issuance and auto-certification requests 2026-03-16 00:52:12 +00:00
0xJacky
20412b5b54 refactor: configuration path resolution for sites and streams 2026-03-15 22:20:29 +08:00
0xJacky
bc8df5beda feat: add DELETE endpoint for DDNS configuration and implement deletion logic 2026-03-15 02:44:48 +00: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
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
Jacky
32d261d8df Cloudflare DNS comments (#1549)
* feat(dns): add comment support for Cloudflare DNS records

- Add Comment field to Record and RecordInput structs in provider.go
- Update Cloudflare provider to read/write comments on DNS records
- Add comment to frontend API types (DNSRecord, RecordPayload)
- Display Comment column in DNSRecordTable for Cloudflare domains
- Add Comment input field in DNSRecordForm for creating/editing records
- Comments are now visible and editable in the DNS management interface

Closes: feature request for Cloudflare DNS record comments

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

* fix(dns): decouple comment column visibility and preserve comments in DDNS updates

- Add separate showComment prop to DNSRecordTable component
- DNSRecordManager now passes showComment prop to the table
- Comment column visibility is now independent from proxied column
- DDNS update now preserves existing record.Comment to prevent
  silently clearing comments during IP address updates

Fixes Bugbot review issues:
- Comment column incorrectly coupled to proxied visibility
- DDNS updates silently clear Cloudflare record comments

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

* fix: resolve code duplication and missing comment field in DNS records

- Extract isCloudflare computed property to eliminate duplication between
  showProxiedToggle and showCommentField in DNSRecordManager.vue
- Add Comment field to recordRequest struct in dto.go
- Map Comment field in toRecordInput function to properly pass comments
  from frontend to the DNS provider layer

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-02-07 17:08:11 +08:00
0xJacky
3721c1b5fa refactor(llm): title generation for LLM sessions #1540 2026-02-07 02:49:01 +00:00
0xJacky
18538df8cb chore: update deps 2026-01-29 23:45:15 +08:00
Nemer Y Tamimi
93b10d7759 feat: Integrate DNS record management into site configuration (#1519)
* feat: Integrate DNS record management into site configuration

- Removed the 'External Notification Test' notification.
- Enhanced SiteAdd.vue to include DNS record integration, allowing users to select or create DNS records linked to the site.
- Added DNSRecordIntegration component for managing DNS records, including selection and creation of new records.
- Implemented DNS linking functionality in the RightPanel component, enabling users to link existing DNS records to their site configuration.
- Updated SiteEditor to provide DNS link status to child components.
- Extended the site model to include fields for linked DNS domain and record information.
- Added logic to handle DNS record recreation if a linked record is missing.

* fix: remove unnecessary type assertion for selectedDomainId and selectedRecordId

* feat: add computed properties for selectedDomainId and selectedRecordId to handle null values

* refactor: simplify setter syntax for computed properties of selectedDomainId and selectedRecordId

* fix: update computed properties to return undefined for null values in selectedDomainId and selectedRecordId

---------

Co-authored-by: Nemer Tamimi <nemer.tamimi@uopeople.edu>
2026-01-14 13:35:03 +08:00
Jray
0e7ea57110 feat: support oidc login (#1488) 2025-12-15 21:56:59 +08:00
0xJacky
cb1fb691af refactor: improve provider selection logic in DNSChallenge component and update column definition in ACMEUser view 2025-12-09 17:35:47 +08:00
Jacky
9225c96250 feat/dns (#1466)
* feat: dns management

* refactor(dns): streamline domain management functions and enhance validation

* feat(dns): add value suggestions for DNS record input with autocomplete functionality

* fix(dns): handle edge case in record listing pagination

* fix(dns): update credential property name for consistency and add cleanup on component unmount

* feat(dns): implement DDNS management #1194, #1140
2025-12-08 17:45:30 +08:00
0xJacky
cc8b82057c style: improved maintenance page styles 2025-11-25 13:52:19 +08:00
0xJacky
98e83f13b5 refactor: replace mutex with RWMutex for NodeMap access and implement snapshot functionality #1444 2025-11-24 14:10:23 +00:00
0xJacky
cfb6cae78a refactor: add config to disable site health check #1427, #1415, #1413 2025-11-09 09:41:33 +00:00
0xJacky
3111adfb44 chore: update deps 2025-11-07 18:23:23 +08:00
0xJacky
a6fbd2f567 fix(user): remove password from context payload if nil 2025-10-17 22:15:54 +08:00
0xJacky
ae86ef7a0c fix(upstream): improve caching mechanism for disabled sockets and ensure cache validity 2025-10-05 16:09:42 +00:00
0xJacky
6de168c945 refactor(upstream): remove init function and implement caching for disabled sockets in service 2025-10-05 00:56:31 +00:00
0xJacky
f967501412 feat(geolite): implement GeoLite2 database download from cloud 2025-10-04 13:23:33 +00:00
0xJacky
e71293cd76 feat: add deploy_mode field to namespace and implement sandbox testing for nginx config #1350 2025-10-04 04:51:23 +00:00
0xJacky
de0467b9e7 feat: allow disabling proxy targets availability test #1327 2025-10-03 13:51:12 +00:00
0xJacky
ccedb94880 chore: clean up codes 2025-10-03 14:33:07 +08:00
0xJacky
e26a4fa263 fix: replace env_group_id with namespace_id in API endpoints and types #1369 2025-10-02 10:44:24 +00:00
0xJacky
6567d929eb feat(nginx_log): add index_path configuration for custom index storage 2025-10-01 18:55:44 +08:00
0xJacky
2742aec1d5 feat(nginx): add RefreshModulesCache endpoint #1333 2025-09-19 01:27:09 +00:00
0xJacky
b8cfd93b60 fix: logging middleware context 2025-09-11 22:50:19 +08:00
0xJacky
1626c6117b perf: optimize indexer config for multi-core systems 2025-09-08 09:36:07 +08:00
0xJacky
29ff77a87f fix: websocket readPump context handling 2025-09-06 19:14:11 +08:00
0xJacky
66ba546710 feat: add OS context to LLM chat and enhance session management logic 2025-09-06 11:30:55 +08:00
0xJacky
7214befc8c feat: enhance LLM functionality with nginx configuration context and update ESLint auto-imports 2025-09-05 04:17:39 +00:00
0xJacky
c355cb8e65 feat: add llm sessions and update related logic 2025-09-02 08:01:09 +00:00
0xJacky
a982c04898 enhance: llm and code completion 2025-09-01 10:52:43 +08:00
0xJacky
9aa5a260b6 feat(nginx_log): add advanced indexing settings 2025-08-31 15:11:14 +08:00
0xJacky
8d15d1fcab enhance(nginx_log): indexing status management 2025-08-31 08:25:51 +08:00
0xJacky
b34fa8eeaf enhance(nginx_log): indexing logic, UI feedback for log availability 2025-08-29 23:55:12 +08:00