1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps-admin.git synced 2025-03-09 15:40:05 +00:00

Force port to be int

This commit is contained in:
Ycarus 2020-10-20 16:53:04 +02:00
parent 7f44bd857e
commit a213f7543a

View file

@ -453,7 +453,7 @@ def v2ray_add_port(user, port, proto, name, destip):
if inbounds['tag'] == tag: if inbounds['tag'] == tag:
exist = 1 exist = 1
if exist == 0: if exist == 0:
inbounds = {'tag': user.username + '_redir_' + proto + '_' + str(port), 'port': port, 'protocol': 'dokodemo-door', 'settings': {'network': proto, 'port': port, 'address': destip}} inbounds = {'tag': user.username + '_redir_' + proto + '_' + str(port), 'port': int(port), 'protocol': 'dokodemo-door', 'settings': {'network': proto, 'port': int(port), 'address': destip}}
data['inbounds'].append(inbounds) data['inbounds'].append(inbounds)
routing = {'type': 'field','inboundTag': [user.username + '_redir_' + proto + '_' + str(port)], 'outboundTag': 'OMRLan'} routing = {'type': 'field','inboundTag': [user.username + '_redir_' + proto + '_' + str(port)], 'outboundTag': 'OMRLan'}
data['routing']['rules'].append(routing) data['routing']['rules'].append(routing)