daeuniverse / dae

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

feat: support to maintain udp conn state #493

Closed mzz2017 closed 2 months ago

mzz2017 commented 2 months ago

Background

In the past, the eBPF program did not track UDP connections, which resulted in us needing to explicitly add the UDP listen port to the whitelist in routing, which was inelegant.

In this PR, we introduced bpf_timer to maintain the connection state of UDP to solve this problem.

By default, the UDP connection timeout is 300s.

Notice: Kernel version >= 5.15 is required to use bpf_timer, thus the requirement for wan proxy is increased.

Checklist

Full Changelogs

Issue Reference

Closes #475

Test Result

sumire88 commented 2 months ago

Could we also fix the linting error?

LostAttractor commented 2 months ago

In my simple test, for DNS traffic it works as expected. Also, It seems possible to do something similar with lan proxy?