make proxy
This commit is contained in:
@@ -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
@@ -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:
|
||||
|
||||
@@ -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