Optimized rate limiter implementation

- Moved rate limiter scope into proxy router
- Give IpTable a better name following clean code guideline
- Optimized client IP retrieval method
- Added stop channel for request counter ticker
- Fixed #199
- Optimized UI for rate limit
This commit is contained in:
Toby Chui
2024-06-14 23:42:52 +08:00
parent 85f9b297c4
commit 10048150bb
11 changed files with 160 additions and 81 deletions

View File

@@ -91,7 +91,6 @@ func addXForwardedForHeader(req *http.Request) {
req.Header.Set("X-Real-Ip", strings.TrimSpace(ips[0]))
}
}
}
}