inject

package
v0.0.0-...-c3677c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inject

func Inject(ctx context.Context, pid1dir string, subsequentExe []string) error

1. It saves the current namespace 2. It opens the container's network namespace at TITUS_PID_1_DIR/ns/net 3. It calls unshare, and creates an entirely new network namespace (intermediate network namespace). 4. It creates a veth pair in the intermediate 5. It adds the IP address 169.254.169.254 to the veth pair 6. It binds to port 80 in the new netns created 7. It moves a side of the veth into the container's network namespace 8. It sets up a route in the container's netns 9. It changes to the PID ns of the container 10. It calls the metadata proxy code

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL