SRC: https://www.inet.no/dante/
Example docker-compose snippet:
dante:
image: h0tmann/dante:v1.4.4
container_name: dante
network_mode: host
environment:
# TIME
- TZ=Europe/Berlin
- LANG=de_DE.UTF-8
# ENV
# - PORT=1080 # default "1080"
# - ALLOW_CIDR=10.0.0.0/8 # default: 10.0.0.0/8;172.16.0.0/12;192.168.0.0/16;fc00::/7 | ";" or "," separated, IPv4 and IPv6
# - INTERFACE_INT=eth0 # default "eth0" | name of Interface
# - INTERFACE_EXT=eth0 # default "eth0" | name of Interface
# - SOCKS_METHOD=none # default "none" | none username rfc931 pam gssapi bsdauth
# - CLIENT_METHOD=none # default "none" | none rfc931
# - COMPATIBILITY=sameport # default "sameport" | Possible values: "sameport" or "reuseaddr"
# - TIMEOUT_CONNECT=30 # default 30 | integer value in s
# - TIMEOUT_IO=7200 # default 7200 | integer value in s
# - SRC_HOST=nodnsmismatch nodnsunknown # default "nodnsmismatch nodnsunknown" | set empty if no PTR provided
# - LOGFILE=/var/log/dante/socks.log # default "/var/log/dante/socks.log" | set empty for stdout only
volumes:
# TIME
- "/etc/localtime:/etc/localtime:ro"
# LOGS
- "/var/log/dante/:/var/log/dante/:rw"
deploy:
resources:
limits:
memory: 64M # adjust to your needs
restart: unless-stopped
after adding the docker compose run this quick-snippet:
mkdir -p /var/log/dante/ && chown 850:850 /var/log/dante/ && \
docker compose -f /var/docker/compose/docker-compose.yml pull && \
docker compose -f /var/docker/compose/docker-compose.yml up -d --remove-orphans && \
docker logs -f dante
Run this docker-compose either with:
ports:
- 1080:1080
sysctls:
- net.ipv6.conf.all.disable_ipv6=0 # explicitely disable the disableing of IPv6
- net.ipv6.conf.eth0.proxy_ndp=1 # other IPv6 tweak
or with
network_mode: host
but please keep in mind, that without network_mode: host, the rules in the config may need to be altered to have the wanted effect.
As all requests are comming through the docker-network your docker-container is in.
I personally recommend network_mode: host, as it also makes it way more easy to migrate from a plain installation to this dockerized version.
Test functionality with one of these commands:
curl -4 -x socks5://127.0.0.1:1080 -kv https://www.google.de
curl -4 -x socks5h://127.0.0.1:1080 -kv https://www.google.de
curl -x socks5://127.0.0.1:1080 -kv https://www.google.de
curl -x socks5h://127.0.0.1:1080 -kv https://www.google.de
Content type
Image
Digest
sha256:06653f0b6…
Size
596.3 kB
Last updated
12 days ago
docker pull h0tmann/dante:v1.4.4