feat: handle X-Forward-For for log output

- add Gorilla handlers package for enhanced HTTP handling
- refactor HTTP server to use a new ServeMux for routing
- update ListenAndServe to utilize ProxyHeaders for better proxy support
- add RealIP field to client model
  - use RealIP fild for connect/disconnect log output
This commit is contained in:
Sebastian Mark 2024-11-03 10:00:14 +01:00
parent dd9490bb3b
commit 44a64bfce4
6 changed files with 17 additions and 7 deletions

View file

@ -14,7 +14,8 @@ type ClientCommand struct {
// Represents a single client
type WebsocketClient struct {
Conn *websocket.Conn
Conn *websocket.Conn
RealIP string
}
// Sends a message to the websocket.