From edd4467488e54996601ec505ce044d2e4be882ed Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 24 Jul 2023 09:25:06 +0200 Subject: [PATCH] Fix V2ray port redirection --- debian/changelog | 6 ++++++ omr-admin.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 517f170..8b60349 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +omr-vps-admin (0.3+20230724) unstable; urgency=medium + + * Fix port redirection string to int + + -- OpenMPTCProuter Mon, 24 Jul 2023 09:24:34 +0200 + omr-vps-admin (0.3+20230718) unstable; urgency=medium * Fix FastAPI version diff --git a/omr-admin.py b/omr-admin.py index 0a10ae0..e4e98ab 100755 --- a/omr-admin.py +++ b/omr-admin.py @@ -581,7 +581,7 @@ def v2ray_add_port(user, port, proto, name, destip, destport): if inbounds['tag'] == tag: exist = 1 if exist == 0: - inbounds = {'tag': tag, 'port': port, 'protocol': 'dokodemo-door', 'settings': {'network': proto, 'port': destport, 'address': destip}} + inbounds = {'tag': tag, 'port': int(port), 'protocol': 'dokodemo-door', 'settings': {'network': proto, 'port': int(destport), 'address': destip}} #inbounds = {'tag': user.username + '_redir_' + proto + '_' + str(port), 'port': str(port), 'protocol': 'dokodemo-door', 'settings': {'network': proto, 'port': str(destport), 'address': destip}} data['inbounds'].append(inbounds) routing = {'type': 'field','inboundTag': [tag], 'outboundTag': 'OMRLan'}