diff --git a/Dockerfile b/Dockerfile index 834eda0..f391f3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ] diff --git a/sockd.conf b/sockd.conf new file mode 100644 index 0000000..2eeba42 --- /dev/null +++ b/sockd.conf @@ -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 +} \ No newline at end of file diff --git a/startup.sh b/startup.sh index ef77516..3f6ce0f 100644 --- a/startup.sh +++ b/startup.sh @@ -40,4 +40,6 @@ if [ "${ENABLE_KILL_SWITCH}" = "true" ]; then ufw default deny outgoing ufw allow out on tun0 from any to any ufw enable -fi \ No newline at end of file +fi + +sockd -D \ No newline at end of file