- Implement new endpoint `/userMgr/modifyType` for updating user types
- Add database function DBUpdateUserType to handle type updates
- Include request validation and proper error handling
- Update API documentation with new endpoint details
- Move instance-related structs and functions to config.go
- Remove serverAddr, serverPort, and authMethod from database schema
- Implement new config parsing and encoding with nested key support
- Update service management to use instanceID instead of username/name
- Add GetServiceNameByInstanceID helper function
- Update API documentation for auth.method field change
- Update DBRemoveFrpcInstance to use instanceID for deletion
- Modify DeleteInstanceHandler to accept and validate instanceID
- Improve error messages for invalid instanceID format
- Update logging to use instanceID instead of instanceName
- 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
- 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
- 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
- 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
Add new endpoint `/userMgr/list` to retrieve all users with superuser permission. Includes handler implementation, database query function, and API documentation update.
- 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
- 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
- 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
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.
- 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
Consolidate InitFrpcDatabase and InitUserDatabase functions into database.go for better code organization and maintainability. Remove duplicate code from frpc.go.
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