daeuniverse / dae

eBPF-based Linux high-performance transparent proxy solution.
GNU Affero General Public License v3.0
3.28k stars 203 forks source link

[Enhancement] CI improvements #521

Open jschwinger233 opened 5 months ago

jschwinger233 commented 5 months ago

Improvement Suggestion

1. Cover more scenarios and features

2. Simplify CI tests

3. Keep up with kernel

Potential Benefits

With more to cover, bugs are more likely to be caught before merging.

dae-prow[bot] commented 5 months ago

Thanks for opening this issue!

linglilongyi commented 1 month ago

hi, is there anything to do for a start?

jschwinger233 commented 3 weeks ago

@linglilongyi

这件事的目标是做一个 e2e (end to end) 测试,覆盖常用的使用场景。

我的想法是参考 Kind 的做法用容器模拟节点。kind 利用 docker 容器在本地能够拉起一套多节点 k8s 集群,每个容器内部就像真正的节点一样跑着 workload pod。那么我们也可以借鉴这种思路,在容器A运行dae和一些pod,绑定wan和lan,在容器B运行譬如v2ray server,这样就模拟出一个两节点dae->v2ray->world的代理链路。

在上述框架里,我们可以测试各种路由规则、不同的协议、甚至性能测试。

如果想要上手可以试试本地复现 https://github.com/daeuniverse/dae/blob/main/.github/workflows/kernel-test.yml,里面都是 shell 命令,做的事情基本就是上述用容器模拟节点的事情,但是做得很烂,仅限能跑起来,还有不少 bug,测试场景也极少。如果能看懂,可以试着改善这个框架,也可以试着拓展测试。

DM is welcome.