add type section in default setting (fix #288)

This commit is contained in:
Max Zhao
2020-08-04 00:59:01 +08:00
parent 6d87b05fee
commit 696b2632e9

View File

@@ -37,7 +37,6 @@ class Config:
timeout = self.conf.getint(sec, "timeout") timeout = self.conf.getint(sec, "timeout")
retry = self.conf.getint(sec, "retry") retry = self.conf.getint(sec, "retry")
proxytype = self.conf.get(sec, "type") proxytype = self.conf.get(sec, "type")
return proxy, timeout, retry, proxytype return proxy, timeout, retry, proxytype
except ValueError: except ValueError:
self._exit("common") self._exit("common")
@@ -88,6 +87,7 @@ class Config:
conf.set(sec2, "proxy", "127.0.0.1:1080") conf.set(sec2, "proxy", "127.0.0.1:1080")
conf.set(sec2, "timeout", "10") conf.set(sec2, "timeout", "10")
conf.set(sec2, "retry", "3") conf.set(sec2, "retry", "3")
conf.set(sec2, "type", "http")
sec3 = "Name_Rule" sec3 = "Name_Rule"
conf.add_section(sec3) conf.add_section(sec3)