xtls

package
v0.87.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: BSD-3-Clause Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyCert = errors.New("both CA cert and cert key must be set")
)

Functions

This section is empty.

Types

type ConfigBuilder

type ConfigBuilder struct {
	// contains filtered or unexported fields
}

func NewConfigBuilder

func NewConfigBuilder() ConfigBuilder

NewConfigBuilder returns new TLSConfigBuilder builder. It helps to set up the tls config.

func (ConfigBuilder) AppendCARoot

func (b ConfigBuilder) AppendCARoot(caCert string) error

AppendCARoot appends certificates to the tls config. If caCert is a path to a PEM encoded file, it reads and appends the content to the tls config. If RootCAs is nil, TLS uses the host's root CA set.

func (ConfigBuilder) AppendX509KeyPair

func (b ConfigBuilder) AppendX509KeyPair(caCert, certKey string) error

AppendX509KeyPair appends CA cert and key to the tls config. if either is a path to an encoded PEM file, the contents of the file are read first and then the contents are added to the tls config.

func (ConfigBuilder) Build

func (b ConfigBuilder) Build() *tls.Config

Build returns built tls config.

func (ConfigBuilder) SetSkipVerify added in v0.19.2

func (b ConfigBuilder) SetSkipVerify(val bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL