1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
# netstack
This is a "fork" of https://github.com/google/gvisor, extracting out
just the "netstack" networking bits, which previously were
self-contained at https://github.com/google/netstack.
## Why?
Because [gVisor's `go.mod` is gigantic](https://github.com/google/gvisor/blob/go/go.mod)
and causes problems to people trying to use it as a library.
Arguably Go's tooling is also somewhat to blame:
Go doesn't make it easy (or even possible) to use a subset (a few
packages) out of a mega module like gVisor without getting impacted
by otherwise-unrelated requirements of that dependent module.
Specifically, [Tailscale](https://github.com/tailscale/tailscale)
wanted to use gVisor's `tcpip` networking packages, which worked fine for a
while, but then one day we bumped our gVisor version to pull in a bug fix we
needed (from the networking-related part of gVisor), and that ended up
making us pull in new conflicting versions of `etcd`. Why? Because
[somewhere in that
`go.mod`](https://github.com/google/gvisor/blob/go/go.mod) Docker or
`grpc` or Kubernetes or whatever depended on etcd somehow. Who knows. We
spent too long trying to fix it and gave up.
Our fix is this repo, pulling netstack out of gvisor like it used to be,
with [a small `go.mod`](https://github.com/inetaf/netstack/blob/main/go.mod).
## Contributing
We don't accept contributions. This repo isn't human-maintained. It's synced from gVisor's "go" branch. In fact, the flow looks like:
* humans maintain gVisor inside Google's internal monorepo (let's call it `googletree`)
* some scripts inside Google export `//googletree/gvisor/...` out into GitHub occasionally
* oh, but `googletree` uses [Bazel](https://bazel.build/), not the `cmd/go` Go tool
* so some other scripts rearrange the GitHub repo into the [gVisor "go" branch](https://github.com/google/gvisor/tree/go) (https://github.com/google/gvisor/#using-go-get)
* some of our scripts then take that "go" rearrangement tree and delete all the Linux and Docker and container stuff, leaving behind only the networking stuff
## License
Same as gVisor.
|