Documentation
¶
Index ¶
- Constants
- func CheckProfileExists(license string) bool
- func LoadOrCreateIdentity(license string) error
- func MergeMaps(maps ...map[string]string) map[string]string
- func RandomIPFromRange(cidr string) (net.IP, error)
- func UpdatePath(path string)
- type AccountData
- type ConfigurationData
- type Dialer
- type Key
- type SNICurveExtension
- type SNIExtension
Constants ¶
const KeyLen = 32 // wgh.KeyLen
KeyLen is the expected key length for a WireGuard key.
Variables ¶
This section is empty.
Functions ¶
func CheckProfileExists ¶
func LoadOrCreateIdentity ¶
func UpdatePath ¶
func UpdatePath(path string)
Types ¶
type AccountData ¶
type ConfigurationData ¶
type ConfigurationData struct { LocalAddressIPv4 string `json:"local_address_ipv4"` LocalAddressIPv6 string `json:"local_address_ipv6"` EndpointAddressHost string `json:"endpoint_address_host"` EndpointAddressIPv4 string `json:"endpoint_address_ipv4"` EndpointAddressIPv6 string `json:"endpoint_address_ipv6"` EndpointPublicKey string `json:"endpoint_public_key"` WarpEnabled bool `json:"warp_enabled"` AccountType string `json:"account_type"` WarpPlusEnabled bool `json:"warp_plus_enabled"` LicenseKeyUpdated bool `json:"license_key_updated"` }
type Dialer ¶
type Dialer struct { }
Dialer is a struct that holds various options for custom dialing.
type Key ¶
A Key is a public, private, or pre-shared secret key. The Key constructor functions in this package can be used to create Keys suitable for each of these applications.
func GenerateKey ¶
GenerateKey generates a Key suitable for use as a pre-shared secret key from a cryptographically safe source.
The output Key should not be used as a private key; use GeneratePrivateKey instead.
func GeneratePrivateKey ¶
GeneratePrivateKey generates a Key suitable for use as a private key from a cryptographically safe source.
func NewKey ¶
NewKey creates a Key from an existing byte slice. The byte slice must be exactly 32 bytes in length.
type SNICurveExtension ¶
type SNICurveExtension struct { *tls.GenericExtension SNICurveLen int WillPad bool // set false to disable extension }
SNICurveExtension implements SNICurve (0x15) extension
func (*SNICurveExtension) Len ¶
func (e *SNICurveExtension) Len() int
Len returns the length of the SNICurveExtension.
type SNIExtension ¶
type SNIExtension struct { *tls.GenericExtension ServerName string // not an array because go crypto/tls doesn't support multiple SNIs }
SNIExtension implements server_name (0)
func (*SNIExtension) Len ¶
func (e *SNIExtension) Len() int
Len returns the length of the SNIExtension.