hahahrfool
|
ce735dbb99
|
修订udp代码; dial配置 添加 fullcone 选项;默认为非fullcone
现在整个程序均通过了go test, main 也可以正常运行了。
Relay_UDP 函数添加流量计数;
发现之前 Relay函数的流量计数 在main.go里参数传反了,导致实际上计数的是上传而不是下载,已修复
对fullcone的情况做了特别考量。MsgConn的 Close函数在fullcone时不能随便被调用。
因此我添加了一个 CloseConnWithRaddr(raddr Addr) error 方法,以及 Fullcone() bool 方法
在utils包的init部分使用 rand 随机种子
|
2022-04-08 20:31:59 +08:00 |
|
hahahrfool
|
447bd8749a
|
重构所有udp部分的代码! 摒弃了过去非常复杂的upd转发机制;
不再使用 UDP_Putter 等机制去转发udp,而是用一个 netLayer.MsgConn 结构
proxy.Server 和 proxy.Client 接口改动,
Client在握手udp时不再使用handshake方法, 而是用新的 EstablishUDPChannel 方法
Server 在 Handshake时会选择性返回两种接口,io.ReadWriteCloser 用于tcp, netLayer.MsgConn 用于 udp
此时vless、socks5、direct 的udp转发都已经成功经过了 go test 验证, 但是 main.go 还未修改。
|
2022-04-08 13:49:56 +08:00 |
|
hahahrfool
|
6291babff3
|
修订代码, 示例, 优化quic,设最大多路复用路数 为 4路.
之前代码使用纯单路且stream上限为320个,idle时间为2小时
现在自己思考发现完全不合理。
单个session内存在的stream数量 越少性能越高
重构了quic部分的代码。
添加一种主动记录服务端能承受的最大stream数量的机制,每次建立新stream时都试图找到 stream最少的一条可用session。
这种缓存session的做法实际上类似 连接池技术。
修复一些小问题.
|
2022-04-07 22:31:29 +08:00 |
|
hahahrfool
|
2d384314f4
|
修订,重构代码, 修复dns的bug; 添加Dns的DoT功能.
修复dns配置中"特殊服务器" 无法被正确配置、使用的bug
将 proxy.Standard结构 移动到 项目根目录的 StandardConf.
将 proxy.AppConf, LoadTomlConfStr, LoadTomlConfFile 函数 移动到根目录
因为 StandardConf和 AppConf里包含很多App级别的配置, 不宜放到proxy子包中
将 proxy.RuleConf 移动到 netLayer
将 proxy.LoadRulesForRoutePolicy 移动到 netLayer
将 proxy.LoadDnsMachine 移动到 netLayer
在dnsquery失败后,会判断错误, 若发现是Read错误,则会试图重新拨号
|
2022-04-07 13:45:24 +08:00 |
|
hahahrfool
|
60329c2109
|
修复ipv6判断写反的bug,此bug恰巧会导致ipv6主机无法访问ipv6
|
2022-04-03 17:58:26 +08:00 |
|
hahahrfool
|
2b8d966909
|
修订代码
|
2022-04-03 17:10:25 +08:00 |
|
hahahrfool
|
765f0bb113
|
修订代码;将默认loglevel改为warn;提前判断本机是否具有ipv6;
|
2022-04-02 20:36:15 +08:00 |
|
hahahrfool
|
b97e990b44
|
尝试引入zap包作为log包
|
2022-03-31 18:28:57 +08:00 |
|
hahahrfool
|
a579dc1d40
|
修订代码,注释,示例,文档
|
2022-03-28 09:39:41 +08:00 |
|
hahahrfool
|
b7509da72a
|
修订代码,文档,注释; 用 gonum数学包来加速fallback匹配
默认不再输出supported protocols,而是用 -sp 参数 打印输出
在utils中添加 AllSubSets_improve1, 能比 AllSubSets性能更好
添加一些 关于排列组合的测速
|
2022-03-24 22:11:55 +08:00 |
|
hahahrfool
|
a540cdd183
|
修订代码,注释
|
2022-03-23 10:41:42 +08:00 |
|
hahahrfool
|
4d2bbaeceb
|
完善对writev的支持;为vless和ws实现MultiWriter;修订代码
|
2022-03-22 22:39:26 +08:00 |
|
hahahrfool
|
b14c1d03c1
|
为godoc文档对注释进行修订
|
2022-03-21 09:13:10 +08:00 |
|
hahahrfool
|
b1c4f5a5d1
|
feat:完整实现websocket.修订文档,注释,代码
添加了 ws.server.toml 和 ws.client.toml 这两个示例文件.
|
2022-03-20 16:59:58 +08:00 |
|
hahahrfool
|
a890d39ac7
|
添加toml标准配置格式支持;重构配置相关的代码;修订文档
添加了path分流部分的go test,简单修订 GetRequestPATH_from_Bytes 函数
|
2022-03-18 19:09:02 +08:00 |
|
hahahrfool
|
405207bc56
|
将netLayer抽象出来,proxy.Addr现在变成netLayer.Addr
netLayer里包含关于 网络层 以及传输层 的各种定义.
这里为了添加 类似 v2simple的 common.Matcher的功能,特地抽象出来一个层.
而且增添了第一个外部依赖包,github.com/yl2chen/cidranger包.
|
2022-03-16 09:01:43 +08:00 |
|