nginx-proxy-confs: Inital commit

This commit is contained in:
Roxedus
2020-12-11 18:12:27 +01:00
parent d1dc6e5858
commit cd4f462e8f
9 changed files with 241 additions and 47 deletions
-27
View File
@@ -1,27 +0,0 @@
#!/usr/bin/with-contenv bash
# Determine if setup is needed
if [ ! -f /usr/local/lib/python***/dist-packages/sshuttle ] && \
[ -f /usr/bin/apt ]; then
## Ubuntu
apt-get update
apt-get install --no-install-recommends -y \
iptables \
openssh-client \
python3 \
python3-pip
pip3 install sshuttle
fi
if [ ! -f /usr/lib/python***/site-packages/sshuttle ] && \
[ -f /sbin/apk ]; then
# Alpine
apk add --no-cache \
iptables \
openssh \
py3-pip \
python3
pip3 install sshuttle
fi
chown -R root:root /root
chmod -R 600 /root/.ssh
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
###
# SWAG LOGIC https://github.com/linuxserver/docker-swag/blob/master/root/etc/cont-init.d/50-config
###
# copy reverse proxy configs
cp -R /defaults/proxy-confs /config/nginx/
# copy proxy defaults
[[ ! -f /config/nginx/proxy.conf ]] &&
cp /defaults/proxy.conf /config/nginx/proxy.conf
[[ ! -f /config/nginx/ssl.conf ]] &&
cp /defaults/ssl.conf /config/nginx/ssl.conf
# copy pre-generated dhparams or generate if needed
if ! grep -q 'PARAMETERS' "/config/nginx/dhparams.pem"; then
curl -o /config/nginx/dhparams.pem -L "https://lsio.ams3.digitaloceanspaces.com/dhparams.pem"
fi
if ! grep -q 'PARAMETERS' "/config/nginx/dhparams.pem"; then
echo "Generating dhparams.pem. This will take a long time. Do not stop the container until this process is completed."
openssl dhparam -out /config/nginx/dhparams.pem 4096
fi
# permissions
chown -R abc:abc \
/config/nginx/{proxy.conf,ssl.conf,dhparams.pem,proxy-confs/}
-3
View File
@@ -1,3 +0,0 @@
#!/usr/bin/with-contenv bash
sshuttle --dns --remote root@${HOST}:${PORT} 0/0 -x 172.17.0.0/16