20180711-3

增加HTTP协议识别:注册HTTP_ENTRY入口函数,获得流量即打流标签的方式实现;
注意同步更新./conf/project_list.conf
This commit is contained in:
liuyang
2018-07-11 18:59:23 +08:00
parent c494982096
commit 2a4832a48f
3 changed files with 989 additions and 365 deletions

21
bin/project_list.conf Normal file
View File

@@ -0,0 +1,21 @@
#project_requirement_name value_type
#current requirement definitions:
# terminal_tag,
# ipv4_frag_list,
# ipv6_frag_list,
# stream_id,
# value type definitions
# char,
# short,
# int,
# long,
# struct
#terminal_tag struct
#ipv4_frag_list struct
#ipv6_frag_list struct
#stream_id struct
#test_project struct
tcp_flow_stat struct
udp_flow_stat struct
protocol_tag int

1325
kni.c

File diff suppressed because it is too large Load Diff

8
kni.h
View File

@@ -25,6 +25,10 @@
#define TH_URG 0x20
#endif
//#define KNI_DEBUG_TCPREPAIR 1
//#define KNI_DEBUG_KEEPALIVE 1
#define KNI_MAX_THREADNUM 64
#define KNI_ETHER_LEN 14
@@ -137,9 +141,8 @@
#define KNI_TCPREPAIR_OPT_NUM 4
#define KNI_PROJECT_NAME "protocol_tag"
//#define KNI_DEBUG_TCPREPAIR 1
//#define KNI_DEBUG_KEEPALIVE 1
enum kni_flag
@@ -181,6 +184,7 @@ struct args_to_tun
//comm
struct kni_var_comm
{
int project_id;
int kni_mode_cur; //0:work 1:bypass
unsigned int local_ip;
int thread_num;