From 2bd0c92428d5fe90e2fb27b67bab4f11a4e91926 Mon Sep 17 00:00:00 2001 From: abhishek9686 Date: Tue, 1 Oct 2024 17:46:18 +0400 Subject: [PATCH] Revert "ipv6 fix for mobile apps" This reverts commit dc84d90be260d0a000fd4575e65e93c98b9279be. --- pro/controllers/users.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pro/controllers/users.go b/pro/controllers/users.go index bff52acfa..d5ea4ddb0 100644 --- a/pro/controllers/users.go +++ b/pro/controllers/users.go @@ -5,7 +5,6 @@ import ( "encoding/json" "errors" "fmt" - "net" "net/http" "net/url" "strings" @@ -1092,9 +1091,6 @@ func getUserRemoteAccessGwsV1(w http.ResponseWriter, r *http.Request) { } gws := userGws[node.Network] - if net.ParseIP(extClient.IngressGatewayEndpoint).To16() != nil { - extClient.IngressGatewayEndpoint = fmt.Sprintf("[%s]", extClient.IngressGatewayEndpoint) - } extClient.AllowedIPs = logic.GetExtclientAllowedIPs(extClient) gws = append(gws, models.UserRemoteGws{ GwID: node.ID.String(), @@ -1208,15 +1204,11 @@ func getAllowedRagEndpoints(ragNode *models.Node, ragHost *models.Host) []string endpoints = append(endpoints, ragHost.EndpointIP.String()) } if len(ragHost.EndpointIPv6) > 0 { - endpoints = append(endpoints, fmt.Sprintf("[%s]", ragHost.EndpointIPv6.String())) + endpoints = append(endpoints, ragHost.EndpointIPv6.String()) } if servercfg.IsPro { for _, ip := range ragNode.AdditionalRagIps { - if ip.To16() != nil { - endpoints = append(endpoints, fmt.Sprintf("[%s]", ip.String())) - } else { - endpoints = append(endpoints, ip.String()) - } + endpoints = append(endpoints, ip.String()) } } return endpoints