Archived
1

Add SOCKS5 proxy support to bot

In Soviet Russia... wait, wrong time period.
This commit is contained in:
2018-05-11 18:55:37 +04:00
parent 2c72bc8023
commit b52a0c34b8
3 changed files with 69 additions and 2 deletions

View File

@@ -30,6 +30,14 @@ type TelegramConnection struct {
ListenAddress string `yaml:"listen_address"`
}
// ProxySettings handles settings for SOCKS5 proxy in config.yml
type ProxySettings struct {
Enabled bool `yaml:"enabled"`
Address string `yaml:"address,omitempty"`
Username string `yaml:"username,omitempty"`
Password string `yaml:"password,omitempty"`
}
// SpecialChats handles settings for special chats
type SpecialChats struct {
AcademyID string `yaml:"academy_id"`
@@ -48,6 +56,7 @@ type LoggingConfig struct {
type Config struct {
Telegram TelegramConnection `yaml:"telegram_connection"`
Database DatabaseConnection `yaml:"database_connection"`
Proxy ProxySettings `yaml:"socks_proxy"`
SpecialChats SpecialChats `yaml:"special_chats"`
Logs LoggingConfig `yaml:"logs"`
}