cli

package
v0.0.0-...-ab6dc77 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfig

func GetDefaultConfig() string

func Main

func Main(configPtr *string, printDefaultConfigPtr *bool)

Types

type Config

type Config struct {
	Tunnel struct {
		MTU                      int             `yaml:"mtu"`
		Subnet                   string          `yaml:"subnet"`
		Mode                     string          `yaml:"mode"`
		AllowClientToClient      bool            `yaml:"allow-client-to-client"`
		AllowIPSpoofing          bool            `yaml:"allow-ip-spoofing"`
		AllowUnknownEtherTypes   bool            `yaml:"allow-unknown-ether-types"`
		AllowMACChanging         bool            `yaml:"allow-mac-changing"`
		AllowedMACsPerConnection int             `yaml:"allowed-macs-per-connection"`
		Features                 features.Config `yaml:"features"`
		IPConfig                 struct {
			Local  bool `yaml:"local"`
			Remote bool `yaml:"remote"`
		} `yaml:"ip-config"`
		Ping shared_cli.PingConfig `yaml:"ping"`
	} `yaml:"tunnel"`

	Interface iface.InterfaceConfig `yaml:"interface"`

	Scripts shared.EventConfig `yaml:"scripts"`

	Server struct {
		Listen      string      `yaml:"listen"`
		EnableHTTP3 bool        `yaml:"enable-http3"`
		Headers     http.Header `yaml:"headers"`
		TLS         struct {
			ClientCA    string               `yaml:"client-ca"`
			Certificate string               `yaml:"certificate"`
			Key         string               `yaml:"key"`
			Config      shared_cli.TLSConfig `yaml:"config"`
		} `yaml:"tls"`
		Authenticator struct {
			Type   string `yaml:"type"`
			Config string `yaml:"config"`
		} `yaml:"authenticator"`
		PreauthorizeSecret        string `yaml:"preauthorize-secret"`
		MaxConnectionsPerUser     int    `yaml:"max-connections-per-user"`
		MaxConnectionsPerUserMode string `yaml:"max-connections-per-user-mode"`
		WebsiteDirectory          string `yaml:"website-directory"`
		API                       struct {
			Enabled bool     `yaml:"enabled"`
			Users   []string `yaml:"users"`
		} `yaml:"api"`
	}
}

func Load

func Load(file string) (*Config, error)

Jump to

Keyboard shortcuts

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