config

package
v0.0.6-0...-3248fdd Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(configFile string)

ReadConfig read config from file

Types

type ACLConfig

type ACLConfig struct {
	WhiteListMode bool
	AllowLocal    bool

	PortsList []string
	HostsList []string
}

ACLConfig is prototype for access control

type Config

type Config struct {
	Listen string

	TLS      TLSConfig
	Log      LogConfig
	Fallback FallbackConfig
	ACL      ACLConfig
	Users    []UserConfig
}

Config is the prototype of config

var Conf Config

Conf default default

type FallbackConfig

type FallbackConfig struct {
	Target string

	Host      string
	WhiteList []string

	PACPath string
	PACFile string
	PACHost string
	PACPort string
}

FallbackConfig is prototype for fallback

type LogConfig

type LogConfig struct {
	Level     logger.LogLevel
	File      string
	QuotaFile string
}

LogConfig is prototype for logger

type TLSConfig

type TLSConfig struct {
	Certificate string
	PrivateKey  string
}

TLSConfig is prototype for tls

type UserConfig

type UserConfig struct {
	Username string
	Password string
	// Admin    bool
	Quota int64
}

UserConfig is prototype for users

Jump to

Keyboard shortcuts

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