Commit Graph

35 Commits

Author SHA1 Message Date
e1732a364fed
d4a3a29364 feat: dns的监听功能, 配置添加 dns.listen 项 2022-12-21 11:17:12 +08:00
e1732a364fed
e727490b4b 修订文档,示例 2022-12-06 00:24:26 +08:00
e1732a364fed
450bf2243c 修订代码,注释;令udp的direct拨号也遵循sendThrough配置 2022-09-23 09:29:24 +08:00
e1732a364fed
744e18d379 close #152, 添加dns的ttl_strategy;详见multi_client.toml 2022-09-22 21:00:15 +08:00
e1732a364fed
7b79887d50 修订注释;小优化。 2022-09-20 17:50:07 +08:00
e1732a364fed
55ea3c6a66 close #141, 支持sendThrough配置 2022-09-15 10:30:26 +08:00
e1732a364fed
8a96afe5e2 修订文档,示例,代码 2022-05-18 21:10:00 +08:00
e1732a364fed
a219ccb671 fix #96, 默认dns若连不上,会出现空指针闪退 2022-05-15 19:31:31 +08:00
e1732a364fed
d4fe3a7062 修复issue #67: route 的 domain 多个 规则 写在 列表里时不会完全匹配到. 2022-05-08 13:13:10 +08:00
e1732a364fed
dface33524 将分流的inTag改名为fromTag, dialTag改名为 toTag 2022-05-06 22:58:26 +08:00
e1732a364fed
d245c25357 修订文档 2022-05-04 13:17:24 +08:00
hahafool
22fc0722f3 修订文档, 代码; 添加reject协议,与v2ray的blackhole等价;
RejectClient 直接在 proxy包内实现,而不是放在子包。

把direct也放到了proxy中。因为 direct和 reject是两个通用client,不需要单列出来。
2022-04-22 13:51:36 +08:00
hahahrfool
d3ec3fddcd 修订示例、代码;为添加trojan 作准备 2022-04-08 10:42:01 +08:00
hahahrfool
73e26386ec 修订文档,示例,代码 2022-04-08 08:24:04 +08:00
hahahrfool
30eb874dc2 修订代码,示例;添加 udp_timeout 配置 2022-04-07 14:03:31 +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
740561a2c6 修订文档,示例,注释,代码;交互模式新增 热添加配置文件 功能 2022-04-06 17:41:06 +08:00
hahahrfool
0f4acfb168 修订代码、配置、示例 2022-04-06 14:00:23 +08:00
hahahrfool
f6081cc8be 修订代码;添加【下载geosite文件】的交互命令,可自动通过节点下载 2022-04-05 19:08:44 +08:00
hahahrfool
3a997a32bc 修订代码,示例;添加geosite分流,域名现已支持full,sub,regex,geosite,match 2022-04-05 08:59:26 +08:00
hahahrfool
b66cf34d02 添加一个命令行参数, 改进route机制;修复空指针bug;详情如下
添加-nd参数,意思是nodownload,不自动下载任何数据文件
route配置项的 dialTag现在可以为一个string也可以为一个 []string,用于负载均衡
2022-04-04 13:08:03 +08:00
hahahrfool
8a1c86b933 添加解析域名策略,0默认4先查ip4,6先查6;40只查ipv4,60只查ipv6 2022-04-03 21:56:01 +08:00
hahahrfool
2c9c993c11 修订文档、示例; 修复在windows上直连时readv闪退的bug;
这次在程序ctrl+C关闭时, 会主动Close所有的监听端口. 主要是被报告windows有时退出程序之后, 端口还是处于占用状态.

试图引进新的 Makefile_release 文件 以及新的workflow文件 来快速编译发布包
2022-04-03 14:32:23 +08:00
hahahrfool
4397a7225c 删掉过于复杂的workflow编译,节约能源;修订代码,文档,示例 2022-04-03 10:58:23 +08:00
hahahrfool
814bcb29f5 添加大量交互模式功能
为交互模式添加如下功能:生成uuid,生成随机tls证书,查询当前状态,交互式生成配置文件
2022-04-01 19:13:47 +08:00
hahahrfool
8ad0905ce9 feat:apiServer;修复生成的证书无法使用的问题;修复小bug
添加如下命令行参数

-i interactive mode (只是加了一个参数, 还未实现交互功能)
-ea enable api server
-spp api Server Path Prefix, must start with '/',默认值 /api

只有 -ea命令行参数给出后,才会运行api服务器

默认allstate 的api的url 为  https://127.0.0.1:48345/api/allstate

用到basic auth,用户名为admin
密码的toml配置是

[app]
admin_pass = "adfadfadfadfa"

修订 api草案
2022-04-01 17:52:18 +08:00
hahahrfool
e732ea3c3b 修订代码;修复loglevel为debug时失效问题;dns请求加锁,已经可用 2022-04-01 12:31:47 +08:00
hahahrfool
dfecd89d14 添加dns功能; 解决grpc 悬垂链接问题;
该悬垂问题可能就是v2ray/xray的 “grpc断流问题”,已被本commit轻松搞定。

dns配置:

[dns]
servers = [
  "udp://114.114.114.114:53"      # 如果把该url指向我们dokodemo监听的端口,就可以达到通过节点请求dns的目的.
]

[dns.hosts]     # 自己定义的dns解析
"www.myfake.com" = "11.22.33.44"
"www.myfake2.com" = "11.222.33.44"

一旦配置了dns项,则所有dns都会试图向默认dns服务器请求;

该功能尚不完善。
2022-04-01 00:26:35 +08:00
hahahrfool
81160e8db2 广泛修订代码, 注释 2022-03-28 22:07:18 +08:00
hahahrfool
9523ad3e90 修订注释,示例文件 2022-03-27 21:45:40 +08:00
hahahrfool
f9872feee7 修订代码,文档,注释,示例. 2022-03-27 21:06:57 +08:00
hahahrfool
3838c251ce 修订代码,文档,注释,示例 2022-03-26 13:27:14 +08:00
hahahrfool
74d4693894 修复两个err出现时在return前忘close连接的bug;修订示例,注释; 2022-03-24 14:19:44 +08:00
hahahrfool
2c21d62f02 修订示例配置文件,修改其中的错误 2022-03-23 12:56:57 +08:00
hahahrfool
4dc6d16605 minor improvement 2022-03-23 09:35:08 +08:00