1:补充向阀门中添加特殊属性的业务
2:修改request获取ip的方式(前面接的有nginx直接request.getRemoteAddr无法获取到)真实ip 3:修改摘要文件调用的readme
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.nis.domain.restful;
|
package com.nis.domain.restful;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.nis.domain.LogEntity;
|
import com.nis.domain.LogEntity;
|
||||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
@@ -22,6 +23,11 @@ public class NtcCollectRadiusLog extends LogEntity<NtcCollectRadiusLog> {
|
|||||||
protected String framedIp;
|
protected String framedIp;
|
||||||
@ApiModelProperty(value="用户名", required=true)
|
@ApiModelProperty(value="用户名", required=true)
|
||||||
protected String account;
|
protected String account;
|
||||||
|
|
||||||
|
protected String searchNasIp;//ISN接入的IP
|
||||||
|
protected String searchFramedIp;//服务器下发的用户地址
|
||||||
|
protected String searchAccount;//用户名
|
||||||
|
|
||||||
public Integer getCode() {
|
public Integer getCode() {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
@@ -46,6 +52,27 @@ public class NtcCollectRadiusLog extends LogEntity<NtcCollectRadiusLog> {
|
|||||||
public void setAccount(String account) {
|
public void setAccount(String account) {
|
||||||
this.account = account;
|
this.account = account;
|
||||||
}
|
}
|
||||||
|
@JsonIgnore
|
||||||
|
public String getSearchNasIp() {
|
||||||
|
return searchNasIp;
|
||||||
|
}
|
||||||
|
public void setSearchNasIp(String searchNasIp) {
|
||||||
|
this.searchNasIp = searchNasIp;
|
||||||
|
}
|
||||||
|
@JsonIgnore
|
||||||
|
public String getSearchFramedIp() {
|
||||||
|
return searchFramedIp;
|
||||||
|
}
|
||||||
|
public void setSearchFramedIp(String searchFramedIp) {
|
||||||
|
this.searchFramedIp = searchFramedIp;
|
||||||
|
}
|
||||||
|
@JsonIgnore
|
||||||
|
public String getSearchAccount() {
|
||||||
|
return searchAccount;
|
||||||
|
}
|
||||||
|
public void setSearchAccount(String searchAccount) {
|
||||||
|
this.searchAccount = searchAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,9 +174,24 @@ public class AuditLogThread implements Runnable {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String getIpAddr(HttpServletRequest request) {
|
||||||
|
String ip = request.getHeader("x-forwarded-for");
|
||||||
|
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
||||||
|
ip = request.getHeader("Proxy-Client-IP");
|
||||||
|
}
|
||||||
|
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
||||||
|
ip = request.getHeader("WL-Proxy-Client-IP");
|
||||||
|
}
|
||||||
|
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
||||||
|
ip = request.getRemoteAddr();
|
||||||
|
}
|
||||||
|
return ip;
|
||||||
|
}
|
||||||
|
|
||||||
public static AuditLogThread getNewSaveRequestLogThread(HttpServletRequest request) {
|
public static AuditLogThread getNewSaveRequestLogThread(HttpServletRequest request) {
|
||||||
AuditLogThread thread = new AuditLogThread();
|
AuditLogThread thread = new AuditLogThread();
|
||||||
thread.setRemoteAddr(request.getRemoteAddr());
|
thread.setRemoteAddr(getIpAddr(request));
|
||||||
thread.setRequestURI(request.getRequestURI());
|
thread.setRequestURI(request.getRequestURI());
|
||||||
if (request.getMethod().toLowerCase().equals("get")) {
|
if (request.getMethod().toLowerCase().equals("get")) {
|
||||||
thread.setQueryString(request.getQueryString());
|
thread.setQueryString(request.getQueryString());
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ unMaatService=3:32;4:96;25:32;28:32;64;65;261:16;262:16;263:16;264:16;265:16;266
|
|||||||
#0x402 APP DOMAIN特征发现 1026:2,5;
|
#0x402 APP DOMAIN特征发现 1026:2,5;
|
||||||
#0x404 APP IP特征 1028:2,5;
|
#0x404 APP IP特征 1028:2,5;
|
||||||
##########
|
##########
|
||||||
serviceDBIndex=1:2,4,5;2:2,4,5;5:2,5;66:2,4,5;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,5;34:2;35:2;36:2;37:2;38:2;39:2;40:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;150:2;151:2;152:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;273:3;274:5;384:2;385:2;386:2;387:2;388:2;395:2;399:3;512:4,5;513:4,2,5;514:4,5;515:4,2,5;517:4,5;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;624:4;625:4;640:4;641:4;750:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2;1041:2;1042:2;1056:2;1152:2;3:5;4:5;25:5;28:5;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;268:3;269:3;270:3;389:3;390:3;391:3;392:3;393:3;394:3;396:3;397:3;398:3;834:6;835:6;836:6
|
serviceDBIndex=1:2,4,5;2:2,4,5;5:2,5;66:2,4,5;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,5;34:2;35:2;36:2;37:2;38:2;39:2;40:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;150:2;151:2;152:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;273:3;274:5;384:2;385:2;386:2;387:2;388:2;395:2;399:3;512:4,5;513:4,2,5;514:4,5;515:4,2,5;517:4,5;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;624:4;625:4;640:4;641:4;750:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2,5;1041:2;1042:2;1056:2,5;1152:2;3:5;4:5;25:5;28:5;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;268:3;269:3;270:3;389:3;390:3;391:3;392:3;393:3;394:3;396:3;397:3;398:3;834:6;835:6;836:6
|
||||||
|
|
||||||
##阀门配置在redisdb的序号
|
##阀门配置在redisdb的序号
|
||||||
tapRedisDb=5
|
tapRedisDb=5
|
||||||
@@ -349,7 +349,7 @@ tapRedisDb=5
|
|||||||
#0x205 基于PXY IP替换 517
|
#0x205 基于PXY IP替换 517
|
||||||
#0x402 APP DOMAIN特征发现 1026
|
#0x402 APP DOMAIN特征发现 1026
|
||||||
#0x404 APP IP特征 1028
|
#0x404 APP IP特征 1028
|
||||||
maat2Valve=33:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;512:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;513:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;514:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;515:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;517:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1026:strRegion|strStrRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1028:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1040:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1056:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;5:ipRegion@COMPILE_ID&USER_REGION&EFFECTIVE_RANGE
|
maat2Valve=1:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;2:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;33:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;512:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;513:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;514:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;515:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;517:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1026:strRegion|strStrRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1028:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1040:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1056:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;5:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE&COMPILE_ID
|
||||||
|
|
||||||
##记录哪些service可以被分组复用(只有maat类配置可以被分组复用)
|
##记录哪些service可以被分组复用(只有maat类配置可以被分组复用)
|
||||||
#业务ID:域类型1@表名,表名|域类型2@表名;业务ID:域类型1@表名,表名|域类型2@表名
|
#业务ID:域类型1@表名,表名|域类型2@表名;业务ID:域类型1@表名,表名|域类型2@表名
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
<t:field fieldType="Number" srcName="isValid" dstName="is_valid" isRequired="true" regexp="[1]"/>
|
<t:field fieldType="Number" srcName="isValid" dstName="is_valid" isRequired="true" regexp="[1]"/>
|
||||||
<t:field fieldType="Date" srcName="opTime" dstName="op_time" isRequired="true"/>
|
<t:field fieldType="Date" srcName="opTime" dstName="op_time" isRequired="true"/>
|
||||||
<t:field fieldType="String" srcName="userRegion" dstName="user_region" isRequired="true"/>
|
<t:field fieldType="String" srcName="userRegion" dstName="user_region" isRequired="true"/>
|
||||||
|
<t:field fieldType="String" srcName="effectiveRange" dstName="effective_range" defaultVal="0"/>
|
||||||
</t:commonSource>
|
</t:commonSource>
|
||||||
<!--
|
<!--
|
||||||
#0x105 音频样例阻断 261=0:MM_SAMPLE_AUDIO
|
#0x105 音频样例阻断 261=0:MM_SAMPLE_AUDIO
|
||||||
|
|||||||
@@ -1,7 +1,21 @@
|
|||||||
操作系统运行环境linux7.0
|
操作系统运行环境linux7.0
|
||||||
文件摘要工具安装步骤:
|
文件摘要工具安装步骤:
|
||||||
1.将MESA.zip 拷贝opt目录下,解压,执行update_env.sh
|
1.将MESA.zip 拷贝opt目录下,解压,执行update_env.sh
|
||||||
2.可将digest_gen拷贝到任何目录(ldd digest_gen查看依赖包)
|
2.可将digest_gen拷贝到任何目录(ldd digest_gen查看依赖包)
|
||||||
执行命令如下:
|
执行命令如下:
|
||||||
./digest_gen -f /home/a.txt 结果如下:
|
./digest_gen -f /home/a.txt 结果如下:
|
||||||
/home/a.txt 21 1.154222
|
/home/a.txt 21 1.154222
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
如果报错
|
||||||
|
vim /etc/ld.so.conf.d/MESA.conf
|
||||||
|
/opt/MESA/lib/
|
||||||
|
|
||||||
|
|
||||||
|
如果还不行在执行
|
||||||
|
source /etc/profile.d/MESA.sh
|
||||||
|
|
||||||
|
|
||||||
|
如果开机自启动或者无法执行的话在咱们的tomcat守护脚本里面加入
|
||||||
|
source ~/.bash_profile
|
||||||
|
|||||||
Reference in New Issue
Block a user