Files
backend/README.md
NanamiAdmin 8b9a757bea 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
2026-03-06 19:22:52 +08:00

70 lines
1.5 KiB
Markdown

# Super-frpc
A backend application for managing local frpc instances, allowing users to easily start, stop, restart, and perform daily maintenance operations on frpc instances. It also provides automated error handling, such as automatic restart when an instance crashes.
## Features
- User authentication with token-based login
- Create, delete, and modify frpc instances
- Automatic startup configuration (systemd/init.d)
- User permission management (superuser/admin/visitor)
- SQLite database for data persistence
## Supported Platforms
- `GNU/Linux`
- `Windows`
## Configuration
Create a `config.json` file in the project root:
```json
{
"listenAddr": "0.0.0.0",
"listenPort": "8080",
"frpcPath": "/usr/bin/frpc",
"instancePath": "./configs"
}
```
| Field | Description | Default |
|-------|-------------|---------|
| listenAddr | Server listening address | 0.0.0.0 |
| listenPort | Server listening port | 8080 |
| frpcPath | Path to frpc executable | /usr/bin/frpc |
| instancePath | Path to store instance config files | ./configs |
## Build
```bash
go build -o super-frpc.exe
```
For Linux:
```bash
GOOS=linux GOARCH=amd64 go build -o super-frpc
```
## Run
```bash
./super-frpc -config ./config.json -db ./database.db
```
## API Documentation
For detailed API documentation, please see [docs/api.md](docs/api.md)
## TODO
- [x] Add Windows boot service support
- [x] Add session list API
- [x] Add session management API
- [ ] Add codes per file documentation
- [ ] Add user config modify API
## License
GPL-3.0