Browse Source

fix str type under py3

dev
破娃酱 8 years ago
parent
commit
bae7d7a0c2
  1. 2
      mujson_mgr.py

2
mujson_mgr.py

@ -76,7 +76,7 @@ class MuMgr(object):
for row in self.data.json: for row in self.data.json:
if int(row['port']) == muid: if int(row['port']) == muid:
param = str(muid) + ':' + row['passwd'] param = str(muid) + ':' + row['passwd']
protocol_param = '/?protoparam=' + base64.urlsafe_b64encode(common.to_bytes(param)).replace("=", "") protocol_param = '/?protoparam=' + common.to_str(base64.urlsafe_b64encode(common.to_bytes(param))).replace("=", "")
break break
link = ("%s:%s:%s:%s:%s:%s" % (self.server_addr, user['port'], protocol, user['method'], obfs, common.to_str(base64.urlsafe_b64encode(common.to_bytes(user['passwd']))).replace("=", ""))) + protocol_param link = ("%s:%s:%s:%s:%s:%s" % (self.server_addr, user['port'], protocol, user['method'], obfs, common.to_str(base64.urlsafe_b64encode(common.to_bytes(user['passwd']))).replace("=", ""))) + protocol_param
return "ssr://" + (encode and common.to_str(base64.urlsafe_b64encode(common.to_bytes(link))).replace("=", "") or link) return "ssr://" + (encode and common.to_str(base64.urlsafe_b64encode(common.to_bytes(link))).replace("=", "") or link)

Loading…
Cancel
Save