Versions in this module Expand all Collapse all v0 v0.0.7 Oct 22, 2024 v0.0.6 Apr 24, 2024 Changes in this version + const CompressionEmpty + const CompressionLZONo + const CompressionStub + const ProtoTCP + const ProtoUDP + var ErrBadConfig = errors.New("openvpn: bad config") + var SupportedAuth = []string + var SupportedCiphers = []string + type Compression string + type Config struct + func NewConfig(options ...Option) *Config + func (c *Config) Logger() model.Logger + func (c *Config) OpenVPNOptions() *OpenVPNOptions + func (c *Config) Remote() *Remote + func (c *Config) Tracer() model.HandshakeTracer + type OpenVPNOptions struct + Auth string + CA []byte + CAPath string + Cert []byte + CertPath string + Cipher string + Compress Compression + Key []byte + KeyPath string + Password string + Port string + Proto Proto + ProxyOBFS4 string + Remote string + TLSMaxVer string + Username string + func ReadConfigFile(filePath string) (*OpenVPNOptions, error) + func (o *OpenVPNOptions) HasAuthInfo() bool + func (o *OpenVPNOptions) ServerOptionsString() string + func (o *OpenVPNOptions) ShouldLoadCertsFromPath() bool + type Option func(config *Config) + func WithConfigFile(configPath string) Option + func WithHandshakeTracer(tracer model.HandshakeTracer) Option + func WithLogger(logger model.Logger) Option + func WithOpenVPNOptions(openvpnOptions *OpenVPNOptions) Option + type Proto string + func (p Proto) String() string + type Remote struct + Endpoint string + IPAddr string + Protocol string