upgrade core add header check and incrace upload speed

This commit is contained in:
UnknownObject
2026-08-05 17:35:27 +08:00
parent 45af94e535
commit 1f11a9d348
76 changed files with 2059 additions and 642 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "Global.h"
#include "Export.h"
#include "IPTable.h"
@@ -23,9 +23,14 @@ public:
void AddStreamSettings(std::string method, bool stream);
public:
// 主接口,重载以实现对请求的处理
virtual uns::ResponsePtr Processor(uns::RequestPtr request) = 0;
// 路径穿越配置,重载以配置允许的路径穿越类型
virtual uns::PathTraversalDefenceLevel PTDefence();
// 路径穿越防护,重载以实现路径穿越检查,配置为AutoNormalize或AllowNormal时必须,否则自动退化为DenyAll
virtual bool IsPathSafe(const std::string& raw_path);
// 请求头预检,重载以实现在接收请求体之前检查请求头,返回false则服务器将强制关闭连接
virtual bool IsHeaderValid(uns::RequestPtr request);
public:
uns::ResponsePtr Handle(uns::RequestPtr request);