chore(internal/providers): simplify OpenVPN config building

This commit is contained in:
Quentin McGaw
2022-04-25 07:57:45 +00:00
parent 4bde50fb3a
commit 7ff14a356c
27 changed files with 596 additions and 1438 deletions

View File

@@ -1,7 +1,6 @@
package models
import (
"fmt"
"net"
)
@@ -28,14 +27,6 @@ func (c *Connection) Equal(other Connection) bool {
c.PubKey == other.PubKey
}
func (c Connection) OpenVPNRemoteLine() (line string) {
return "remote " + c.IP.String() + " " + fmt.Sprint(c.Port)
}
func (c Connection) OpenVPNProtoLine() (line string) {
return "proto " + c.Protocol
}
// UpdateEmptyWith updates each field of the connection where the
// value is not set using the value given as arguments.
func (c *Connection) UpdateEmptyWith(ip net.IP, port uint16, protocol string) {