From 11e35d04ed99fd5f2b9ea81facf1d9d4f74a6312 Mon Sep 17 00:00:00 2001 From: duandongmei Date: Fri, 11 Jan 2019 11:36:04 +0600 Subject: [PATCH] =?UTF-8?q?basic=E5=92=8Cbehavior=E4=B9=9F=E5=8A=A0?= =?UTF-8?q?=E4=B8=8Adkc=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89=E5=9F=9F?= =?UTF-8?q?=EF=BC=8C=E7=95=8C=E9=9D=A2=E6=9A=82=E6=97=B6=E9=9A=90=E8=97=8F?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4app=E7=9A=84dns=20spoofing=E7=9A=84?= =?UTF-8?q?=E5=A4=8D=E9=80=89=E6=A1=86=E4=BD=8D=E7=BD=AE=EF=BC=9B=20APP=20?= =?UTF-8?q?Identify=20IP=E4=BF=AE=E6=94=B9=E4=B8=BAAPP=20IP=EF=BC=9B=20DK?= =?UTF-8?q?=20GL=E4=BF=AE=E6=94=B9=E4=B8=BACorrelation=EF=BC=9B=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AF=BC=E5=85=A5=E7=9A=84stream=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=87=AA=E5=AE=9A=E4=B9=89=E5=9F=9F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=EF=BC=9B=20https=20=E7=9A=84contol=20doLog=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=BA1=EF=BC=8C=E5=8F=AF=E9=80=89=E6=8B=A9=EF=BC=9B=20https?= =?UTF-8?q?=20=E7=9A=84cache=E5=92=8Cintercep=E9=BB=98=E8=AE=A4=E4=B8=BA2?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=8F=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/web/service/BaseService.java | 60 ++++++++++++++++++- .../service/configuration/AppCfgService.java | 2 +- .../resources/messages/message_en.properties | 4 +- .../resources/messages/message_ru.properties | 4 +- .../messages/message_zh_CN.properties | 4 +- .../views/cfg/app/appPolicyCfgForm.jsp | 4 +- .../WEB-INF/views/cfg/basicprotocol/form.jsp | 16 ++++- .../WEB-INF/views/cfg/basicprotocol/list.jsp | 8 ++- .../views/cfg/encryptedtunnelbehav/form.jsp | 16 ++++- .../views/cfg/encryptedtunnelbehav/list.jsp | 6 ++ .../cfg/proxy/control/httpRedirectForm.jsp | 14 +++-- 11 files changed, 115 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/nis/web/service/BaseService.java b/src/main/java/com/nis/web/service/BaseService.java index e6ce334ce..f13b626cf 100644 --- a/src/main/java/com/nis/web/service/BaseService.java +++ b/src/main/java/com/nis/web/service/BaseService.java @@ -2402,11 +2402,67 @@ public abstract class BaseService { maatCfg.setUserRegion(Constants.DNS_STRATEGY_USER_REGION_KEY+"="+_cfg.getDnsStrategyId()); } }else if(regionDict.getFunctionId()==407) {// Protocol Identify + //PROTOCOL IDENTITY USER_REGION PROTOCOL_ID=ProtocolId maatCfg.setUserRegion(Constants.PROTO_ID_REGION + "=" + _cfg.getAppCode()); + + // 限速业务需要设置 USER_REGION Droprate=userregion3 + if (Constants.RATELIMIT_ACTION.equals(_cfg.getAction())) { + _cfg.setUserRegion1(StringUtil.isEmpty(_cfg.getUserRegion1()) ? "0":_cfg.getUserRegion1()); + //限速 需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps + if(_cfg.getUserRegion1().equals("0")){//丢包率 + _cfg.setUserRegion2(StringUtil.isEmpty(_cfg.getUserRegion2()) ? "":_cfg.getUserRegion2()); + maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+_cfg.getUserRegion2()); + }else if(_cfg.getUserRegion1().equals("1")){//带宽 + _cfg.setUserRegion3(StringUtil.isEmpty(_cfg.getUserRegion3()) ? "":_cfg.getUserRegion3()); + maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+_cfg.getUserRegion3()); + } + } + //DKC=8 USER_REGION DKC=userregion4 + if(!StringUtil.isEmpty(_cfg.getUserRegion4()) && Constants.REJECT_ACTION.equals(_cfg.getAction())){ + maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"="+_cfg.getUserRegion4()); + } + // USER_REGION config_id=compileId + maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT+"config_id="+maatCfg.getCompileId()); }else if(regionDict.getFunctionId()==63) {// APP Policy - maatCfg.setUserRegion(Constants.APP_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+"config_id="+_cfg.getCompileId()); + //APP IDENTITY USER_REGION包含APP_ID=AppCode;BEHAV_ID=ProtocolId + maatCfg.setUserRegion(Constants.APP_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+ Constants.BEHAV_ID_REGION + "=" + _cfg.getBehavCode()); + // 限速业务需要设置 + if (Constants.RATELIMIT_ACTION.equals(_cfg.getAction())) { + _cfg.setUserRegion1(StringUtil.isEmpty(_cfg.getUserRegion1()) ? "0":_cfg.getUserRegion1()); + //限速 需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps + if(_cfg.getUserRegion1().equals("0")){//丢包率 + _cfg.setUserRegion2(StringUtil.isEmpty(_cfg.getUserRegion2()) ? "":_cfg.getUserRegion2()); + maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+_cfg.getUserRegion2()); + }else if(_cfg.getUserRegion1().equals("1")){//带宽 + _cfg.setUserRegion3(StringUtil.isEmpty(_cfg.getUserRegion3()) ? "":_cfg.getUserRegion3()); + maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+_cfg.getUserRegion3()); + } + } + //DKC=8 + if(!StringUtil.isEmpty(_cfg.getUserRegion4()) && Constants.REJECT_ACTION.equals(_cfg.getAction())){ + maatCfg.setUserRegion(Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"="+_cfg.getUserRegion4()); + } + maatCfg.setUserRegion(Constants.USER_REGION_SPLIT+"config_id="+_cfg.getCompileId()); }else if(regionDict.getFunctionId()==408) {// Behavior Identify - maatCfg.setUserRegion(Constants.PROTO_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+Constants.APP_VIGNORE_USER_REGION_KEY+"=1"); + //BEHAVIOR IDENTITY USER_REGION包含APP_ID=AppCode;BEHAV_ID=ProtocolId + maatCfg.setUserRegion(Constants.APP_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+ Constants.BEHAV_ID_REGION + "=" + _cfg.getBehavCode()); + // 限速业务需要设置 + if (Constants.RATELIMIT_ACTION.equals(_cfg.getAction())) { + _cfg.setUserRegion1(StringUtil.isEmpty(_cfg.getUserRegion1()) ? "0":_cfg.getUserRegion1()); + //限速 需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps + if(_cfg.getUserRegion1().equals("0")){//丢包率 + _cfg.setUserRegion2(StringUtil.isEmpty(_cfg.getUserRegion2()) ? "":_cfg.getUserRegion2()); + maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+_cfg.getUserRegion2()); + }else if(_cfg.getUserRegion1().equals("1")){//带宽 + _cfg.setUserRegion3(StringUtil.isEmpty(_cfg.getUserRegion3()) ? "":_cfg.getUserRegion3()); + maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+_cfg.getUserRegion3()); + } + } + //DKC=8 + if(!StringUtil.isEmpty(_cfg.getUserRegion4()) && Constants.REJECT_ACTION.equals(_cfg.getAction())){ + maatCfg.setUserRegion(Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"="+_cfg.getUserRegion4()); + } + maatCfg.setUserRegion(Constants.USER_REGION_SPLIT+"config_id="+_cfg.getCompileId()); }else if(regionDict.getFunctionId()==301) {// Anti DDOS Map umap= new HashMap(); umap.put("protocol", _cfg.getAntiddosProtocol()); diff --git a/src/main/java/com/nis/web/service/configuration/AppCfgService.java b/src/main/java/com/nis/web/service/configuration/AppCfgService.java index bd5a497f1..36b287c2f 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -1023,7 +1023,7 @@ public class AppCfgService extends BaseService { } //DKC=8 if(!StringUtil.isEmpty(entity.getUserRegion4())){ - userRegion+=Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"=1"; + userRegion+=Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"="+entity.getUserRegion4(); } userRegion+=Constants.USER_REGION_SPLIT+"config_id="+entity.getCompileId(); maatCfg.setUserRegion(userRegion); diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index ffd0f09ab..7757aa665 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -708,7 +708,7 @@ ir_type=Reuse Type dns_strategy_id=DNS Policy ID no_strategy=Default Strategy domain=Domain -app_ip_config=APP Identify IP +app_ip_config=APP IP bytes=Byte app_http_config=APP HTTP Feature app_domain_config=APP Domain Feature @@ -1121,7 +1121,7 @@ APP_PAYLOAD_ADMIN=APP Payload Feature APP_HTTP_ADMIN=APP HTTP Feature APP_DNS_ADMIN=APP DNS Feature APP_SSL_ADMIN=APP SSL Feature -APP_DK_GL=APP DK GL Feature +APP_DK_GL=APP Correlation Feature dnat_ip_complex_loop=DNAT Reuse Policy Loop snat_ip_complex_loop=SNAT Reuse Policy Loop snat_ip_reuse_adress_pool_loop=SNAT Address Pool Loop diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index 9d10465aa..3ae876c70 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -708,7 +708,7 @@ ir_type=\u0422\u0438\u043f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043 dns_strategy_id=\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 DNS no_strategy=\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 domain=\u0414\u043e\u043c\u0435\u043d -app_ip_config=\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f +app_ip_config=APP IP bytes=\u0411\u0430\u0439\u0442 app_http_config=\u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f HTTP app_domain_config=\u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u043c\u0435\u043d\u0430 @@ -1121,7 +1121,7 @@ APP_PAYLOAD_ADMIN=\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u041d\u0430\ APP_HTTP_ADMIN= HTTP \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 APP_DNS_ADMIN= DNS \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 APP_SSL_ADMIN=SSL \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 -APP_DK_GL=DK GL \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 +APP_DK_GL=APP Correlation Feature dnat_ip_complex_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f DNAT snat_ip_complex_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f SNAT snat_ip_reuse_adress_pool_loop=\u041f\u0435\u0442\u043b\u044f \u043f\u0443\u043b\u0430 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 SNAT diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index ba0375040..6ba7166ca 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -706,7 +706,7 @@ ir_type=\u590d\u7528\u7c7b\u578b dns_strategy_id=DNS\u7b56\u7565ID no_strategy=\u9ed8\u8ba4\u7b56\u7565 domain=\u57df\u540d -app_ip_config=APP\u534f\u8baeIP +app_ip_config=APP IP bytes=\u5b57\u8282 app_http_config=APP HTTP\u7279\u5f81 app_domain_config=APP\u57df\u540d\u7279\u5f81 @@ -1120,7 +1120,7 @@ APP_PAYLOAD_ADMIN=APP Payload Admin APP_HTTP_ADMIN=APP HTTP Admin APP_DNS_ADMIN=APP DNS Admin APP_SSL_ADMIN=APP SSL Admin -APP_DK_GL=APP\u591a\u7528\u9014\u6807\u7b7e +APP_DK_GL=APP Correlation Feature dnat_complex_loop=DNAT IP\u590d\u7528\u56de\u6d41 snat_policy=SNAT\u590d\u7528\u7b56\u7565 dnat_policy=DNAT\u590d\u7528\u7b56\u7565 diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index edd647b53..3eaa022d8 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -329,11 +329,11 @@ var delContent = function(contentClassName, addBtnClassName) { - --%> - --%>
diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp index 3fe6b8035..41361e7c4 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp @@ -384,6 +384,7 @@ + <%-- --%> @@ -414,6 +415,11 @@ ${cfg.compileId } ${cfg.cfgDesc } + <%-- + + + + --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp index b04aa84f8..db03e6c6c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp @@ -148,7 +148,6 @@ -
@@ -192,14 +191,20 @@
+ + + + + + - <%--
+
- + @@ -210,10 +215,11 @@ +
-
--%> +