Skip to content

refactor: use nested Pimpl for Tun, drop std::any - #499

Merged
lanthora merged 1 commit into
masterfrom
refactor/tun-nested-pimpl
Aug 6, 2026
Merged

lanthora merged 1 commit into
masterfrom
refactor/tun-nested-pimpl

Conversation

@lanthora

@lanthora lanthora commented Aug 6, 2026

Copy link
Copy Markdown
Owner
  • Centralize inTunNetwork() in platform-agnostic tun.cc using getIP()/getMask()
  • Replace std::any with unique_ptr; platform tun classes become Tun::Impl
  • Keep ip/mask state in Tun, up() now takes (IP4 ip, IP4 mask)
  • Rename shouldDrop() to invalidSrcDst(), allow broadcast/multicast
  • Remove dead members (timeout, macos name)

@lanthora
lanthora marked this pull request as ready for review August 6, 2026 10:04
@lanthora
lanthora force-pushed the refactor/tun-nested-pimpl branch from 6b58d1b to 9927cc8 Compare August 6, 2026 10:06
- Centralize inTunNetwork() in platform-agnostic tun.cc using getIP()/getMask()
- Replace std::any with unique_ptr<Impl>; platform tun classes become Tun::Impl
- Keep ip/mask state in Tun, up() now takes (IP4 ip, IP4 mask)
- Remove dead members (timeout, macos name)
@lanthora
lanthora force-pushed the refactor/tun-nested-pimpl branch from 9927cc8 to f28b12a Compare August 6, 2026 10:17
@lanthora
lanthora merged commit 433a454 into master Aug 6, 2026
4 checks passed
@lanthora
lanthora deleted the refactor/tun-nested-pimpl branch August 6, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant