Add SOCKS5 proxy support

This commit is contained in:
Ken-Håvard Lieng 2020-06-16 03:04:27 +02:00
parent 7040f1c8d0
commit 67fe5d263d
18 changed files with 1035 additions and 54 deletions

View file

@ -21,6 +21,7 @@ type Config struct {
LetsEncrypt LetsEncrypt
Auth Auth
DCC DCC
Proxy Proxy
}
type Defaults struct {
@ -77,6 +78,15 @@ type Autoget struct {
DeleteAfter time.Duration `mapstructure:"delete_after"`
}
type Proxy struct {
Enabled bool
Protocol string
Host string
Port string
Username string
Password string
}
func LoadConfig() (*Config, chan *Config) {
viper.SetConfigName("config")
viper.AddConfigPath(storage.Path.ConfigRoot())