Commit Graph

1273 Commits

Author SHA1 Message Date
yusing
2e547d15c5 refactor(config): streamline agent configuration and error handling 2025-09-05 16:21:59 +08:00
yusing
3e43f7d27f refactor(config): improve concurrency in route providers loading
- Replaced synchronous error handling with concurrent processing for loading providers.
- Removed the errIfExists function and integrated its logic into the provider loading process.
- Enhanced error reporting for existing providers and agent startup failures.
- Streamlined the use of wait groups for better management of concurrent tasks.
2025-09-05 16:21:56 +08:00
yusing
97b6066466 refactor: remove unnecessary xsync.Map wrapper
- Updated agentPool, cachedAddr, fileContentMap, and lastSeenMap to use xsync.Map.
- Removed functional package and its related tests.
2025-09-05 16:19:54 +08:00
yusing
4a000316be feat(pool): enhance byte pool and add comprehensive tests
- Introduced new benchmarks for GetLarge and GetLargeUnsized methods to evaluate performance with varying buffer sizes.
- Added a new test file for BytesPool, covering various scenarios including sized and unsized buffer retrieval, buffer splitting, and memory safety.
- Improved memory management in the BytesPool implementation to ensure efficient buffer reuse and capacity handling.
2025-09-05 16:19:04 +08:00
yusing
92131bc342 refactor(idlewatcher): improve container readiness handling and health check logic
- Simplified the wakeFromHTTP and wakeFromStream methods by removing unnecessary loops and integrating direct checks for container readiness.
- Introduced a waitForReady method to streamline the waiting process for container readiness notifications.
- Enhanced the checkUpdateState method to include timeout detection for container startup.
- Added health check retries and logging for better monitoring of container state transitions.
2025-09-05 16:18:14 +08:00
yusing
be21a56396 refactor(idlewatcher): replace map with ordered.Map for deduplicating dependencies 2025-09-05 16:18:12 +08:00
yusing
3b99727ae6 fix(route): update Homepage.show defaults to true 2025-09-05 16:18:07 +08:00
yusing
29cedbfc37 chore(dns_providers): drop support for namesilo and baiducloud; upgraded dependencies
- Introduce support for azion, conohav3, dyndnsfree, nicru, zoneedit
2025-09-04 07:47:49 +08:00
yusing
d609f430b7 feat(config): concurrent route providers initialization 2025-09-04 07:37:49 +08:00
yusing
4941e9ec32 feat(docker): implement container management endpoints for start, stop, and restart
- Added Restart, Start, and Stop functions to manage Docker containers by ID.
- Introduced corresponding request structs (StartRequest, StopRequest) for handling input.
- Updated Swagger documentation to include new endpoints and request/response schemas.
2025-09-04 07:30:51 +08:00
yusing
a1cd755597 refactor(auth): change PostAuthCallbackHandler to redirect after successful authentication 2025-09-04 06:42:18 +08:00
yusing
99a6bf28e6 feat(docker): add development Docker setup with dev.compose.yml and Dockerfile 2025-09-04 06:42:05 +08:00
yusing
f34f502660 chore(swagger): updated swagger docs 2025-09-04 06:41:04 +08:00
yusing
de9ddfaef6 feat(metrics): add AllSystemInfo endpoint for real-time system information retrieval
- Implemented AllSystemInfo function to handle WebSocket connections and provide system info for agents.
- Introduced AllSystemInfoRequest struct for query parameters including period, aggregate mode, and interval.
- Added support for concurrent data retrieval from multiple agents with error handling and retry logic.
- Utilized byte pools for efficient memory management during JSON marshaling of system info.
2025-09-04 06:40:28 +08:00
yusing
fe5916a034 feat(metrics): enhance SystemInfoRequest with agent name support and update response type
- Added agentName field to SystemInfoRequest for improved querying.
- Updated SystemInfoAggregate type to use AggregatedJSON
- Modified SystemInfo function to handle agent lookup by name in addition to address.
2025-09-04 06:40:11 +08:00
yusing
54fb962ce8 fix(api): conditionally set Gin mode to release based on debug flag 2025-09-04 06:39:39 +08:00
yusing
1e090ffa0a feat(metrics): enhance Entries structure with historical data validation and JSON serialization
- Added addWithTime method to allow adding entries with specific timestamps.
- Introduced validateInterval and fixInterval methods for interval validation and correction.
- Implemented GetJSON method for serializing entries to JSON format.
- Added unit tests for GetJSON functionality to ensure correct output for both full and partial entries.
- Updated Poller to validate and fix intervals after loading data from JSON.
2025-09-04 06:38:07 +08:00
yusing
1617a4d54f refactor(metrics): update uptime metrics structure and calculations
- Changed Latency type from int64 to int32 in Status struct.
- Updated RouteStatuses and RouteAggregate to use slices of Status instead of pointers.
- Modified aggregateStatuses and calculateInfo functions to accommodate new types.
- Enhanced RouteAggregate with additional fields: IsDocker and CurrentStatus.
- Improved sorting logic for route statuses and added handling for excluded routes.
2025-09-04 06:37:24 +08:00
yusing
90fb9f0dcc feat(websocket): enhance PeriodicWrite with deduplication support and add Context method
- Updated PeriodicWrite to accept a deduplication function for optimized data writing.
- Introduced Context method to retrieve the manager's context.
- Added logging for WebSocket connection closure with error details.
2025-09-04 06:37:06 +08:00
yusing
54ae580645 refactor(logging): replace byte pool with GetBytesPoolWithUniqueMemory for access logger and rotation 2025-09-04 06:36:51 +08:00
yusing
1c80f3e52f feat(agent): add agent iteration and count functions; refactor Forward method to return *http.Response 2025-09-04 06:36:25 +08:00
yusing
20105534c7 feat(api): add GetContainer endpoint and Docker host ID mapping
- Implemented GetContainer function to retrieve container details by ID.
- Introduced idDockerHostMap for mapping container IDs to Docker hosts.
- Updated Container struct to allow omitting the State field in JSON responses.
2025-09-04 06:36:02 +08:00
yusing
90738a6809 refactor(api): remove server param from docker logs api
- renamed `container` param  to `id`
- implemented container id to docker host lookup
2025-09-04 06:35:15 +08:00
yusing
920aed7bee fix(rules): add swaggertype annotations for On and Do fields in Rule struct 2025-09-04 06:34:31 +08:00
yusing
9ab00e3902 refactor(routes): unify route existence checks and remove 'All' route pool 2025-09-04 06:34:19 +08:00
yusing
0edad7377a feat(homepage): implement SearchRoute method and enhance item configuration with sorting and visibility features, introduce All and Favorite categories 2025-09-04 06:31:44 +08:00
yusing
7753c90a7e feat(homepage): implement SearchRoute method and enhance item configuration with sorting and visibility features, introduce All and Favorite categories 2025-09-04 06:30:37 +08:00
yusing
866b95f85b feat(container): add State field to Container type 2025-09-04 06:28:55 +08:00
yusing
0814ca4451 feat(websocket): add deduplication support to PeriodicWrite function and introduce DeepEqual utility 2025-09-04 06:28:14 +08:00
yusing
2c6690b2d0 refactor(middleware): replace Cloudflare IP range fetching with bytes.Lines 2025-09-04 06:25:14 +08:00
yusing
cc00859963 refactor(metrics): optimize JSON marshaling in SystemInfo and Aggregated structures for improved performance and memory management 2025-09-04 06:25:07 +08:00
yusing
c2cdaacab5 fix(api): correct error formatting 2025-09-04 06:22:39 +08:00
yusing
a8beb2d92f fix(metrics): non ws response being encoded twice; simplified response handling 2025-09-04 06:22:06 +08:00
yusing
0a5438b18b refactor(auth): remove GET method from /auth/callback endpoint and update Swagger documentation 2025-09-04 06:21:42 +08:00
yusing
0aa2a480b5 refactor(websocket): enhance connection management by ensuring resources are released on context cancellation 2025-09-04 06:21:30 +08:00
yusing
755cbd7aec refactor(metrics): remove pointers from type parameter T to avoid unnecessary indirection 2025-09-04 06:19:40 +08:00
yusing
199b8fad20 refactor(real_ip): move header check before everything else 2025-09-04 06:19:16 +08:00
yusing
e1133a2daf docs(README): add announcement for new WebUI availability in nightly tag 2025-09-03 22:38:10 +08:00
yusing
c8292a1f38 fix(docker): treat containers from $DOCKER_HOST as local 2025-09-03 22:34:35 +08:00
yusing
89bb117397 feat(route): add ExcludedReason field 2025-09-03 22:34:29 +08:00
yusing
ceb1e45af5 fix(api): conditionally enable auth APIs based on auth configuration 2025-09-03 22:34:20 +08:00
yusing
a56de3de08 refactor(homepage): improve icon search functionality and add case-insensitive string matching 2025-09-03 22:34:10 +08:00
yusing
8339c42470 refactor(middleware): simplify buffer allocation in themed middleware v0.17.2 2025-09-02 23:28:47 +08:00
yusing
ed39942d65 feat(api): implement caching middleware and allow favicons to be cached 2025-09-02 23:00:22 +08:00
yusing
998488f285 chore(trunk): update CLI and plugin versions, and bump linter dependencies 2025-09-02 22:59:00 +08:00
yusing
aac5016b78 refactor(httpheaders): replace strutils.SplitComma with strings.SplitSeq 2025-09-02 22:58:46 +08:00
yusing
d2b4d3e6e3 feat(auth): enhance cookieDomain function to support additional local domains 2025-09-02 22:58:24 +08:00
yusing
a2d4c468cd refactor(forwardauth): finalize middleware implementation with better headers handling 2025-09-02 22:58:13 +08:00
yusing
c550255458 feat(middledware): middleware-specific logging methods 2025-09-02 22:56:30 +08:00
yusing
6a3e28dfd7 fix(config): handle missing config file and middleware directory gracefully and log a warning 2025-09-02 22:55:43 +08:00