From b25ee21e3e05f12c3b43930dacfc0e286c24da54 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Wed, 1 May 2024 19:35:40 +0000 Subject: [PATCH] fix(custom): do not set server name if it does not exist --- internal/provider/custom/connection.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/provider/custom/connection.go b/internal/provider/custom/connection.go index 6985940f..088d3bed 100644 --- a/internal/provider/custom/connection.go +++ b/internal/provider/custom/connection.go @@ -52,12 +52,11 @@ func getOpenVPNConnection(extractor Extractor, func getWireguardConnection(selection settings.ServerSelection) ( connection models.Connection) { connection = models.Connection{ - Type: vpn.Wireguard, - IP: selection.Wireguard.EndpointIP, - Port: *selection.Wireguard.EndpointPort, - Protocol: constants.UDP, - PubKey: selection.Wireguard.PublicKey, - ServerName: selection.Names[0], + Type: vpn.Wireguard, + IP: selection.Wireguard.EndpointIP, + Port: *selection.Wireguard.EndpointPort, + Protocol: constants.UDP, + PubKey: selection.Wireguard.PublicKey, } if len(selection.Names) > 0 { // Set the server name for PIA port forwarding code used