chore(internal/providers): simplify OpenVPN config building
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user