host: add opt-in networking with host-proxied sockets - #23
Merged
Conversation
Contributor
There was a problem hiding this comment.
Linux Benchmarks
Details
| Benchmark suite | Current: fceb11f | Previous: f3c3ce4 | Ratio |
|---|---|---|---|
hello_world (median) |
20 ms |
20 ms |
1 |
pandas (median) |
110 ms |
110 ms |
1 |
density (per VM) |
7 MB |
7 MB |
1 |
snapshot (disk) |
385 MiB |
384 MiB |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
Contributor
There was a problem hiding this comment.
Windows Benchmarks
Details
| Benchmark suite | Current: fceb11f | Previous: f3c3ce4 | Ratio |
|---|---|---|---|
hello_world (median) |
191 ms |
215 ms |
0.89 |
pandas (median) |
550 ms |
634 ms |
0.87 |
density (per VM) |
6 MB |
6 MB |
1 |
snapshot (disk) |
393 MiB |
392 MiB |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
Adds a SocketTable and net_* tool handlers (net_socket, net_connect, net_bind, net_listen, net_accept, net_send, net_sendto, net_recv, net_recvfrom, net_close, net_shutdown, net_setsockopt, net_getsockopt, net_getpeername, net_getsockname) using socket2 for cross-platform socket management. Registered automatically via register_net_tools. Signed-off-by: danbugs <danilochiarlone@gmail.com>
Python networking test using host-proxied sockets (hostsock). Includes HTTP GET client (raw sockets, no DNS needed) and a TCP echo server. kraft.yaml enables LIBPOSIX_SOCKET + LIBHOSTSOCK and points to danbugs/unikraft:networking for the hostsock driver. Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
…pyhl Signed-off-by: danbugs <danilochiarlone@gmail.com>
Add hostsock networking config to kraft.yaml (pointing to danbugs/unikraft networking branch) and bundle DNS resolv.conf, nsswitch.conf, hosts, and CA certificates into the CPIO rootfs so the guest can resolve hostnames and make TLS connections. Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
…ged upstream) Signed-off-by: danbugs <danilochiarlone@gmail.com>
danbugs
marked this pull request as ready for review
May 14, 2026 14:56
Signed-off-by: danbugs <danilochiarlone@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
net_socket,net_bind,net_connect,net_send,net_recv,net_sendto,net_recvfrom,net_close,net_getsockopt) that let Unikraft guests make TCP/UDP connections through the host--net(allow all) or--net-allow HOST(allowlist) on both thehyperlight-unikraftCLI andpyhlNetworkPolicytype withAllowAllandAllowListvariants; enforcement atnet_connectandnet_sendto(outbound-only gating)AllowList::from_hostsresolves hostnames to IPs at construction time (fail-closed on resolution failure)SandboxBuilder,evolve_*, snapshot loading, and thepyhllibrary APInetworking-pyexample with HTTP GET, urllib, HTTPS/TLS, and echo server demospython-agent-driverkraft.yaml updated to enable hostsock + FD infrastructure; Dockerfile updated with DNS config and CA certificates for TLSDepends on the
networkingbranch of danbugs/unikraft for the guest-sidelib/hostsocksocket driver.