From 0f5ba7f272adf4c5a9ebc214c72749a8c4889022 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 8 Jul 2022 22:14:28 +0200 Subject: [PATCH] Really fix remove v2ray forward rules --- omr-admin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/omr-admin.py b/omr-admin.py index 11c3e7d..ab426db 100755 --- a/omr-admin.py +++ b/omr-admin.py @@ -597,6 +597,9 @@ def v2ray_del_port(user, port, proto, name): for inbounds in data['inbounds']: if inbounds['tag'] == tag: data['inbounds'].remove(inbounds) + for routing in data['routing']['rules']: + if routing['inboundTag'][0] == tag: + data['routing']['rules'].remove(routing) with open('/etc/v2ray/v2ray-server.json', 'w') as f: json.dump(data, f, indent=4) final_md5 = hashlib.md5(file_as_bytes(open('/etc/v2ray/v2ray-server.json', 'rb'))).hexdigest()