Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container implementation #3

Merged
merged 1 commit into from
Mar 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:alpine AS go-build

RUN apk --no-cache add --update git
RUN git clone https://github.com/octeep/wireproxy.git
RUN cd ./wireproxy && go build


FROM alpine:latest

RUN apk upgrade
COPY --from=go-build /go/wireproxy/wireproxy /usr/bin/

VOLUME [ "/etc/wireproxy"]
ENTRYPOINT [ "/usr/bin/wireproxy", "/etc/wireproxy/config" ]
10 changes: 10 additions & 0 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
build:
docker build -t wireproxy .

run:
docker run \
--rm --tty --interactive \
--name=wireproxy \
--publish 2534:2534 \
--volume "${PWD}/config:/etc/wireproxy/config:ro" \
wireproxy
23 changes: 23 additions & 0 deletions docker/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SelfSecretKey is the secret key of your wireguard peer
SelfSecretKey = ###Interface - PrivateKey###
# SelfEndpoint is the IP of your wireguard peer
SelfEndpoint = ###Interface - Address###
# DNS is the nameservers that will be used by wireproxy.
# Multple nameservers can be specified as such: DNS = 1.1.1.1, 1.0.0.1
DNS = ###Interface - DNS###

# PeerPublicKey is the public key of the wireguard server you want to connec to
PeerPublicKey = ###Peer - PublicKey###
# PeerEndpoint is the endpoint of the wireguard server you want to connec to
PeerEndpoint = ###Peer - Endpoint###

# KeepAlive is the persistent keep alive interval of the wireguard device
# usually not needed
# KeepAlive = 25
# PreSharedKey is the pre shared key of your wireguard device
# if you don't know what this is you don't need it
# PreSharedKey =

# Socks5 create a socks5 proxy on your LAN, and any traffic would be routed via wireguard
[Socks5]
BindAddress = 0.0.0.0:2534