diff --git a/README.md b/README.md index 2bc627ffc..6561943c4 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443: ### 版本更新 0.15.4 -* OP防火墙-验证优化。 +* OP防火墙-验证优化[cf缓存问题解决]。 * 在aarch64架构下低于PHP70的版本[安装/扩展安装]优化。 ### JSDelivr安装地址 diff --git a/plugins/op_waf/index.html b/plugins/op_waf/index.html index 9e4dad280..2fce86bbf 100755 --- a/plugins/op_waf/index.html +++ b/plugins/op_waf/index.html @@ -245,6 +245,7 @@
首页
全局配置
站点配置
+地区限制
封锁历史
diff --git a/plugins/op_waf/index.py b/plugins/op_waf/index.py index 81ae19f19..d07cbd756 100755 --- a/plugins/op_waf/index.py +++ b/plugins/op_waf/index.py @@ -1284,6 +1284,14 @@ def getWafConf(): return mw.readFile(conf) +def getAreaLimit(): + conf = getJsonPath('area_limit') + if not os.path.exists(conf): + mw.writeFile(conf, '[]') + setConfRestartWeb() + return mw.readFile(conf) + + def cleanDropIp(): url = "http://127.0.0.1/clean_waf_drop_ip" data = mw.httpGet(url) @@ -1397,8 +1405,8 @@ if __name__ == "__main__": print(getWafSrceen()) elif func == 'waf_conf': print(getWafConf()) - elif func == 'waf_site': - print(getWafSite()) + elif func == 'get_area_limit': + print(getAreaLimit()) elif func == 'clean_drop_ip': print(cleanDropIp()) elif func == 'test_run': diff --git a/plugins/op_waf/js/op_waf.js b/plugins/op_waf/js/op_waf.js index 6f780ef67..0fbf6ce34 100755 --- a/plugins/op_waf/js/op_waf.js +++ b/plugins/op_waf/js/op_waf.js @@ -1634,6 +1634,187 @@ function wafSite(){ }); } +function wafAreaLimitRender(){ + owPost('get_area_limit', {}, function(rdata) { + var rdata = $.parseJSON(rdata.data); + console.log(rdata); + if (!rdata.status) { + layer.msg(rdata.msg, { icon: 2, time: 2000 }); + return; + } + + + var list = ''; + var rlist = rdata.data; + + for (var i = 0; i < rlist.length; i++) { + var docker_status = 'stop'; + var status = ''; + if (rlist[i]['State']['Status'] == 'running') { + docker_status = 'start'; + status = ''; + } + + var op = ''; + op += '终端 | '; + op += '日志 | '; + op += '删除'; + + list += '| 地区 | \ +站点 | \ +类型 | \ +操作 |
|---|