diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d9f7d85 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM vimagick/dante@sha256:148291be9d8365e7c08b7a82a08eb4ab3a10c305502f74119a1d8ac566ea7bb5 +EXPOSE 1080 +COPY sockd.conf /etc/sockd.conf +COPY run.sh /run.sh +CMD /run.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..fa68be2 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Dante SOCKS proxy + +**SOCKS proxy with user/password authorization enabled.** + +Based on: https://hub.docker.com/r/vimagick/dante/ + + +## Available env vars + +- `SOCKS_USER` - username of proxy user +- `SOCKS_PASSWORD` - password for user + + +## Useful links: + +- [GitHub](https://github.com/socialwifi/docker-dante) +- [Docker Hub](https://hub.docker.com/r/socialwifi/dante) diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..0d47982 --- /dev/null +++ b/run.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -ex +useradd $SOCKS_USER +echo $SOCKS_USER:$SOCKS_PASSWORD | chpasswd +sockd -f $CFGFILE -p $PIDFILE -N $WORKERS diff --git a/sockd.conf b/sockd.conf new file mode 100644 index 0000000..556c614 --- /dev/null +++ b/sockd.conf @@ -0,0 +1,19 @@ +debug: 0 +logoutput: stderr +internal: 0.0.0.0 port = 1080 +external: eth0 +socksmethod: username none +clientmethod: none +user.privileged: root +user.unprivileged: nobody + +client pass { + from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0 + log: error +} + +socks pass { + from: 0.0.0.0/0 to: 0.0.0.0/0 + socksmethod: username + log: error +}