update setup script

This commit is contained in:
quackerd 2020-06-03 18:37:33 +08:00
parent 64a28233df
commit c9fd9b04f3
Signed by: d
GPG Key ID: 590A22374D0B819F
2 changed files with 7 additions and 1 deletions

5
example.conf Normal file
View File

@ -0,0 +1,5 @@
d example.com
s v2ray
e email@domain.tld
u 00000000-0000-0000-0000-000000000000
p somepath

View File

@ -16,6 +16,7 @@ def read_conf(f):
f = open(f, "r")
lines = f.readlines()
for line in lines:
line = line.strip()
eline = line.split(' ')
if len(eline) >= 2:
ret[eline[0]] = eline[1]
@ -43,7 +44,7 @@ def main():
v_path = None
try:
opts , args = getopt.getopt(sys.argv[1:], "hd:s:e:c:u:p:")
opts , _ = getopt.getopt(sys.argv[1:], "hd:s:e:c:u:p:")
except getopt.GetoptError as err:
print(str(err))
usage()