feat(session): add session removal endpoint and refactor session management

- Implement new `/sessionMgr/remove` endpoint for superusers to remove sessions
- Refactor session and token management to use sessionTokenMap for better tracking
- Update session cleanup logic to handle both tokens and sessions
- Add documentation for new API endpoint in docs/api.md
- Modify logout handler to use new session removal approach
This commit is contained in:
2026-03-06 19:22:52 +08:00
parent f07b89842a
commit 8b9a757bea
6 changed files with 166 additions and 23 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ Create a `config.json` file in the project root:
## Build
```bash
go build -o super-frpc
go build -o super-frpc.exe
```
For Linux:
@@ -60,7 +60,7 @@ For detailed API documentation, please see [docs/api.md](docs/api.md)
- [x] Add Windows boot service support
- [x] Add session list API
- [ ] Add session management API
- [x] Add session management API
- [ ] Add codes per file documentation
- [ ] Add user config modify API