make proxy
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,4 +1,5 @@
|
||||
USERNAME=xxxxxxxxx
|
||||
PASSWORD=xxxxxxxxx
|
||||
PROXY_PASSWORD=xxxxxxxxx
|
||||
SECRET=xxxxxxxxx
|
||||
NAMESERVER=xxxxxxxxx
|
||||
|
||||
Reference in New Issue
Block a user