configuration

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Logging    LoggingConfig
	Interfaces []InterfaceConfig
	Log        *log.Entry `yaml:"-" json:"-"`
	// contains filtered or unexported fields
}

func New

func New(path string, jsonFormat bool) (*Configuration, error)

func (*Configuration) Read

func (c *Configuration) Read() error

type InterfaceConfig

type InterfaceConfig struct {
	Name           string
	Bind           string
	BindIP         net.IP `yaml:"-" json:"-"`
	BindPort       uint16 `yaml:"-" json:"-"`
	Proxy          string
	ProxyIP        net.IP      `yaml:"-" json:"-"`
	ProxyPort      uint16      `yaml:"-" json:"-"`
	EnableProxy    bool        `yaml:"-" json:"-"`
	NetworkStrings []string    `yaml:"networks" json:"networks"`
	Networks       []net.IPNet `yaml:"-" json:"-"`
	Regexp         []string
	ReverseProxy   map[string]ReverseConfig `yaml:"reverse_proxy" json:"reverse_proxy"`
}

type LoggingConfig

type LoggingConfig struct {
	File  string `yaml:"file" json:"log"`
	Level string
}

type ReverseConfig

type ReverseConfig struct {
	Destination     string
	DestinationIp   net.IP `yaml:"-" json:"-"`
	DestinationPort uint16 `yaml:"-" json:"-"`
	SourceInterface string `yaml:"source_interface" json:"source_interface"`
	SourceIP        net.IP `yaml:"-" json:"-"`
}

Jump to

Keyboard shortcuts

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