proxy optionally
This commit is contained in:
parent
0f100b15ab
commit
572afd89b4
@ -1,6 +1,7 @@
|
|||||||
pid = '/var/run/bot.pid'
|
pid = '/var/run/bot.pid'
|
||||||
bot_token=''
|
bot_token=''
|
||||||
proxy = 'socks5h://proxy.addr'
|
proxy = True
|
||||||
|
proxy_addr = 'socks5h://proxy.addr'
|
||||||
zabbix_api = 'http://127.0.0.1/api_jsonrpc.php'
|
zabbix_api = 'http://127.0.0.1/api_jsonrpc.php'
|
||||||
zabbix_user = 'api'
|
zabbix_user = 'api'
|
||||||
zabbix_pass = 'pass'
|
zabbix_pass = 'pass'
|
||||||
|
3
main.py
3
main.py
@ -8,7 +8,8 @@ from telebot import apihelper, types
|
|||||||
from importer import Importer
|
from importer import Importer
|
||||||
import os
|
import os
|
||||||
|
|
||||||
apihelper.proxy = {'https': config.proxy}
|
if config.proxy:
|
||||||
|
apihelper.proxy = {'https': config.proxy_addr}
|
||||||
|
|
||||||
bot = telebot.TeleBot(config.bot_token)
|
bot = telebot.TeleBot(config.bot_token)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user