Skip to content

Commit

Permalink
优化新建组
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Nov 23, 2021
1 parent 1dff6f5 commit 8158ca3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions v2ray_util/util_core/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,15 @@ def create_new_port(self, newPort):
new_inbound = server["inbounds"][0]
new_inbound["port"] = int(newPort)
new_inbound["settings"]["clients"][0]["id"] = str(uuid.uuid1())
for rule in self.config["routing"]["rules"]:
if "protocol" in rule and "bittorrent" in rule["protocol"]:
new_inbound.update({
"sniffing": {
"enabled": True,
"destOverride": ["http", "tls"]
}
})
break
self.config["inbounds"].append(new_inbound)
print(_("add port group success!"))
self.save()
Expand Down

0 comments on commit 8158ca3

Please sign in to comment.