feat: sockd conf

This commit is contained in:
Matteo Pietro Dazzi
2023-04-08 13:15:28 +02:00
parent 4b1a3f2d5e
commit 955ba475b3
3 changed files with 24 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ FROM alpine:latest
LABEL maintainer.name="Matteo Pietro Dazzi" \
maintainer.email="matteopietro.dazzi@gmail.com" \
version="1.5.0" \
description="OpenVPN client configured for SurfShark VPN"
description="OpenVPN client and socks5 server configured for SurfShark VPN"
WORKDIR /vpn
ENV SURFSHARK_USER=
ENV SURFSHARK_PASSWORD=
@@ -16,5 +16,6 @@ ENV OVPN_CONFIGS=
ENV ENABLE_KILL_SWITCH=true
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s CMD curl -L 'https://ipinfo.io'
COPY startup.sh .
RUN apk add --update --no-cache openvpn wget unzip coreutils curl ufw && chmod +x ./startup.sh
COPY sockd.conf /etc/
RUN apk add --update --no-cache openvpn wget unzip coreutils curl ufw dante-server && chmod +x ./startup.sh
ENTRYPOINT [ "./startup.sh" ]

18
sockd.conf Normal file
View File

@@ -0,0 +1,18 @@
logoutput: stderr
internal: eth0 port = 1080
external: tun0
user.unprivileged: sockd
socksmethod: none
clientmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}

View File

@@ -41,3 +41,5 @@ if [ "${ENABLE_KILL_SWITCH}" = "true" ]; then
ufw allow out on tun0 from any to any
ufw enable
fi
sockd -D