Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: introduce tun #54

Merged
merged 9 commits into from
Jan 22, 2024
Merged

refactor: introduce tun #54

merged 9 commits into from
Jan 22, 2024

Conversation

ainghazal
Copy link
Collaborator

This is the seventh (and in a sense, last) commit in the series of incremental refactoring of the current minivpn tree. With this package we have all the needed layers to start reasoning about the complete architecture.

TUN uses a similar strategy to the TLSBio in the tlssession package: it uses channels to communicate with the layer below (the data channel), and it buffers reads.

Reference issue: #47

@ainghazal ainghazal changed the title refactor: introduce tun #53 refactor: introduce tun Jan 19, 2024
@ainghazal ainghazal self-assigned this Jan 19, 2024
internal/tun/setup.go Outdated Show resolved Hide resolved
internal/tun/setup.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
ainghazal and others added 3 commits January 19, 2024 18:24
internal/tun/tun.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bassosimone bassosimone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the proposed changes 🐳

internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
internal/tun/tun.go Outdated Show resolved Hide resolved
@ainghazal ainghazal merged commit b90d50a into ooni:main Jan 22, 2024
@ainghazal ainghazal deleted the refactor-tun branch January 22, 2024 11:41
ainghazal added a commit that referenced this pull request Jan 24, 2024
This is a follow-up to the ongoing architectural refactor after the last
merged layer (#54).

Here we add documentation to the layered approach.

Additionally, we change the `OnWorkerDone()` call so that the worker's
name is passed in the call and logging responsibility for the done event
belongs to the `workers.Manager`.

Reference issue: #47

---------

Co-authored-by: Simone Basso <bassosimone@gmail.com>
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.

None yet

2 participants