From 61e71f3a632adbb5049c8516773926b8f4681198 Mon Sep 17 00:00:00 2001 From: Ikramullah Date: Fri, 9 Aug 2024 11:22:19 +0700 Subject: [PATCH] refactor(make): add static linking for alpine based build fix(client/proxy): forget to add proxy on args builder --- Makefile | 2 +- internal/shell.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b65903..e4bf92f 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ restore: go get -C ./internal build-client: restore - go build -C ./cmd/mdrop-client -ldflags="-linkmode external -extldflags -w -s" -o "../../mdrop" + go build -C ./cmd/mdrop-client -ldflags="-linkmode external -extldflags -static -w -s" -o "../../mdrop" build-tunnel: restore go build -C ./cmd/mdrop-tunnel-tools -ldflags="-linkmode external -extldflags -static -w -s" -o "../../mdrop-tunnel" diff --git a/internal/shell.go b/internal/shell.go index 77dcaf4..cfa29c8 100644 --- a/internal/shell.go +++ b/internal/shell.go @@ -25,6 +25,8 @@ func (s SSHParameter) GenerateConnectSSHArgs() string { "tunnel@" + s.ConfigFile.Host, } args = append(args, s.Command...) + s.GenerateProxyArgs(&args) + return "ssh "+strings.Join(args, " ") } @@ -51,6 +53,7 @@ func (s SSHParameter) GenerateRemoteSSHArgs() string { args..., ) } + s.GenerateProxyArgs(&args) return "ssh "+strings.Join(args, " ") }