Documentation ¶
Index ¶
- Variables
- func BuildWireguardSettings(connection models.Connection, userSettings settings.Wireguard, ...) (settings wireguard.Settings)
- func CipherLines(ciphers []string) (lines []string)
- func GetConnection(provider string, storage Storage, selection settings.ServerSelection, ...) (connection models.Connection, err error)
- func OpenVPNConfig(provider OpenVPNProviderSettings, connection models.Connection, ...) []string
- func WrapOpenvpnCA(certificate string) (lines []string)
- func WrapOpenvpnCRLVerify(x509CRL string) (lines []string)
- func WrapOpenvpnCert(clientCertificate string) (lines []string)
- func WrapOpenvpnEncryptedKey(encryptedKey string) (lines []string)
- func WrapOpenvpnKey(clientKey string) (lines []string)
- func WrapOpenvpnRSAKey(rsaPrivateKey string) (lines []string)
- func WrapOpenvpnTLSAuth(staticKeyV1 string) (lines []string)
- func WrapOpenvpnTLSCrypt(staticKeyV1 string) (lines []string)
- type ConnectionDefaults
- type Logger
- type NoFetcher
- type OpenVPNProviderSettings
- type PortForwardObjects
- type Routing
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFetcherNotSupported = errors.New("fetching of servers is not supported")
View Source
var ErrNoConnectionToPickFrom = errors.New("no connection to pick from")
Functions ¶
func BuildWireguardSettings ¶
func CipherLines ¶
func GetConnection ¶
func GetConnection(provider string, storage Storage, selection settings.ServerSelection, defaults ConnectionDefaults, ipv6Supported bool, randSource rand.Source) ( connection models.Connection, err error, )
func OpenVPNConfig ¶
func OpenVPNConfig(provider OpenVPNProviderSettings, connection models.Connection, settings settings.OpenVPN, ipv6Supported bool, ) []string
func WrapOpenvpnCA ¶
func WrapOpenvpnCRLVerify ¶
func WrapOpenvpnCert ¶
func WrapOpenvpnEncryptedKey ¶
func WrapOpenvpnKey ¶
func WrapOpenvpnRSAKey ¶
func WrapOpenvpnTLSAuth ¶
func WrapOpenvpnTLSCrypt ¶
Types ¶
type ConnectionDefaults ¶
func NewConnectionDefaults ¶
func NewConnectionDefaults(openvpnTCPPort, openvpnUDPPort, wireguardPort uint16, ) ConnectionDefaults
type NoFetcher ¶
type NoFetcher struct {
// contains filtered or unexported fields
}
func NewNoFetcher ¶
type OpenVPNProviderSettings ¶
type OpenVPNProviderSettings struct { Ping int RemoteCertTLS bool Ciphers []string Auth string CAs []string CRLVerify string Cert string Key string RSAKey string TLSAuth string TLSCrypt string MssFix uint16 FastIO bool AuthUserPass bool AuthToken bool Fragment uint16 SndBuf uint32 RcvBuf uint32 // VerifyX509Name can be set to a custom name to verify against. // Note VerifyX509Type has to be set for it to be verified. // If it is left unset, the code will deduce a name to verify against // using the connection hostname and according to VerifyX509Type. VerifyX509Name string // VerifyX509Type can be "name-prefix", "name" VerifyX509Type string TLSCipher string TunMTU uint16 TunMTUExtra uint16 RenegDisabled bool RenegSec uint16 KeyDirection string SetEnv map[string]string ExtraLines []string UDPLines []string IPv6Lines []string }
type PortForwardObjects ¶
type PortForwardObjects struct { // Logger is a logger, used by both Private Internet Access and ProtonVPN. Logger Logger // Gateway is the VPN gateway IP address, used by Private Internet Access // and ProtonVPN. Gateway netip.Addr // InternalIP is the VPN internal IP address assigned, used by Perfect Privacy. InternalIP netip.Addr // Client is used to query the VPN gateway for Private Internet Access. Client *http.Client // ServerName is used by Private Internet Access for port forwarding. ServerName string // CanPortForward is used by Private Internet Access for port forwarding. CanPortForward bool // Username is used by Private Internet Access for port forwarding. Username string // Password is used by Private Internet Access for port forwarding. Password string }
PortForwardObjects contains fields that may or may not need to be set depending on the port forwarding provider code.
Click to show internal directories.
Click to hide internal directories.