config

package
v1.32.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtoGRPC  = "grpc"
	ProtoQUIC  = "quic"
	ProtoHTTP2 = "http2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenSOCKS string         `json:"listenSOCKS,omitempty"`
	ListenHTTP  string         `json:"listenHTTP,omitempty"`
	Listen      []TunnelServer `json:"listen,omitempty"`
	Proxy       []TunnelClient `json:"proxy,omitempty"`
	Rules       []string       `json:"rules,omitempty"`
}

func Generate added in v1.26.3

func Generate(host string) (cli, srv Config, err error)

Generate generates a pair of client and server configuration for the given host

type TunnelClient added in v1.26.0

type TunnelClient struct {
	Name string `json:"name"`
	TunnelServer
}

type TunnelServer added in v1.31.0

type TunnelServer struct {
	Proto   string `json:"proto"`
	Address string `json:"address"`

	// not required when using mutual TLS
	Username string `json:"username"`
	Password string `json:"password"`

	CertFile string   `json:"certFile,omitempty"`
	CertPEM  []string `json:"certPEM,omitempty"`
	KeyFile  string   `json:"keyFile,omitempty"`
	KeyPEM   []string `json:"keyPEM,omitempty"`
	CAFile   string   `json:"caFile,omitempty"`
	CAPEM    []string `json:"caPEM,omitempty"`
}

func (TunnelServer) GetCAPEM added in v1.31.0

func (t TunnelServer) GetCAPEM() ([]byte, error)

func (TunnelServer) GetCertPEM added in v1.31.0

func (t TunnelServer) GetCertPEM() ([]byte, error)

func (TunnelServer) GetKeyPEM added in v1.31.0

func (t TunnelServer) GetKeyPEM() ([]byte, error)

Jump to

Keyboard shortcuts

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