Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions apps/console/internal/app/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apps/console/internal/app/graph/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ input CoreSearchVPNDevices {
type Query {
core_checkNameAvailability(envName: String, msvcName: String ,resType: ConsoleResType!, name: String!): ConsoleCheckNameAvailabilityOutput! @isLoggedIn @hasAccount

core_getDNSHostSuffix: String!

core_listEnvironments(search: SearchEnvironments, pq: CursorPaginationIn): EnvironmentPaginatedRecords @isLoggedInAndVerified @hasAccount
core_getEnvironment(name: String!): Environment @isLoggedInAndVerified @hasAccount
core_resyncEnvironment(name: String!): Boolean! @isLoggedInAndVerified @hasAccount
Expand Down
5 changes: 5 additions & 0 deletions apps/console/internal/app/graph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (d *domain) listGlobalVPNConnections(ctx InfraContext, vpnName string) ([]*

func hashPeer(peer networkingv1.Peer) string {
sort.Strings(peer.AllowedIPs)
return fmt.Sprintf("%x", md5.Sum([]byte(fmt.Sprintf("%s:%s:%s:%s:%s", peer.IP, peer.PublicKey, fn.DefaultIfNil(peer.PublicEndpoint), fn.DefaultIfNil(peer.DNSSuffix), strings.Join(peer.AllowedIPs, ",")))))
return fmt.Sprintf("%x", md5.Sum([]byte(fmt.Sprintf("%s:%s:%s:%s:%s", fn.DefaultIfNil(peer.IP, ""), peer.PublicKey, fn.DefaultIfNil(peer.PublicEndpoint), fn.DefaultIfNil(peer.DNSSuffix), strings.Join(peer.AllowedIPs, ",")))))
}

func hashPeers(peers []networkingv1.Peer) string {
Expand Down
5 changes: 4 additions & 1 deletion apps/infra/internal/domain/global-vpn-devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ func (d *domain) buildPeerFromGlobalVPNDevice(_ InfraContext, gvpn *entities.Glo

if device.IPAddr == gvpn.KloudliteGatewayDevice.IPAddr {
// FIXME: this should not be used
allowedIPs = append(allowedIPs, gvpn.NonClusterUseAllowedIPs...)
// allowedIPs = append(allowedIPs, gvpn.NonClusterUseAllowedIPs...)

// NOTE: i don't even remember what is the use case of non-cluster-use allowed IPs
allowedIPs = append(allowedIPs, "100.64.0.0/10")
// allowedIPs = append(allowedIPs, privateCIDRs...)
}

Expand Down