mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update firewall.py
This commit is contained in:
@@ -345,6 +345,9 @@ class Firewall(object):
|
||||
protocol = 'tcp'
|
||||
ps = 'PANEL端口'
|
||||
|
||||
if thisdb.getFirewallCountByPort(port) > 0:
|
||||
return mw.returnData(False, '您要放行的端口已存在,无需重复放行!')
|
||||
|
||||
thisdb.addFirewall(port, ps=ps,protocol=protocol)
|
||||
self.addAcceptPortCmd(port, protocol=protocol)
|
||||
self.reload()
|
||||
|
||||
Reference in New Issue
Block a user