Add containerfile and config files

This commit is contained in:
Ethan Paul 2024-06-18 21:44:22 -04:00
parent a99af4e419
commit 7ae79428e6
Signed by: enpaul
GPG Key ID: 9B6D99E4CFA31867
3 changed files with 44 additions and 0 deletions

13
Containerfile Normal file
View File

@ -0,0 +1,13 @@
FROM lscr.io/linuxserver/wireguard:latest
ENV DANTE_LISTEN_INTERFACE eth1
ENV DANTE_LISTEN_PORT 1080
ENV DANTE_FORWARD_INTERFACE wg0
RUN mkdir -p /etc/dante
ADD danted.conf.template /etc/dante/danted.conf.template
ADD run-danted.sh /custom-services.d/run-danted.sh
RUN apk update
RUN apk add dante-server

22
danted.conf.template Normal file
View File

@ -0,0 +1,22 @@
user.privileged: root
user.unprivileged: nobody
# The listening network interface or address.
internal: ${DANTE_LISTEN_INTERFACE} port=${DANTE_LISTEN_PORT}
# The proxying network interface or address.
external: ${DANTE_FORWARD_INTERFACE}
# socks-rules determine what is proxied through the external interface.
socksmethod: none
# client-rules determine who can connect to the internal interface.
clientmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}

9
run-danted.sh Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bash
envsubst '
$DANTE_LISTEN_INTERFACE
$DANTE_LISTEN_PORT
$DANTE_FORWARD_INTERFACE
' < /etc/dante/danted.conf.template > /etc/dante/danted.conf
sockd -f /etc/dante/danted.conf