fix str type
This commit is contained in:
parent
86de572caf
commit
24623b896d
1 changed files with 8 additions and 8 deletions
|
@ -29,7 +29,7 @@ if __name__ == '__main__':
|
||||||
sys.path.insert(0, os.path.join(file_path, '../'))
|
sys.path.insert(0, os.path.join(file_path, '../'))
|
||||||
|
|
||||||
from shadowsocks import shell, daemon, eventloop, tcprelay, udprelay, \
|
from shadowsocks import shell, daemon, eventloop, tcprelay, udprelay, \
|
||||||
asyncdns, manager
|
asyncdns, manager, common
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -86,16 +86,16 @@ def main():
|
||||||
bindv6 = config.get("out_bindv6", '')
|
bindv6 = config.get("out_bindv6", '')
|
||||||
if type(password_obfs) == list:
|
if type(password_obfs) == list:
|
||||||
password = password_obfs[0]
|
password = password_obfs[0]
|
||||||
obfs = password_obfs[1]
|
obfs = common.to_str(password_obfs[1])
|
||||||
if len(password_obfs) > 2:
|
if len(password_obfs) > 2:
|
||||||
protocol = password_obfs[2]
|
protocol = common.to_str(password_obfs[2])
|
||||||
elif type(password_obfs) == dict:
|
elif type(password_obfs) == dict:
|
||||||
password = password_obfs.get('password', config_password)
|
password = password_obfs.get('password', config_password)
|
||||||
method = password_obfs.get('method', method)
|
method = common.to_str(password_obfs.get('method', method))
|
||||||
protocol = password_obfs.get('protocol', protocol)
|
protocol = common.to_str(password_obfs.get('protocol', protocol))
|
||||||
protocol_param = password_obfs.get('protocol_param', protocol_param)
|
protocol_param = common.to_str(password_obfs.get('protocol_param', protocol_param))
|
||||||
obfs = password_obfs.get('obfs', obfs)
|
obfs = common.to_str(password_obfs.get('obfs', obfs))
|
||||||
obfs_param = password_obfs.get('obfs_param', obfs_param)
|
obfs_param = common.to_str(password_obfs.get('obfs_param', obfs_param))
|
||||||
bind = password_obfs.get('out_bind', bind)
|
bind = password_obfs.get('out_bind', bind)
|
||||||
bindv6 = password_obfs.get('out_bindv6', bindv6)
|
bindv6 = password_obfs.get('out_bindv6', bindv6)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue