refactor(frpc): restructure instance management and config handling

- 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
This commit is contained in:
2026-03-25 20:00:34 +08:00
parent da729b44ff
commit 92a0e24db7
8 changed files with 491 additions and 281 deletions

2
go.mod
View File

@@ -5,7 +5,6 @@ go 1.24.0
require (
github.com/BurntSushi/toml v1.4.0
github.com/gorilla/websocket v1.5.3
golang.org/x/sys v0.37.0
modernc.org/sqlite v1.46.1
)
@@ -16,6 +15,7 @@ require (
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect
golang.org/x/sys v0.37.0 // indirect
modernc.org/libc v1.67.6 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect