add IP to sessions, IP+hostname to clients
All checks were successful
check / check (push) Successful in 1m5s
All checks were successful
check / check (push) Successful in 1m5s
- Add ip column to sessions table (real client IP of session creator) - Add ip and hostname columns to clients table (per-connection tracking) - Update CreateSession, RegisterUser, LoginUser to store new fields - Add GetClientHostInfo query method - Update SessionHostInfo to include IP - Extract executeCreateSession to fix funlen lint - Add tests for session IP, client IP/hostname, login client tracking - Update README with new field documentation
This commit is contained in:
@@ -216,6 +216,12 @@ Each session has an IRC-style hostmask composed of three parts:
|
||||
`username` field in the session/register request; defaults to the nick)
|
||||
- **hostname** — automatically resolved via reverse DNS of the connecting
|
||||
client's IP address at session creation time
|
||||
- **ip** — the real IP address of the session creator, extracted from
|
||||
`X-Forwarded-For`, `X-Real-IP`, or `RemoteAddr`
|
||||
|
||||
Each **client connection** (created at session creation, registration, or login)
|
||||
also stores its own **ip** and **hostname**, allowing the server to track the
|
||||
network origin of each individual client independently from the session.
|
||||
|
||||
The hostmask appears in:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user