Skip to content

Commit

Permalink
Revert "ipv6 fix for mobile apps"
Browse files Browse the repository at this point in the history
This reverts commit dc84d90.
  • Loading branch information
abhishek9686 committed Oct 1, 2024
1 parent 0f0b5d6 commit 2bd0c92
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pro/controllers/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"fmt"
"net"
"net/http"
"net/url"
"strings"
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2bd0c92

Please sign in to comment.