conf

package
v0.0.0-...-cbdb544 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NFT_CHAIN_NAME = "aio-gw-chain"

Functions

func ApplyProxySettings

func ApplyProxySettings(proxySettings ProxySettings) error

check current service settings, scrape them and apply the new config instead

func ApplyServiceSettings

func ApplyServiceSettings(serviceSettings ServiceSettings) error

check current service settings, scrape them and apply the new config instead

func ApplyUpstreamSettings

func ApplyUpstreamSettings(upstreamSettings UpstreamSettings) error

func Find

func Find(slice []string, val string) (int, bool)

Find takes a slice and looks for an element in it. If found it will return it's key, otherwise it will return -1 and a bool of false.

func GenerateDefaultSettings

func GenerateDefaultSettings()

func GetTagValue

func GetTagValue(myStruct interface{}, myField string, myTag string) string

func LoadSettingsFromFile

func LoadSettingsFromFile(filename string) error

Types

type FullSettings

type FullSettings struct {
	WebserverSettings WebserverSettings `yaml:"webserver_settings"`
	UpstreamSettings  UpstreamSettings  `yaml:"upstream_settings"`
	ProxySettings     ProxySettings     `yaml:"proxy_settings"`
	ServiceSettings   ServiceSettings   `yaml:"service_settings"`
}

used to write and read config file

type ProxySettings

type ProxySettings struct {
	Enabled        bool   `yaml:"enabled" inputtype:"toggle" default:"true"`
	Bind           string `yaml:"bind"    inputtype:"text"   default:":8081"`
	Authentication struct {
		Enabled  bool   `yaml:"enabled"  inputtype:"toggle" default:"true"`
		Username string `yaml:"username" inputtype:"text"   default:"admin"`
		Password string `yaml:"password" inputtype:"text"   default:"admin"`
	} `yaml:"authentication"`
	Type string `yaml:"type"`
}
var GlobalProxySettings ProxySettings

type ServiceSettings

type ServiceSettings struct {
	Containers []containerSettings
}
var GlobalServiceSettings ServiceSettings

type UpstreamSettings

type UpstreamSettings struct {
	Enabled         bool   `yaml:"enabled" inputtype:"toggle"  default:"true"`
	Method          string `` /* 136-byte string literal not displayed */
	SinkholeOptions struct {
	} `yaml:"sinkhole_options"`
	DummyOptions struct {
	} `yaml:"dummy_options"`
	TlsDecrpytionOptions struct {
		Ports  []int `yaml:"ports" inputtype:"text" default:"443,8443,8444,853,990,465,993,995,5061"`
		Target struct {
			Ip   string `yaml:"ip" inputtype:"text" default:"127.0.0.1"`
			Port int    `yaml:"port" inputtype:"text" default:"10443"`
		} `yaml:"nat_target"`
	} `yaml:"tls_decryption_options"`
	OpenvpnOptions struct {
	} `yaml:"openvpn_options"`
	WireguardOptions struct {
	} `yaml:"wireguard_options"`
	TorOptions struct {
	} `yaml:"tor_options"`
	SocksOptions struct {
	} `yaml:"socks_options"`
	HttpOptions struct {
	} `yaml:"http_options"`
	NatOptiones struct {
	} `yaml:"nat_options"`
}
var GlobalUpstreamSettings UpstreamSettings

type WebserverSettings

type WebserverSettings struct {
	Enabled        bool   `yaml:"enabled" inputtype:"toggle" default:"true"`
	Bind           string `yaml:"bind"    inputtype:"text"   default:":8080"`
	Authentication struct {
		Enabled  bool   `yaml:"enabled"  inputtype:"toggle" default:"true"`
		Username string `yaml:"username" inputtype:"text"   default:"admin"`
		Password string `yaml:"password" inputtype:"text"   default:"admin"`
	} `yaml:"authentication"`
	Tls struct {
		Enabled bool   `yaml:"enabled" inputtype:"toggle" default:"false"`
		Cert    string `yaml:"cert"    inputtype:"file"   default:""`
		Key     string `yaml:"key"     inputtype:"file"   default:""`
	} `yaml:"tls"`
	Logging struct {
		Enabled bool   `yaml:"enabled" inputtype:"toggle"  default:"true"`
		Level   string `yaml:"level"   inputtype:"options" options:"debug,info,warning" default:"debug"`
	} `yaml:"logging"`
}
var GlobalWebserverSettings WebserverSettings

Jump to

Keyboard shortcuts

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