Commit Graph

34 Commits

Author SHA1 Message Date
541f881825 feat(windows): add windows boot service support
- Add registry-based boot service creation for Windows
- Update detectInitSystem to handle Windows platform
2026-03-04 22:17:56 +08:00
29011c2fb4 refactor(service): move boot service functions to os.go
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.
2026-03-04 13:46:55 +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
d9c8695f78 docs: add GNU GPL v3 license file 2026-03-03 23:25:53 +08:00
0f3bf18fc1 docs: move API documentation to separate file
Restructure documentation by moving API details from README.md to docs/api.md
Update README.md to reference the new API documentation location
2026-03-03 23:16:40 +08:00
1bfeeff2b3 Merge branch 'main' of https://gitea.nanami.tech/Super-frpc/backend 2026-03-03 23:07:01 +08:00
62917633c4 feat(auth): add logout functionality
- Implement LogoutHandler to handle user logout requests
- Add DeleteTokenInfo and GetUserIDFromToken functions to auth module
- Update README.md with logout endpoint documentation
2026-03-03 23:06:36 +08:00
2aba81eb29 feat(auth): add logout functionality
- Implement LogoutHandler to handle user logout requests
- Add DeleteTokenInfo and GetUserIDFromToken functions to auth module
- Update README.md with logout endpoint documentation
2026-03-03 23:02:52 +08:00
9e6e6f8b19 refactor: reorganize handler files and rename frpc.go to frpAct.go
Move user authentication handlers to userAct.go and frpc instance handlers to frpAct.go
Remove handlers from handlers.go and clean up file structure
2026-03-03 22:43:27 +08:00
f5e6120807 feat(frpc): improve boot service error handling and response
- 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
2026-03-03 22:31:39 +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
9be737ae56 feat: add FrpcProxyInfo struct and logging enhancements
- Introduce FrpcProxyInfo struct to support proxy configuration
- Add logging statements to instance creation, deletion, and modification handlers
- Implement addFrpcProxy function for generating proxy configuration
2026-03-02 13:20:38 +08:00
461f2fc775 temp 2026-02-28 23:00:57 +08:00
686c3dcd4e refactor: consolidate debug flag and update gitignore
- Rename debugMode to isDebug for consistency across codebase
- Move debug flag check in ValidateTimeStamp to match other validations
- Add database.db to gitignore and remove unused config file
- Update README.md to clarify user registration rules
2026-02-28 15:48:01 +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
aa70e7c0f0 refactor(api): simplify instance management endpoints
- Change delete endpoint to use request body instead of path parameter
- Modify endpoint now takes field as path parameter and instance name in body
- Update README to reflect API changes
- Remove unused description field from software info
- Fix error message in auth token lookup
2026-02-28 11:55:52 +08:00
e3b3a3aa98 feat(logging): add detailed logging throughout application components
- Implement logging in router setup, auth handlers, and frpc operations
- Add SoftwareInfo struct for version tracking and logging
- Enhance error messages with more context and logging
- Replace direct error returns with formatted error logging
- Add debug logs for token operations and request validations
2026-02-27 23:44:41 +08:00
72eb90957c refactor(api): switch to header-based auth for GET requests
- Replace body parsing with header validation for GET endpoints
- Update router to properly handle GET vs POST requests
- Add new ValidateRequestWithHeader function
- Update README to document header requirements
2026-02-27 23:17:18 +08:00
af5af2a04f fix(auth): skip timestamp validation in debug mode
Modify ValidateTimeStamp to bypass validation when in debug mode. Also update request validation to make timestamp optional in debug mode while maintaining security checks in production.
2026-02-27 23:13:15 +08:00
1eb9351604 refactor(auth): extract timestamp validation to separate function
Move timestamp validation logic from handlers to ValidateTimeStamp function in auth.go to avoid code duplication and improve maintainability
2026-02-27 21:21:18 +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
cff81a0423 chore: ignore frp_client binary in gitignore 2026-02-27 21:04:56 +08:00
8f711a3823 feat(handlers): add duplicate login check and improve request handling
refactor: move postLog package to root directory and enhance logging
fix(frpc): improve request parsing and type handling for instance creation
chore: update config paths and enable debug mode
2026-02-27 21:04:08 +08:00
5020d61780 chore: ignore binary files for super-frpc 2026-02-26 11:57:47 +08:00
4e472e0145 refactor(logger): add individual log module 2026-02-26 11:56:35 +08:00
d76e28a358 refactor(routor): split routor from main.go 2026-02-26 09:24:33 +08:00
275e08a1a5 refactor(handlers): extract request validation logic to new function
Extract the request validation logic from ValidateRequest into a new ValidateRequestWithBody function to allow passing pre-read request bodies. Update all handler functions to use the new validation function for consistency and to avoid duplicate body reading.
2026-02-23 19:56:16 +08:00
39a4479203 docs: update README with detailed project documentation
Add comprehensive documentation including features, configuration, build/run instructions, API details, user permissions, and security requirements. The README now serves as complete project reference for users and developers.
2026-02-23 19:36:45 +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
6bf143e69e Initial commit 2026-02-22 00:31:39 +08:00