Commit Graph

14 Commits

Author SHA1 Message Date
8215c0faee feat(proxy): add proxy management endpoint and proxy creation API
- Implement new endpoint for creating frpc proxy configurations
- Add DBQueryFrpcInstanceByID function to fetch instances by ID
- Move proxy generation logic to separate function in frpcProxyAct.go
- Update API documentation with new proxy creation endpoint
2026-03-19 17:34:31 +08:00
20ec25328d feat(logging): add database logging support and refactor logging system
- Implement new database logging functionality with separate logs database
- Refactor PostLog function to store logs in database while maintaining console output
- Add new InitLogsDatabase function and related database operations
- Update main.go to support separate database paths for data and logs
- Add logging for user creation events
2026-03-17 18:47:51 +08:00
49048597f2 refactor(database): make DBListFrpcInstances able to list all users' frpc instances but not single user
feat(frpcAct): user will get createdBy when query frpc instances on current server
docs(api): update related api documentation
2026-03-12 22:41:17 +08:00
f3fca7f07b feat(user): add createdAt field to user model
- Add createdAt field to User struct and database schema
- Update all user queries to include createdAt field
- Document new field in API documentation
- Fix server online status flag timing
2026-03-10 14:34:16 +08:00
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
783b06ff94 feat(userMgr): add list users endpoint
Add new endpoint `/userMgr/list` to retrieve all users with superuser permission. Includes handler implementation, database query function, and API documentation update.
2026-03-04 11:20:01 +08:00
8f901dac08 feat(userMgr): add user removal functionality
- Implement RemoveUser function in database.go to delete users
- Add RemoveUserHandler to handle HTTP requests for user removal
- Update API documentation with new /userMgr/remove endpoint
- Add route for user removal in router.go
2026-03-04 11:14:35 +08:00
d7260e0cf6 feat(user): add user creation endpoint for superusers
- Add new `/userMgr/create` endpoint for superusers to create users with specified types
- Update AddUser function to accept user type parameter
- Add documentation for the new endpoint in api.md
- Remove debug log comment in auth.go
2026-03-04 11:07:37 +08:00
1dc0d840b0 feat(instance): refactor modify endpoint to support config types
- Change modify endpoint from `/modify/{field}` to `/modify` with POST
- Add support for two modification types: configFile and systemConfig
- Implement config file parsing using ini package for configFile type
- Update database schema to include name in update query
- Add comprehensive input validation and error handling
- Update documentation to reflect new API changes
2026-03-02 22:43:18 +08:00
fc4ad46f6c fix(database): correct time parsing for frpc instance queries
Fix incorrect time parsing when querying frpc instances by properly handling the createdAt string field and converting it to time.Time. Also fix indentation in InitUserDatabase function.
2026-03-02 19:48:00 +08:00
13a401dafe refactor(frpc, database): move all database actions to database.go 2026-03-02 13:32:58 +08:00
b661118180 refactor(auth): move authentication params to headers and simplify validation
- Move token and timestamp validation to HTTP headers
- Simplify ValidateTimeStamp to return boolean
- Update AddUser to use default "visitor" type
- Remove redundant timestamp and token fields from request structs
- Update API documentation to reflect header-based authentication
2026-02-28 15:32:32 +08:00
852f13fa61 refactor(database): move database initialization functions to single file
Consolidate InitFrpcDatabase and InitUserDatabase functions into database.go for better code organization and maintainability. Remove duplicate code from frpc.go.
2026-02-27 21:16:27 +08:00
934190eebf feat: implement core functionality for super-frpc service
This commit introduces the core functionality for the super-frpc service including:
- Configuration management
- User authentication and authorization
- Database integration
- FRPC instance management
- API endpoints for user operations
- Token-based authentication system
- Password hashing and validation
2026-02-23 00:19:57 +08:00