Initial commit
This commit is contained in:
13
dante/Dockerfile
Normal file
13
dante/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM ubuntu
|
||||
MAINTAINER rmj014@gmail.com
|
||||
RUN apt-get update && apt-get -y upgrade \
|
||||
&& apt-get install -y iputils-ping curl net-tools iptables dante-server
|
||||
RUN apt-get install -y vim
|
||||
|
||||
ADD sockd.conf /etc/danted.conf
|
||||
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
ADD run.sh /usr/local/sbin/run
|
||||
RUN chmod 755 /usr/local/sbin/run
|
||||
ENTRYPOINT /usr/local/sbin/run
|
||||
7
dante/Makefile
Normal file
7
dante/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
all: build
|
||||
|
||||
build:
|
||||
@docker build --tag=dante .
|
||||
|
||||
no-cache:
|
||||
@docker build --no-cache --tag=dante .
|
||||
5
dante/dante.sh
Executable file
5
dante/dante.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
# INTERFACE is either tun0 for openvpn or nordlynx for the obvious
|
||||
|
||||
docker kill dante
|
||||
docker rm dante
|
||||
docker run --privileged -d --name dante --restart unless-stopped -e INTERFACE='tun0' -v /etc/localtime:/etc/localtime:ro --net=container:vpn dante
|
||||
19
dante/run.sh
Executable file
19
dante/run.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
[[ -z ${INTERFACE} ]] && INTERFACE=nordlynx
|
||||
|
||||
sed -i 's@nordlynx@'"${INTERFACE}"'@g' /etc/danted.conf
|
||||
|
||||
service danted restart
|
||||
|
||||
while [ 1 ]
|
||||
do
|
||||
ifconfig ${INTERFACE}
|
||||
res=$?
|
||||
if [ $res -eq 1 ]
|
||||
then
|
||||
sleep 5
|
||||
exit 0
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
34
dante/sockd.conf
Normal file
34
dante/sockd.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
debug: 0
|
||||
logoutput: stderr
|
||||
internal: 0.0.0.0 port = 1080
|
||||
external: eth0
|
||||
socksmethod: 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
|
||||
}
|
||||
|
||||
socks pass {
|
||||
from: 0.0.0.0/0
|
||||
to: 0.0.0.0/0
|
||||
# udp.portrange: 40000-45000
|
||||
command: udpassociate
|
||||
log: error connect disconnect
|
||||
}
|
||||
|
||||
socks pass {
|
||||
from: 0.0.0.0/0
|
||||
to: 0.0.0.0/0
|
||||
command: bind connect udpassociate bindreply udpreply
|
||||
log: error connect disconnect
|
||||
}
|
||||
34
dante/sockd.conf.orig
Normal file
34
dante/sockd.conf.orig
Normal file
@@ -0,0 +1,34 @@
|
||||
debug: 0
|
||||
logoutput: stderr
|
||||
internal: 0.0.0.0 port = 1080
|
||||
external: nordlynx
|
||||
socksmethod: 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
|
||||
}
|
||||
|
||||
socks pass {
|
||||
from: 0.0.0.0/0
|
||||
to: 0.0.0.0/0
|
||||
# udp.portrange: 40000-45000
|
||||
command: udpassociate
|
||||
log: error connect disconnect
|
||||
}
|
||||
|
||||
socks pass {
|
||||
from: 0.0.0.0/0
|
||||
to: 0.0.0.0/0
|
||||
command: bind connect udpassociate bindreply udpreply
|
||||
log: error connect disconnect
|
||||
}
|
||||
Reference in New Issue
Block a user