automated "fork" of gVisor that only contains the netstack bits so the go.mod is smaller. maintained by scripts, not humans.

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 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 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 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.

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, not the cmd/go Go tool
  • so some other scripts rearrange the GitHub repo into the gVisor "go" branch (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.

Similar Resources

A tool to determine the highest version number that's smaller than a target version number

semver-highest A tool to determine the highest version number that's smaller than a target version number. Installation go install github.com/marten-s

Oct 13, 2021

Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

Dec 29, 2022

Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

kubectl-slice: split Kubernetes YAMLs into files kubectl-slice is a neat tool that allows you to split a single multi-YAML Kubernetes manifest into mu

Jan 3, 2023

A simple multi-layered config loader for Go. Made for smaller projects. No external dependencies.

gocfg ⚠️ Work in progress! A simple multi-layered config loader for Go. Made for smaller projects. No external dependencies. Example From main.go: //

Dec 26, 2021

A simple multi-layered config loader for Go. Made for smaller projects. No external dependencies.

config ⚠️ Work in progress! A simple multi-layered config loader for Go. Made for smaller projects. No external dependencies. Installation go get -u g

Dec 26, 2021

General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game.

General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game.

Introduction General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game. Features Compatible with a

Aug 19, 2022

A youtube library for retrieving metadata, and obtaining direct links to video-only/audio-only/mixed versions of videos on YouTube in Go.

A youtube library for retrieving metadata, and obtaining direct links to video-only/audio-only/mixed versions of videos on YouTube in Go. Install go g

Dec 10, 2022

log4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web servicelog4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web service

log4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web servicelog4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web service

log4jScanner Goals This tool provides you with the ability to scan internal (only) subnets for vulnerable log4j web services. It will attempt to send

Jan 5, 2023

Surprisingly space efficient trie in Golang(11 bits/key; 100 ns/get).

Surprisingly space efficient trie in Golang(11 bits/key; 100 ns/get).

Slim - surprisingly space efficient data types in Golang Slim is collection of surprisingly space efficient data types, with corresponding serializati

Jan 2, 2023

Program that counts the bits in an unsigned integer

popcountloop This is an exercise of the book The Go Programming Language, by Ala

Dec 18, 2021

Shuffle bits in byte slice, written in golang

Shuffle 'em It is a library for bit shuffling, written in golang. The usecases a

Dec 27, 2021

Kiteco-public - Primary Kite repo — private bits replaced with XXXXXXX

This is a public version of the main Kite repo The main Kite repo (originally kiteco/kiteco) was intended for private use. It has been lightly adapted

Dec 30, 2022

It's a basic newtonian gravity simulation written in Go using floating point numbers with 1024 bits of accuracy

Float 1K Gravity What is it? It's a basic newtonian gravity simulation written in Go using floating point numbers with 1024 bits of accuracy. It is cu

Dec 13, 2022

A Go library that provides functions for bytes and bits.

Byteman A Golang library that provides functions for bytes and bits. Usage See byteman_test.go, numbers_test.go and strings_test.go. Test # Test every

Apr 19, 2022

[NO LONGER MAINTAINED} oauth 2 server implementation in Go

hero hero is a feature rich oauth 2 server implementation in Go. Features User account management Client management oauth 2 rfc 6749 compliant Configu

Nov 18, 2022

copy files for humans

Go-Decent-Copy go-decent-copy provides a copy file for humans Usage package main import "github.com/hugocarreira/go-decent-copy" func main() { e

Sep 26, 2022

Go Humans! (formatters for units to human friendly sizes)

Humane Units Just a few functions for helping humanize times and sizes. go get it as github.com/dustin/go-humanize, import it as "github.com/dustin/go

Dec 25, 2022

Golang beautify data display for Humans

Golang beautify data display for Humans English 简体中文 Install # Stable version go get -u -v gopkg.in/ffmt.v1 # Latest version go get -u -v github.com/

Dec 22, 2022

Go Humans! (formatters for units to human friendly sizes)

Humane Units Just a few functions for helping humanize times and sizes. go get it as github.com/dustin/go-humanize, import it as "github.com/dustin/go

Jan 2, 2023
Comments
  • Question about deprecation

    Question about deprecation

    As of 7585b01ddccf285fc598761f6ce4bd4dd0ee24ee this repository seems to claim it is no longer required, in favour of using the tcpip package from github.com/google/gvisor or gvisor.dev/gvisor directly (claiming that Go 1.17 fixes the lazy loading at least). However, I have been completely unable to move across to upstream.

    Trying to substitute the inet.af/netstack/tcpip imports in my own project with gvisor.dev/gvisor/pkg/tcpip results in catastrophic build errors on seemingly all recent commits. Dozens of issues — go mod tidy fails for various reasons, go test ./... reports build errors and my own application fails to build too. I've tried this with various recent commits, including with the release-20211115.0 tag that this repository seemed to last import. Trying this on a Linux machine instead of a Mac produces some different results but still unusable. Both with Go 1.17.

    However, release-20211115.0 of inet.af/netstack works perfectly, even on macOS.

    With that in mind, is this repository really no longer required? It seems like upstream is totally unusable somehow, and yet none of these issues manifest with inet.af/netstack — this fork works flawlessly. It seems like this repository still very much solves a problem in making netstack usable in isolation.

    Am I missing something obvious here?

  • add a go.mod file

    add a go.mod file

    I realise that this library is still usable without being a module directly, but I imagine there's no reason to avoid adding a go.mod file either?

    One good reason to add a go.mod file is that one can use commands like go build, go list, and so on. Another is UX: it's not entirely clear that I'm meant to import this as inet.af/netstack rather than github.com/inetaf/netstack if I don't see a go.mod saying as much.

  • Please upgrade upsteam gvisor version (after memory leak fix)

    Please upgrade upsteam gvisor version (after memory leak fix)

    ~~Upstream fix a memory leak problem on Fix PacketBuffer memory leak.~~

    gVisor not fully resolved this memory leak, waiting for them to make a full fix

    Maybe this repository should be synced upstream?

The go mod init command initializes and writes a new go.mod file in the current directory

go mod: The go mod init command initializes and writes a new go.mod file in the current directory, in effect creating a new module rooted at the curre

Nov 21, 2021
A fork of the simple WireGuard VPN server GUI community maintained
A fork of the simple WireGuard VPN server GUI community maintained

Subspace - A simple WireGuard VPN server GUI Subspace - A simple WireGuard VPN server GUI Slack Screenshots Features Contributing Setup 1. Get a serve

Dec 25, 2022
Reflectionless data binding for Go's net/http (not actively maintained)
Reflectionless data binding for Go's net/http (not actively maintained)

binding Reflectionless data binding for Go's net/http Features HTTP request data binding Data validation (custom and built-in) Error handling Benefits

Nov 18, 2022
netcat using netstack userspace library

netkat netcat version using raw sockets to avoid iptables and/or other OS filtering mechanisms. Install make build Usage It requires root privileges:

Dec 9, 2022
This repository contains utility functions that do not make sense in other packages.

Installation go get github.com/IQ-tech/go-utils Executing code before process exits AtInterruption receives a function that will be called once befor

Dec 9, 2021
This is old and unmaintained code, ignore it. starfish is a simple, SDL based, 2D graphics and user input library for Go. If you intend to work on it, please fork from the 'devel' branch, not 'master'. Current release: 0.12.0

What is starfish? What starfish is: starfish is a simple 2D graphics and user input library for Go built on SDL. What starfish is not: While it is bui

Jun 4, 2019
Distributed lock manager. Warning: very hard to use it properly. Not because it's broken, but because distributed systems are hard. If in doubt, do not use this.

What Dlock is a distributed lock manager [1]. It is designed after flock utility but for multiple machines. When client disconnects, all his locks are

Dec 24, 2019
Coral, a friendly Cobra fork with nearly all its features, but only 4 dependencies
Coral, a friendly Cobra fork with nearly all its features, but only 4 dependencies

Coral Preamble I love Cobra and I love Viper. They are great projects, incredibly useful and outstandingly important for the Go community. But sometim

Dec 29, 2022
✏️ CLI tool to split a file into smaller sub-files

filesplit CLI tool to split a file into smaller sub-files Build $ go build Usage filesplit [mode] [-F, --file] [-N, --number] Examples # Split foo.txt

Apr 20, 2022