Skip to content

Commit

Permalink
fix(custom): do not set server name if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed May 1, 2024
1 parent 7e0738d commit b25ee21
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/provider/custom/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b25ee21

Please sign in to comment.