feat(agent): 完成 HTTPS 自动端口、证书轮换与防火墙辅助并发布 v1.5.0

This commit is contained in:
2026-09-28 15:19:51 +08:00
parent dfce843b50
commit faf43293e5
29 changed files with 1018 additions and 132 deletions
+42 -38
View File
@@ -84,44 +84,48 @@ type DownloadTask struct {
}
type Server struct {
ID int64 `json:"id"`
Name string `json:"name"`
AgentURL string `json:"agent_url,omitempty"`
AgentTransport string `json:"agent_transport"`
AgentLocalPort int `json:"agent_local_port,omitempty"`
AgentTLSPin string `json:"agent_tls_pin,omitempty"`
AgentListenAddr string `json:"agent_listen_addr,omitempty"`
AgentTransportState string `json:"agent_transport_state"`
AgentTransportError string `json:"agent_transport_error,omitempty"`
AgentConfigured bool `json:"agent_configured"`
SSHConfigured bool `json:"ssh_configured"`
MgmtEnabled bool `json:"mgmt_enabled"`
SSHHost string `json:"ssh_host,omitempty"`
SSHPort int `json:"ssh_port,omitempty"`
SSHUser string `json:"ssh_user,omitempty"`
SSHAuth string `json:"ssh_auth,omitempty"`
ServerAddr string `json:"server_addr"`
ServerPort int `json:"server_port"`
TLS bool `json:"tls_enabled"`
TLSServerName string `json:"tls_server_name,omitempty"`
Enabled bool `json:"enabled"`
HasToken bool `json:"has_token"`
HasOIDCSecret bool `json:"has_oidc_client_secret"`
DashboardHasPwd bool `json:"dashboard_has_pwd"`
Options ServerOptions `json:"options"`
BootStatus string `json:"boot_status"`
DesiredState string `json:"desired_state"`
ProcessState string `json:"process_state"`
ConnectionState string `json:"connection_state"`
StateSource string `json:"state_source"`
ProcessPID int `json:"process_pid,omitempty"`
ExitCode int `json:"exit_code,omitempty"`
LastConnectedAt string `json:"last_connected_at,omitempty"`
LastDisconnectedAt string `json:"last_disconnected_at,omitempty"`
LastError string `json:"last_error,omitempty"`
LastStartedAt string `json:"last_started_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ID int64 `json:"id"`
Name string `json:"name"`
AgentURL string `json:"agent_url,omitempty"`
AgentTransport string `json:"agent_transport"`
AgentLocalPort int `json:"agent_local_port,omitempty"`
AgentTLSPin string `json:"agent_tls_pin,omitempty"`
AgentTLSPinPrev string `json:"agent_tls_pin_prev,omitempty"`
AgentTLSPinPrevUntil string `json:"agent_tls_pin_prev_until,omitempty"`
AgentTLSNotAfter string `json:"agent_tls_not_after,omitempty"`
AgentFirewallState string `json:"agent_firewall_state,omitempty"`
AgentListenAddr string `json:"agent_listen_addr,omitempty"`
AgentTransportState string `json:"agent_transport_state"`
AgentTransportError string `json:"agent_transport_error,omitempty"`
AgentConfigured bool `json:"agent_configured"`
SSHConfigured bool `json:"ssh_configured"`
MgmtEnabled bool `json:"mgmt_enabled"`
SSHHost string `json:"ssh_host,omitempty"`
SSHPort int `json:"ssh_port,omitempty"`
SSHUser string `json:"ssh_user,omitempty"`
SSHAuth string `json:"ssh_auth,omitempty"`
ServerAddr string `json:"server_addr"`
ServerPort int `json:"server_port"`
TLS bool `json:"tls_enabled"`
TLSServerName string `json:"tls_server_name,omitempty"`
Enabled bool `json:"enabled"`
HasToken bool `json:"has_token"`
HasOIDCSecret bool `json:"has_oidc_client_secret"`
DashboardHasPwd bool `json:"dashboard_has_pwd"`
Options ServerOptions `json:"options"`
BootStatus string `json:"boot_status"`
DesiredState string `json:"desired_state"`
ProcessState string `json:"process_state"`
ConnectionState string `json:"connection_state"`
StateSource string `json:"state_source"`
ProcessPID int `json:"process_pid,omitempty"`
ExitCode int `json:"exit_code,omitempty"`
LastConnectedAt string `json:"last_connected_at,omitempty"`
LastDisconnectedAt string `json:"last_disconnected_at,omitempty"`
LastError string `json:"last_error,omitempty"`
LastStartedAt string `json:"last_started_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type ServerRuntimeStatus struct {