talira

go-connections

Utility package to work with network connections

open sourceApache-2.0free

go-connections is Docker's Go library of helpers for network connections, split into packages for specific jobs: nat parses and manipulates strings describing network ports and port bindings ("80/tcp"), sockets creates and configures Unix and TCP sockets and HTTP transports, tlsconfig returns secure-enough TLS configurations for clients and servers, and proxy forwards TCP and UDP traffic between two addresses for software port mapping. It's Apache-2.0 licensed.

Problems it solves

  • parse Docker-style port mappings like 8080:80/tcp in Go
  • get a secure default TLS config for a Go client or server
  • forward TCP or UDP traffic between two addresses from Go code

Features

  • nat: parse port specs and port bindings such as 80/tcp
  • sockets: create and configure Unix and TCP sockets and HTTP transports
  • tlsconfig: secure default TLS configurations for clients and servers
  • proxy: TCP and UDP proxies for software port mapping