feat(rpc): 设置默认RPC地址为本地回环

修复RPC客户端连接问题,将默认服务器地址设置为127.0.0.1以确保本地连接正常

refactor(qqwry): 优化IP地址查询功能

移除不必要的正则表达式依赖,重构IP地址查询逻辑,提高代码性能和可维护性

fix(server): 保存确定的端口到配置中

确保服务器端口在确定后正确保存到配置中,避免端口配置丢失
This commit is contained in:
2026-01-08 05:15:10 +08:00
parent 56fe334045
commit 4d0464c76b
8 changed files with 116 additions and 164 deletions

View File

@@ -86,7 +86,7 @@ func StartClient(id, port uint16, callback any) *struct {
} {
var rpcaddr, _ = service.NewBaseSysParamService().DataByKey(context.Background(), "server_ip")
//rpcaddr = "127.0.0.1"
rpcaddr = "127.0.0.1"
closer1, err := jsonrpc.NewMergeClient(context.Background(),
"ws://"+rpcaddr+":"+rpcport, "", []interface{}{
&RPCClient,