1、使用服务器IP+端口+sni生成服务端状态 #141,使用客户端IP+Client hello特征生成客户端状态。2、pinning detection的相关阈值可从tfe.conf中配置。

This commit is contained in:
zhengchao
2019-06-10 18:39:01 +08:00
parent b612ef2507
commit f18c5efdb1
3 changed files with 70 additions and 37 deletions

View File

@@ -17,11 +17,11 @@ struct ssl_service_status
};
struct ssl_service_cache;
struct ssl_service_cache* ssl_service_cache_create(unsigned int slot_size, unsigned int expire_seconds);
struct ssl_service_cache* ssl_service_cache_create(unsigned int slot_size, unsigned int expire_seconds, int fail_as_pinning_cnt, int fail_as_proto_err_cnt, int fail_time_win);
void ssl_service_cache_destroy(struct ssl_service_cache* cache);
int ssl_service_cache_read(struct ssl_service_cache* svc_cache, const struct ssl_chello* chello, struct ssl_service_status* result);
void ssl_service_cache_write(struct ssl_service_cache* svc_cache, const struct ssl_chello* chello, const struct ssl_service_status* status);
int ssl_service_cache_read(struct ssl_service_cache* svc_cache, const struct ssl_chello* chello, const struct tfe_stream_addr * addr, struct ssl_service_status* result);
void ssl_service_cache_write(struct ssl_service_cache* svc_cache, const struct ssl_chello* chello, const struct tfe_stream_addr * addr, const struct ssl_service_status* status);
struct ssl_service_cache_statistics
{
long long pinning_cli_cnt;