Skip to content

Installation

Cole Brumley edited this page Mar 30, 2017 · 3 revisions

Build

Using go get

Using make is the preferred build method on Linux and OSX, however the repo is technically go get compatible. If you have Go installed and configured correctly, you can install tlspxy with go get github.com/colebrumley/tlspxy.

There are some caveats to this method though. go get will not produce a statically linked binary and no version or commit information will be defined since those values are injected at build time.

Using make

To build a statically linked binary for the current OS and architecture (provided the architecture is Linux or OSX), run make.

Use make docker to build a docker image. The build uses golang:latest from Docker Hub to build a statically-linked 64-bit linux binary, then uses that binary for the container image.

On Windows

Obviously, make will not work natively on Windows. Using go get still works, but the following steps will produce a binary with the appropriate commit info and version specified:

go get -d github.com/colebrumley/tlspxy
cd %GOPATH%\src\github.com\colebrumley\tlspxy
setx CGO_ENABLED=0
go build -ldflags "-X main.AppVersion=VERSION -X main.CommitID=COMMIT_ID" -x -v -a -installsuffix cgo -o tlspxy

Then the binary can be moved wherever you'd like.

Clone this wiki locally