make proxy

This commit is contained in:
Your Name
2022-05-28 07:32:54 +00:00
parent 9a68bb87bf
commit 71a83c880f
5 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ RUN set -ex \
\
&& apk del .build-deps
RUN apk update && apk add python3 curl && pip3 install pyotp
RUN apk update && apk upgrade && apk add python3 curl && pip3 install pyotp
ADD run.sh /run.sh
ADD generate.py /generate.py
ADD nserver.py /nserver.py
+4
View File
@@ -16,5 +16,9 @@ if 'nserver' in filedata:
else:
filedata = filedata.replace('daemon', 'daemon\nnserver {}'.format(nameserver))
password = os.getenv('PROXY_PASSWORD')
if password != None:
filedata = filedata.replace('auth none', 'auth strong\nusers admin:CL:{}'.format(password))
with open(filename, 'w') as file:
file.write(filedata)
+1
View File
@@ -1,4 +1,5 @@
USERNAME=xxxxxxxxx
PASSWORD=xxxxxxxxx
PROXY_PASSWORD=xxxxxxxxx
SECRET=xxxxxxxxx
NAMESERVER=xxxxxxxxx