添加readv功能;给出测试数据;修订代码,注释;

toml 新增 app.noreadv项,命令行参数新增 -readv

默认readv是打开状态,可以选择性关闭。
This commit is contained in:
hahahrfool
2022-03-22 14:12:32 +08:00
parent e75860ef7a
commit 5661c8737f
18 changed files with 715 additions and 51 deletions

View File

@@ -161,6 +161,9 @@ func prepareTLS_forProxyCommon_withURL(u *url.URL, isclient bool, com ProxyCommo
}
// ProxyCommonStruct 实现 ProxyCommon中除了Name 之外的其他方法
// 规定所有的proxy都要内嵌本struct
// 这是verysimple的架构所要求的。verysimple规定在加载完配置文件后一个listen和一个dial所使用的全部层级都是确定了的
// 因为所有使用的层级都是确定的,就可以进行针对性优化
type ProxyCommonStruct struct {
Addr string
TLS bool
@@ -230,6 +233,10 @@ func (pcs *ProxyCommonStruct) AdvancedLayer() string {
return pcs.AdvancedL
}
//do nothing. As a placeholder.
func (s *ProxyCommonStruct) Stop() {
}
// 从 url 初始化一些通用的配置,目前只有 u.Host
func (pcs *ProxyCommonStruct) InitFromUrl(u *url.URL) {
pcs.Addr = u.Host