Implement proxy modification feature including:
- New modifyFrpcProxy function in config.go
- New ModifyProxyHandler in frpcProxyAct.go
- New API endpoint in router.go
- Updated API documentation in docs/api.md
Implement proxy modification feature including:
- New modifyFrpcProxy function in config.go
- New ModifyProxyHandler in frpcProxyAct.go
- New API endpoint in router.go
- Updated API documentation in docs/api.md
implement user modification functionality including:
- new endpoint /userMgr/modify
- database update function DBUpdateUser
- request/response structures
- handler with proper authentication and validation
- updated API documentation
- marked as completed in README checklist
- 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
Implement cross-platform log streaming for frpc instances with support for Windows, systemd, and init.d systems. Includes WebSocket API endpoint for real-time log streaming, token validation, and instance ownership checks. Update README and API documentation to reflect new functionality.
The implementation handles:
- Platform-specific log collection (Windows Event Log, journalctl, log files)
- WebSocket-based real-time streaming
- Token validation and instance access control
- Log level parsing and formatting
- Historical log retrieval since service start
- Handle specific exit codes for systemd services (inactive/unknown states)
- Add better error handling for init.d services
- Move string conversion before error checking for consistency
- Update log levels for better service state visibility
Implement new GET endpoint `/frpcAct/instanceMgr/getInfo` to fetch frpc instance information
Add documentation for the new API endpoint in docs/api.md
The handler returns different information based on user permission level
Remove sensitive information from instance listing response for all users and add isRunning field
Fix backend to prevent starting already running frpc instances
- 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
Implement setBootAtStart and removeBootAtStart functions to handle service auto-start configuration separately from service creation/removal. Update handlers to use these new functions for better control of boot behavior. The changes support Windows, systemd and init.d systems.
- 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 GET endpoint `/frpcAct/proxyMgr/list` to retrieve proxy configurations from frpc instance config files. Includes handler function, API documentation, and route setup. The endpoint validates user permissions, reads and parses the config file, and returns structured proxy data with instance information.
- Replace ini package with toml for more reliable config parsing
- Refactor proxy management to use structured config instead of string manipulation
- Add proper error handling for config operations
- Clean up unused imports and improve code organization
- Update go.mod dependencies accordingly
Implement handler for deleting frpc proxies with proper validation and error handling. The endpoint checks user permissions, validates input, removes the proxy configuration from the instance file, and returns appropriate responses.
Add a default handler for invalid routes that logs the request details and returns a 404 response. This improves error handling and user experience by providing clear feedback for invalid paths.
- 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 WebSocket endpoint for streaming logs to clients
- Add log broadcaster to manage client connections and history
- Update documentation with new WebSocket API details
- Include gorilla/websocket dependency for WebSocket support
- 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
Add new endpoints to expose system status and software information:
- /system/getStatus returns current system status (online/offline)
- /system/getSoftwareInfo returns software version and build details
Update API documentation to include new endpoints
- 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
- Move token-related functions from auth.go to new session.go
- Add session tracking with expiration and cleanup
- Implement session list API endpoint
- Update login/logout handlers to use session system
- Add hourly cleanup of expired tokens and sessions
Extract service management functions from frpAct.go to new os.go file for better code organization and maintainability. Also update README.md to document supported platforms.
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
- Implement LogoutHandler to handle user logout requests
- Add DeleteTokenInfo and GetUserIDFromToken functions to auth module
- Update README.md with logout endpoint documentation
- Implement LogoutHandler to handle user logout requests
- Add DeleteTokenInfo and GetUserIDFromToken functions to auth module
- Update README.md with logout endpoint documentation
- Add bootServiceError field to system config modify response when boot service operations fail
- Include instanceID in list instances response
- Update error message for unknown modify type
- Document bootServiceError behavior in README
- 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.
- Introduce FrpcProxyInfo struct to support proxy configuration
- Add logging statements to instance creation, deletion, and modification handlers
- Implement addFrpcProxy function for generating proxy configuration