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:
parent
7f44bd857e
commit
a213f7543a
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue