Server build sources - ttpreport/ligolo-mp GitHub Wiki

Quick build

You can build both server and client binary with make:

$ make all

Manual build

If you want to tweak some flags or versions used, you can follow the makefile steps below.

Packaging golang environment

export GO_VER = 1.20
export BLOAT_FILES = AUTHORS CONTRIBUTORS PATENTS VERSION favicon.ico robots.txt SECURITY.md CONTRIBUTING.md LICENSE README.md ./doc ./test ./api ./misc
export GARBLE_VER = 0.10.1

cd artifacts && curl -L --output go$(GO_VER).$(TARGET_OS)-$(TARGET_ARCH).tar.gz https://dl.google.com/go/go$(GO_VER).$(TARGET_OS)-$(TARGET_ARCH).tar.gz
cd artifacts && tar xvf go$(GO_VER).$(TARGET_OS)-$(TARGET_ARCH).tar.gz
cd artifacts/go && rm -rf $(BLOAT_FILES)
rm -f artifacts/go/pkg/tool/$(TARGET_OS)_$(TARGET_ARCH)/doc
rm -f artifacts/go/pkg/tool/$(TARGET_OS)_$(TARGET_ARCH)/tour
rm -f artifacts/go/pkg/tool/$(TARGET_OS)_$(TARGET_ARCH)/test2json

cd artifacts/go/bin && curl -L --output garble https://github.com/ttpreport/garble/releases/download/v$(GARBLE_VER)/garble_$(TARGET_OS)_$(TARGET_ARCH) && chmod +x garble
cd artifacts && zip -r go.zip ./go
cd artifacts && rm -rf go go$(GO_VER).$(TARGET_OS)-$(TARGET_ARCH).tar.gz

Packaging agent template

cd artifacts/agent && go mod tidy
cd artifacts/agent && go mod vendor
cd artifacts/agent && zip -r ../agent.zip .

Build server

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -mod=vendor -trimpath -o ligolo-mp ./cmd/server/

Next steps

Since you have the binary now, to complete the installation, you might want to follow manual server installation guide next.