yusing
78bed43199
refactor: update task management code
...
- Rename needFinish to waitFinish
- Fixed some tasks not being waited they should be
- Adjusted mutex usage in the directory watcher to utilize read-write locks for improved concurrency management.
2025-04-17 14:47:14 +08:00
yusing
1fe21b84eb
refactor: unify route handling by consolidating route query methods with Pool
...
- Replaced direct calls to routequery with a new routes package for better organization and maintainability.
- Updated various components to utilize the new routes methods for fetching health information, homepage configurations, and route aliases.
- Enhanced the overall structure of the routing logic to improve clarity and reduce redundancy.
2025-04-17 14:44:12 +08:00
Yuzerion
80bc018a7f
feat: custom json marshaling implementation, replace json and yaml library ( #89 )
...
* chore: replace gopkg.in/yaml.v3 vs goccy/go-yaml; replace encoding/json with bytedance/sonic
* fix: yaml unmarshal panic
* feat: custom json marshaler implementation
* chore: fix import and err marshal handling
---------
Co-authored-by: yusing <yusing@6uo.me>
2025-04-16 15:02:11 +08:00
Yuzerion
57292f0fe8
feat: proxmox idlewatcher ( #88 )
...
* feat: idle sleep for proxmox LXCs
* refactor: replace deprecated docker api types
* chore(api): remove debug task list endpoint
* refactor: move servemux to gphttp/servemux; favicon.go to v1/favicon
* refactor: introduce Pool interface, move agent_pool to agent module
* refactor: simplify api code
* feat: introduce debug api
* refactor: remove net.URL and net.CIDR types, improved unmarshal handling
* chore: update Makefile for debug build tag, update README
* chore: add gperr.Unwrap method
* feat: relative time and duration formatting
* chore: add ROOT_DIR environment variable, refactor
* migration: move homepage override and icon cache to $BASE_DIR/data, add migration code
* fix: nil dereference on marshalling service health
* fix: wait for route deletion
* chore: enhance tasks debuggability
* feat: stdout access logger and MultiWriter
* fix(agent): remove agent properly on verify error
* fix(metrics): disk exclusion logic and added corresponding tests
* chore: update schema and prettify, fix package.json and Makefile
* fix: I/O buffer not being shrunk before putting back to pool
* feat: enhanced error handling module
* chore: deps upgrade
* feat: better value formatting and handling
---------
Co-authored-by: yusing <yusing@6uo.me>
2025-04-16 14:52:33 +08:00
yusing
1380b58141
fix: nil dereference in docker health checker
2025-04-11 03:23:29 +08:00
yusing
fb075a24d7
refactor: simplify health monitor code
2025-04-10 05:03:01 +08:00
yusing
111d767d46
chore(prometheus): drop service health metrics
2025-04-07 12:51:20 +08:00
yusing
cdb3ffe439
refactor: clean up code and enhance utilities with new functions
2025-03-28 08:14:06 +08:00
yusing
8c9a2b022b
feat: agent health monitor
2025-03-28 08:14:06 +08:00
yusing
2e8248cd5b
fix: race condition in health monitor
2025-03-28 08:14:06 +08:00
yusing
361931ed96
refactor: rename module 'err' to 'gperr' in references
2025-03-28 07:39:26 +08:00
Yuzerion
1a5f3735cf
Feat/fileserver ( #60 )
...
* cleanup code for URL type
* fix makefile for trace mode
* refactor, merge Entry, RawEntry and Route into one.
* Implement fileserver.
* refactor: rename HTTPRoute to ReverseProxyRoute to avoid confusion
* refactor: move metrics logger to middleware package
- fix prometheus metrics for load balanced routes
- route will now fail when health monitor fail to start
* fix extra output of ls-* commands by defer initializaing stuff, speed up start time
* add test for path traversal attack, small fix on FileServer.Start method
* rename rule.on.bypass to pass
* refactor and fixed map-to-map deserialization
* updated route loading logic
* schemas: add "add_prefix" option to modify_request middleware
* updated route JSONMarshalling
---------
Co-authored-by: yusing <yusing@6uo.me>
2025-02-06 18:23:10 +08:00
Yuzerion
78900772bb
Feat/ntfy ( #57 )
...
* implement ntfy notification
* fix notification fields order
* fix schema for ntfy
---------
Co-authored-by: yusing <yusing@6uo.me>
2025-02-01 13:07:44 +08:00
yusing
1adba05065
api: add /v1/health/ws for health bubbles on dashboard
2025-01-19 04:34:20 +08:00
yusing
b253dce7e1
cleanup some loadbalancer code
2025-01-19 04:32:50 +08:00
yusing
26d259b952
fix: docker monitor now uses container status
2025-01-15 09:16:36 +08:00
yusing
5a9fc3ad18
healthcheck: should not include latency when ping failed
2025-01-06 04:03:59 +08:00
yusing
7e60d1803c
fix healthcheck last seen
2025-01-03 16:56:18 +08:00
yusing
1ab34ed46f
simplify task package implementation
2025-01-01 06:07:32 +08:00
yusing
751594860a
fix docker health checker metrics missing from prometheus
2024-12-19 14:01:55 +08:00
yusing
e7be27413c
small string split join optimization
2024-12-19 00:54:31 +08:00
yusing
34d5edd6b9
fix health lastSeen format
2024-12-18 10:49:33 +08:00
yusing
6aefe4d5d9
replace all schema check with go-playground/validator/v10
2024-12-18 04:48:29 +08:00
yusing
34858a1ba0
fix prometheus metrics gone after route changes
2024-12-18 00:54:04 +08:00
yusing
c5d96f96e1
replace unnecessary Task interface with struct
2024-12-17 10:33:21 +08:00
yusing
4d94d12e9c
fixed / suppressed (irrelevant) golangci-lint errors
2024-12-17 10:33:21 +08:00
yusing
843d7b2231
refactor and dependencies upgrade
2024-12-13 15:22:31 +08:00
yusing
68b2d79700
fix docker healthcheck formatting
2024-12-13 12:44:20 +08:00
yusing
17e8532e6f
enrich health check result details
2024-12-13 12:35:59 +08:00
yusing
be81415a75
use docker healthcheck result if possible
2024-12-13 12:18:10 +08:00
yusing
5d5c623f09
small refactor and fixes
2024-12-03 11:45:10 +08:00
yusing
a4f44348ef
fixed zero timeout causing health check to fail
2024-11-30 09:09:07 +08:00
yusing
fb9de4c4ad
added ping latency to healthcheck result
2024-11-30 06:43:47 +08:00
yusing
f3b21e6bd9
refactor health module
2024-11-13 06:46:01 +08:00
yusing
64728d10ad
fixed incorrect healthcheck result in some cases, healthchecker now send user agent identifying godoxy
2024-11-11 06:37:05 +08:00
yusing
c07f2ed722
fixed healthchecker start even if disabled, simplified label parsing
2024-11-11 06:34:12 +08:00
yusing
6194bac4c4
metric unregistration on route removal, fixed multi-ips as visitor label detected from x headers
2024-11-10 06:47:59 +08:00
yusing
a1d1325ad6
updated health status impl
2024-11-10 06:35:56 +08:00
yusing
f97e3f65fe
go version and deps update, fixed middlewares and metrics
...
- fixed "API JWT secret empty" warning output format
- fixed metrics initialized when it should not
- fixed middlewares.modifyRequest Host header not working properly
2024-11-08 06:14:08 +08:00
yusing
5214ae1760
uptime metrics
2024-11-07 11:44:01 +08:00
yusing
a86d316d07
refactor and typo fixes
2024-11-02 03:14:47 +08:00
yusing
67b6e40f85
remove unused code
2024-11-02 03:04:15 +08:00
yusing
369cdf8c4f
fixed config reload
2024-10-30 06:52:18 +08:00
yusing
e5bbb18414
migrated from logrus to zerolog, improved error formatting, fixed concurrent map write, fixed crash on rapid page refresh for idle containers, fixed infinite recursion on gotfiy error, fixed websocket connection problem when using idlewatcher
2024-10-29 11:34:58 +08:00
yusing
c847fe4747
fixed schema and json tag, hide http://:0
2024-10-20 11:04:44 +08:00
yusing
a278711421
fixed loadbalancer with idlewatcher, fixed reload issue
2024-10-20 09:46:02 +08:00
yusing
b296fb2965
fixed healthcheck failed to disable and nil dereference
2024-10-19 00:13:55 +08:00
yusing
53557e38b6
Fixed a few issues:
...
- Incorrect name being shown on dashboard "Proxies page"
- Apps being shown when homepage.show is false
- Load balanced routes are shown on homepage instead of the load balancer
- Route with idlewatcher will now be removed on container destroy
- Idlewatcher panic
- Performance improvement
- Idlewatcher infinitely loading
- Reload stucked / not working properly
- Streams stuck on shutdown / reload
- etc...
Added:
- support idlewatcher for loadbalanced routes
- partial implementation for stream type idlewatcher
Issues:
- graceful shutdown
2024-10-18 16:47:01 +08:00
yusing
c0c61709ca
fixed idlewatcher panic, dashboard app name, route not removing on container destroy
2024-10-16 00:57:10 +08:00
yusing
56b778f19c
fixed json output for ls-routes and its API and homepage api
2024-10-15 16:23:46 +08:00