9 Commits
Author SHA1 Message Date
Andrei Vagin f010ae01ac Fix a few typos 2025-01-29 21:16:51 -08:00
Jing ChenandgVisor bot cf5c4c9cbf Replace reflect.DeepEqual with [slices/maps].Equal.
They are faster on slice/map comparisons.

PiperOrigin-RevId: 633080355
2024-05-12 21:20:18 -07:00
Kevin KrakauerandgVisor bot 64268c8483 netstack: make tcpip.Address an opaque type
The important change here is in tcpip/tcpip.go, where tcpip.Address is defined.
The rest is updating uses of tcpip.Address.

This is preparation for netip.Addr or []byte based addresses, which should save
us a bunch of allocations. Currently, we allocate every time we want to, say,
get a tcpip.Address from a header. This is because the header is a byte slice,
but Address is a string. Strings are immutable, so Go allocates and copies.

PiperOrigin-RevId: 532284732
2023-05-15 18:07:03 -07:00
Zach KoopmansandgVisor bot f92957314c Add portforward command to runsc
Add portforward comand so that we can use runsc to forward connections
to container ports. This will eventually be supported in k8s.

PiperOrigin-RevId: 520739913
2023-03-30 14:16:19 -07:00
Adin ScannellandgVisor bot 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Zach KoopmansandgVisor bot 0927892f49 Refactor portforward packages to eliminate storing context.Context
Refactor to avoid storing context.Context in portforward structures. Also,
reduce the number of places where copying between two connections is used.

PiperOrigin-RevId: 508695162
2023-02-10 10:33:02 -08:00
Zach KoopmansandgVisor bot 373a440374 Implement netstack port forward
Implement portforward support methods for sandboxes using netstack for their
network stack.

PiperOrigin-RevId: 503298590
2023-01-19 16:45:29 -08:00
Zach KoopmansandgVisor bot 1ae11b17a9 Implement hostinet port forward
Implement support sandboxes using hostinet for their network stack. Included
is an implmentation of a connection servering a sandboxed process forwarding
to a socket on a local port.

PiperOrigin-RevId: 502692640
2023-01-17 14:44:39 -08:00
Zach KoopmansandgVisor bot 2deb308638 Add initial portforward fileDescriptionReadWriter methods and tests.
fileDescriptionReadWriter implements io.ReadWriter for use in port
forwarding. Add initial implementation and tests.

PiperOrigin-RevId: 495196971
2022-12-13 20:25:52 -08:00