Compilation
Some components require specific Go build tags:
client:-tags clientmini_agent:-tags mini
The project can also be built using GoReleaser.
Optional build dependencies
garblefor binary obfuscation (https://github.com/burrowers/garble)upxfor binary compression https://github.com/upx/upxgoreleaserfor automated builds https://github.com/goreleaser/goreleaser
Agent
Direct compilation
go build -o tealc ./agent
Using the wrapper script
go run ./scripts/build/ --id agent --goos windows --goarch amd64 --no-seed --gen-age-key=false --gen-access-token=false
Using the client CLI
tealc compile --id agent --goarch amd64 --goos windows
Note
Compiling with the CLI is recommended as it allows passing compile-time variables to the agent (see [How to feed variables])
Server
Direct compilation
go build -o goauld_server ./server
Using the wrapper script
go run ./scripts/build/ --gen-age-key=false --gen-access-token=false --id server --goos linux --goarch amd64 -vvv
Client
Direct compilation
go build -tags client -o tealc ./client
Using the wrapper script
go run ./scripts/build/ --gen-age-key=false --gen-access-token=false --id client --goos linux --goarch amd64 -vvv
Compile using the client (recommended)
tealc compile --id [[client|server|agent|mini_agent|agent-dll]]