Commit graph

19 commits

Author SHA1 Message Date
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
yusing
b984386bab fix: high cpu usage 2025-01-22 05:44:04 +08:00
yusing
dd0bbdc7b4 fix logs not printing correctly, removed unneccessary loggers 2025-01-20 17:42:54 +08:00
yusing
5769abb626 fix: File.closeOnZero remove unnecessary for loop 2025-01-09 18:42:51 +08:00
yusing
f906e04581 fix access logger write on closed file after config reload 2025-01-09 04:26:31 +08:00
yusing
112859caa5 improved access log flushing 2025-01-04 05:08:23 +08:00
yusing
3ecc0f95bf fixed some tests 2025-01-03 16:31:49 +08:00
yusing
6e30d39b78 access logger support sharing the same file, tests added for concurrent logging 2025-01-03 14:10:09 +08:00
yusing
a587ada170 fix access logger high cpu usage, simplify some code 2025-01-03 03:30:15 +08:00
yusing
4dda54c9e6 access logger improvements 2025-01-01 06:09:35 +08:00
yusing
1ab34ed46f simplify task package implementation 2025-01-01 06:07:32 +08:00
yusing
e7be27413c small string split join optimization 2024-12-19 00:54:31 +08:00
yusing
36069cbe6d add host filter 2024-12-18 11:44:38 +08:00
yusing
57a7c04a4c fix accesslog and serialization 2024-12-18 09:57:29 +08:00
yusing
783b352e3b fixed json access logger 2024-12-18 08:01:58 +08:00
yusing
942651dc16 add time field to json access log 2024-12-18 07:39:04 +08:00
yusing
f2a9ddd1a6 improved deserialization method 2024-12-18 07:18:18 +08:00
yusing
6aefe4d5d9 replace all schema check with go-playground/validator/v10 2024-12-18 04:48:29 +08:00
yusing
00f60a6e78 feature: accesslogger 2024-12-18 03:09:46 +08:00