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
+2 -1
View File
@@ -3,7 +3,8 @@ This tool can help you with over-private companies vpn servers.
It can authomatically authentificate via 'password+otp pin' schema and provide proxy access to VPN network.
### Configuration
Please specify your username, password and secret token in openvpn/settings/openvpn.env (you can use openvpn.env.sample)
Please specify your username, password and secret token in openvpn/settings/openvpn.env (you can use openvpn.env.sample)
Also you can specify proxy password for authentification, username is 'admin'.
### Definitions
Openvpn configuration file must be named 'client.ovpn' in 'openvpn/settings/conf/' directory.
+1 -1
View File
@@ -13,7 +13,7 @@ services:
- "/dev/net/tun:/dev/net/tun"
restart: always
volumes:
- ./openvpn/settings/conf:/etc/openvpn
- ./openvpn/settings/conf:/etc/openvpn:ro
logging:
driver: json-file
options:
+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