chore(portforward): remove PIA dependency on storage package

This commit is contained in:
Quentin McGaw
2024-05-02 09:17:30 +00:00
parent e0a977cf83
commit 6dd27e53d4
18 changed files with 63 additions and 98 deletions

View File

@@ -16,17 +16,20 @@ type Connection struct {
// Hostname is used for IPVanish, IVPN, Privado
// and Windscribe for TLS verification.
Hostname string `json:"hostname"`
// ServerName is used for PIA for port forwarding
ServerName string `json:"server_name,omitempty"`
// PubKey is the public key of the VPN server,
// used only for Wireguard.
PubKey string `json:"pubkey"`
// ServerName is used for PIA for port forwarding
ServerName string `json:"server_name,omitempty"`
// PortForward is used for PIA for port forwarding
PortForward bool `json:"port_forward"`
}
func (c *Connection) Equal(other Connection) bool {
return c.IP.Compare(other.IP) == 0 && c.Port == other.Port &&
c.Protocol == other.Protocol && c.Hostname == other.Hostname &&
c.ServerName == other.ServerName && c.PubKey == other.PubKey
c.PubKey == other.PubKey && c.ServerName == other.ServerName &&
c.PortForward == other.PortForward
}
// UpdateEmptyWith updates each field of the connection where the