diff --git a/api/server.go b/api/server.go index dfe4d7b3..8bcbfd00 100644 --- a/api/server.go +++ b/api/server.go @@ -256,13 +256,14 @@ func (s *Server) handleGetServerIP(c *gin.Context) { }) } -// getPublicIPFromAPI Get public IP via third-party API +// getPublicIPFromAPI Get public IP via third-party API (IPv4 only) func getPublicIPFromAPI() string { - // Try multiple public IP query services + // Try multiple public IP query services (IPv4-only endpoints) services := []string{ - "https://api.ipify.org?format=text", - "https://icanhazip.com", - "https://ifconfig.me", + "https://api4.ipify.org?format=text", // IPv4 only + "https://ipv4.icanhazip.com", // IPv4 only + "https://v4.ident.me", // IPv4 only + "https://api.ipify.org?format=text", // May return IPv4 or IPv6 } client := &http.Client{ @@ -284,8 +285,9 @@ func getPublicIPFromAPI() string { } ip := strings.TrimSpace(string(body[:n])) - // Verify if it's a valid IP address - if net.ParseIP(ip) != nil { + parsedIP := net.ParseIP(ip) + // Verify if it's a valid IPv4 address (not containing ":") + if parsedIP != nil && parsedIP.To4() != nil { return ip } } diff --git a/web/src/components/AITradersPage.tsx b/web/src/components/AITradersPage.tsx index f30f254c..2987ab1f 100644 --- a/web/src/components/AITradersPage.tsx +++ b/web/src/components/AITradersPage.tsx @@ -1384,6 +1384,99 @@ export function AITradersPage({ onTraderSelect }: AITradersPageProps) { ) } +// Step indicator component for Model Config +function ModelStepIndicator({ currentStep, labels }: { currentStep: number; labels: string[] }) { + return ( +