Add socks proxy support

This commit is contained in:
Mathhew
2020-06-19 15:51:09 +08:00
parent 562f030c3c
commit 43d0250614
5 changed files with 26 additions and 15 deletions

View File

@@ -26,14 +26,15 @@ class Config:
def soft_link(self) -> bool:
return self.conf.getboolean("common", "soft_link")
def proxy(self) -> [str, int, int]:
def proxy(self) -> [str, int, int, str]:
try:
sec = "proxy"
proxy = self.conf.get(sec, "proxy")
timeout = self.conf.getint(sec, "timeout")
retry = self.conf.getint(sec, "retry")
return proxy, timeout, retry
proxytype = self.conf.get(sec, "type")
return proxy, timeout, retry, proxytype
except ValueError:
self._exit("common")