#ifndef CONF_H #define CONF_H #include #include #include #include #include #define WHITELIST_IP_NUM 1024 typedef struct CONF { char *DAEMON; int TIME; // 杀毒 int CLAMAV; char *CLAMAV_TIME; int CLAMAV_TIME_LEN; int IS_BLOCKED; int REFUSE_NUMBER; // 获取公网IP Url地址 char *PUBLIC_IP; // 地域白名单 int REGION; char *REGION_URL; char *REGION_LIST; // IPV4 白名单 int IPV4_RESTRICTION; char *IPV4_WHITE_LIST; int IS_MAIL; int IS_DING_WEBHOOK; char *PHONE; char *DING_WEBHOOK; int IS_QQMAIL; char *SEND_QQ; char *QQMAIL_KEY; char *RECV_MAIL; } conf; void read_conf(char *filename, conf * configure); void free_conf(conf * conf); void ptintf_conf(conf * conf); void split_string(char string[], char delims[], char (*whitelist_ip)[WHITELIST_IP_NUM]); #endif