Skip to content

Commit

Permalink
Fix read profile 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Nov 27, 2018
1 parent f6a6715 commit 31f4d1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ def parse_group(self, part_json, group_index, local_ip):
if "sockopt" in conf_stream and "tcpFastOpen" in conf_stream["sockopt"]:
tfo = "开启" if conf_stream["sockopt"]["tcpFastOpen"] else "关闭"

if conf_stream["httpSettings"] != None:
if conf_stream["httpSettings"]:
path = conf_stream["httpSettings"]["path"]
elif conf_stream["wsSettings"] != None:
elif conf_stream["wsSettings"]:
host = conf_stream["wsSettings"]["headers"]["Host"]
path = conf_stream["wsSettings"]["path"]
elif conf_stream["tcpSettings"] != None:
elif conf_stream["tcpSettings"]:
host = conf_stream["tcpSettings"]["header"]["request"]["headers"]["Host"]

if (tls == "tls"):
Expand Down Expand Up @@ -134,7 +134,7 @@ def parse_group(self, part_json, group_index, local_ip):
for client in clients:
email, node = "", None
self.user_number = self.user_number + 1
if "email" in client and client["email"] != None:
if "email" in client and client["email"]:
email = client["email"]

if protocol == "vmess":
Expand Down

0 comments on commit 31f4d1f

Please sign in to comment.