Update for Pritunl v1.30.3108.50

This commit is contained in:
Simon Beginn
2022-03-18 23:47:31 +01:00
parent 0e7ab6900b
commit abb00d3b74
9 changed files with 125 additions and 102 deletions

1
docker/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
setup.py

View File

@@ -1,20 +1,8 @@
FROM goofball222/pritunl:latest
ENV ORIG_API_SERVER app.pritunl.com
ENV FAKE_API_SERVER pritunl-api.simonmicro.de
ENV ORIG_AUTH_SERVER auth.pritunl.com
ENV FAKE_AUTH_SERVER pritunl-api.simonmicro.de\\/auth
# Yes, you will need to copy it over into the build context...
COPY setup.py .
# This is basically the classic installer script...
RUN ORIG_API_SERVER_ESCAPED=$(echo "$ORIG_API_SERVER" | sed -e 's/\./\\./g') && \
FAKE_API_SERVER_ESCAPED=$(echo "$FAKE_API_SERVER" | sed -e 's/\./\\./g') && \
ORIG_AUTH_SERVER_ESCAPED=$(echo "$ORIG_AUTH_SERVER" | sed -e 's/\./\\./g') && \
FAKE_AUTH_SERVER_ESCAPED=$(echo "$FAKE_AUTH_SERVER" | sed -e 's/\./\\./g') && \
echo 'Rewriting pritunl api endpoint: libs' && \
find /usr/lib/python* -type f -print0 | xargs -0 sed -i "s/$ORIG_API_SERVER_ESCAPED/$FAKE_API_SERVER_ESCAPED/g" && \
echo 'Rewriting pritunl api endpoint: www' && \
find /usr/share/pritunl/www/ -type f -print0 | xargs -0 sed -i "s/$ORIG_API_SERVER_ESCAPED/$FAKE_API_SERVER_ESCAPED/g" && \
echo 'Rewriting pritunl auth (SSO) endpoint: libs+www' && \
find /usr/lib/python* -type f -print0 | xargs -0 sed -i "s/$ORIG_AUTH_SERVER_ESCAPED/$FAKE_AUTH_SERVER_ESCAPED/g" && \
find /usr/share/pritunl/www/ -type f -print0 | xargs -0 sed -i "s/$ORIG_AUTH_SERVER_ESCAPED/$FAKE_AUTH_SERVER_ESCAPED/g" && \
echo 'Done...'
RUN chmod +x setup.py
RUN python3 -u setup.py --install
#RUN rm setup.py

View File

@@ -7,10 +7,9 @@ services:
- ./mongodb:/data/db
pritunl:
image: realsimonmicro/pritunl-with-fake-api:latest
# Use the following to build the image from source.
# build:
# context: .
build:
context: .
restart: always
depends_on:
- mongodb