From 78133c0dbdf833cbf338122cbaef9f3ad0620c9a Mon Sep 17 00:00:00 2001 From: Jerry Jacobs Date: Fri, 26 Jul 2024 22:35:01 +0200 Subject: [PATCH] Use garble -tiny flag --- .goreleaser.yaml | 12 ++++++------ Makefile | 4 ++-- README.md | 2 +- scripts/garble-literals.sh | 2 -- scripts/garble.sh | 2 ++ 5 files changed, 11 insertions(+), 11 deletions(-) delete mode 100755 scripts/garble-literals.sh create mode 100755 scripts/garble.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2607b1a..79790f0 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -26,24 +26,24 @@ builds: goarch: - amd64 ldflags: - - -H=windowsgui - gobinary: "scripts/garble-literals.sh" + - -s -trimpath + gobinary: "scripts/garble.sh" buildmode: c-shared tags: - release - dll - - id: "release" + - id: "win-release" env: - CGO_ENABLED=0 goos: - - darwin - - linux - windows goarch: - amd64 - arm64 - gobinary: "scripts/garble-literals.sh" + ldflags: + - -s -w -H=windowsgui + #gobinary: "scripts/garble.sh" tags: - release diff --git a/Makefile b/Makefile index 348db13..71d2d82 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SOURCES=Makefile main.go main_release.go main_debug.go config.go config_release.go config_template.go GARBLE_BIN = $(shell go env GOPATH)/bin/garble -GARBLE_CMD = $(GARBLE_BIN) -literals +GARBLE_CMD = $(GARBLE_BIN) -literals -tiny all: socks5-ssh-proxy @@ -22,7 +22,7 @@ win: socks5-ssh-proxy.exe socks5-ssh-proxy.exe: resources $(GARBLE_BIN) $(SOURCES) GOOS=windows GOARCH=amd64 $(GARBLE_CMD) build -ldflags -H=windowsgui -tags release -o $@ goreleaser: resources $(GARBLE_BIN) - goreleaser build --snapshot + goreleaser build --clean --snapshot -id win-release win-package: ChromeProxyHelperPlugin.zip ChromeProxyHelperPlugin.zip: socks5-ssh-proxy.exe cp socks5-ssh-proxy.exe chrome_proxy.exe diff --git a/README.md b/README.md index 04b2ef8..61069a1 100644 --- a/README.md +++ b/README.md @@ -68,10 +68,10 @@ Following detections have been tested: * * * - * ## Development information * * +* > diff --git a/scripts/garble-literals.sh b/scripts/garble-literals.sh deleted file mode 100755 index a41a663..0000000 --- a/scripts/garble-literals.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -`go env GOPATH`/bin/garble -literals $@ diff --git a/scripts/garble.sh b/scripts/garble.sh new file mode 100755 index 0000000..5dabf69 --- /dev/null +++ b/scripts/garble.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +`go env GOPATH`/bin/garble -literals -tiny $@