Skip to content

Commit

Permalink
Merge pull request #3 from marko1777/master
Browse files Browse the repository at this point in the history
Euphoria GO implementation
  • Loading branch information
dpamnezia authored Feb 23, 2025
2 parents e3f1273 + 49464f7 commit b8112ba
Show file tree
Hide file tree
Showing 17 changed files with 736 additions and 272 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
FROM golang:1.23.6 as awg
FROM golang:1.24 as awg

RUN apt-get update && apt install libluajit-5.1-dev -y
COPY . /awg
WORKDIR /awg
RUN go mod download && \
go mod verify && \
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin

RUN go mod download && go mod verify

RUN CGO_LDFLAGS="-lm -lluajit-5.1" go build -tags luajit -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin

FROM alpine:3.19
ARG AWGTOOLS_RELEASE="1.0.20241018"
ARG AWGTOOLS_RELEASE="0.1.0"
RUN apk --no-cache add iproute2 iptables bash && \
cd /usr/bin/ && \
wget https://github.com/amnezia-vpn/amneziawg-tools/releases/download/v${AWGTOOLS_RELEASE}/alpine-3.19-amneziawg-tools.zip && \
wget https://github.com/amnezia-vpn/euphoria-tools/releases/download/v${AWGTOOLS_RELEASE}/alpine-3.19-amneziawg-tools.zip && \
unzip -j alpine-3.19-amneziawg-tools.zip && \
chmod +x /usr/bin/awg /usr/bin/awg-quick && \
ln -s /usr/bin/awg /usr/bin/wg && \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ generate-version-and-build:
@$(MAKE) amneziawg-go

amneziawg-go: $(wildcard *.go) $(wildcard */*.go)
go build -v -o "$@"
go build -tags luajit -ldflags="-w -s" -trimpath -v -o "$@"

install: amneziawg-go
@install -v -d "$(DESTDIR)$(BINDIR)" && install -v -m 0755 "$<" "$(DESTDIR)$(BINDIR)/amneziawg-go"
Expand Down
Loading

0 comments on commit b8112ba

Please sign in to comment.