first commit

This commit is contained in:
yulingjing
2019-07-31 16:03:48 +08:00
commit f69cf0b3c6
28 changed files with 3530 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#each collumn seperate with '\t'
#id (0~65535)
#name string
#type one of ip,expr,expr_plus,digest,intval,compile or plugin
#src_charset one of GBK,BIG5,UNICODE,UTF8
#dst_charset combined by GBK,BIG5,UNICODE,UTF8,seperate with '/'
#do_merege yes or no
#cross cache 0~max
#quickswitch quickon or quick off
#id name type src_charset dst_charset do_merge cross_cache quickswitch
1 PXY_DYN_SERV_IP plugin 7
2 PXY_APP_SERV_IP plugin 7
3 PXY_LIMIT_SERV_IP plugin 7
4 IR_DYN_SIFT_IP plugin 7
#5 MATT_CONFIG_GROUP group UTF8 UTF8 no 0

33
bin/conf/maat_test.json Normal file
View File

@@ -0,0 +1,33 @@
{
"compile_table": "CONFIG_COMPILE",
"group_table": "CONFIG_GROUP",
"rules": [
{
"compile_id": 1,
"service": 50,
"action": 2,
"do_blacklist": 1,
"do_log": 1,
"effective_rage": 0,
"user_region": "DOMAIN_ID=151;DOMAIN_STR=baidu.com",
"is_valid": "yes",
"groups": [
{
"group_name": "group_1",
"regions": [
{
"table_name": "PXY_INTERCEPT_DOMAIN",
"table_type": "expr",
"table_content": {
"keywords": "baidu.com",
"expr_type": "and",
"match_method": "sub",
"format": "uncase plain"
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,45 @@
[SYSTEM]
thread_num=1
log_level=10
count_in_transaction = 200000
domain_min_voter_num=1
ir_pick_cli_num=100
db_preservation_time=1800
dyn_config_expire_time=300
dyn_config_htable_timeout=250
client_ip_issue_interval=1800
server_ip_issue_interval=10
tcp_record_sample_rate=0.05
[NTC_MAAT]
instance_name=ntc
table_info_path=./conf/ntc_table_info.conf
redis_ip = 10.4.34.4
redis_port = 6380
redis_index = 2
[PROXY_MAAT]
instance_name=proxy
table_info_path=./conf/proxy_table_info.conf
redis_ip = 10.4.34.4
redis_port = 6380
redis_index = 4
[OUTPUT_MAAT]
instance_name=wbf
table_info_path=./conf/output_maat_table_info.conf
redis_ip = 10.4.20.151
redis_port = 6379
redis_index = 0
[KAFKA]
KafkaBrokers=10.4.34.10:9092,10.4.34.11:9092,10.4.34.12:9092,10.4.34.13:9092,10.4.34.14:9092,10.4.34.15:9092,10.4.34.16:9092,10.4.34.17:9092,10.4.34.18:9092,10.4.34.19:9092
ConsumeFromLatest=1
[STAT]
FS_IP=10.4.20.201
FS_PORT=8125
[DEBUG]
#no more than 64, seperate with ,
trace_keys=www.mesalab.cn, ietf.org, askar_legalkz.in

2
bin/memchk.sh Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
valgrind --tool=memcheck --leak-check=full --leak-resolution=high --error-limit=no --undef-value-errors=yes --show-reachable=yes --log-file=valgrind.log --malloc-fill=AA --free-fill=FE --max-stackframe=7418264 ./web_focus

3
bin/nr_r2 Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
killall web_focus wf_r3
./wf_r3 &> /dev/null &

17
bin/nr_r3 Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
while [ 1 ]; do
count=`ls -l core.* |wc -l`
echo $count
if [ $count -lt 5 ]
then
echo "set unlimited"
ulimit -c unlimited
else
ulimit -c 0
fi
./web_focus > log/screen.log 2>&1
echo program crashed, restart at `date +"%w %Y/%m/%d, %H:%M:%S"` >> RESTART.log
sleep 10
done