fix(agent): 同步更新 transport URL 并发布 v1.4.2

This commit is contained in:
2026-09-28 14:24:37 +08:00
parent fac9234e4d
commit 4a29bcb249
9 changed files with 51 additions and 25 deletions
+3 -3
View File
@@ -279,14 +279,14 @@ func (s *Store) AgentToken(ctx context.Context, id int64) (string, error) {
return token, err
}
func (s *Store) SetAgentTransport(ctx context.Context, id int64, transport string, localPort int, tlsPin, listenAddr, state, lastError string) error {
func (s *Store) SetAgentTransport(ctx context.Context, id int64, agentURL, transport string, localPort int, tlsPin, listenAddr, state, lastError string) error {
result, err := s.db.ExecContext(ctx, `
UPDATE frp_servers
SET agent_transport = ?, agent_local_port = ?, agent_tls_pin = ?,
SET agent_url = ?, agent_transport = ?, agent_local_port = ?, agent_tls_pin = ?,
agent_listen_addr = ?, agent_transport_state = ?, agent_transport_error = ?,
updated_at = datetime('now')
WHERE id = ?
`, transport, localPort, tlsPin, listenAddr, state, lastError, id)
`, agentURL, transport, localPort, tlsPin, listenAddr, state, lastError, id)
if err != nil {
return err
}