docker container implementation

This commit is contained in:
MuratovAS 2022-03-26 22:29:01 +05:00 committed by MuratovAS
parent ef3016938d
commit 411d0fb777
3 changed files with 47 additions and 0 deletions

14
docker/Dockerfile Normal file
View file

@ -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
docker/Makefile Normal file
View file

@ -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
docker/config Normal file
View file

@ -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