forked from arriven/db1000n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
95 lines (88 loc) · 2.48 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: "3"
services:
# creates OpenVPN Docker container to first provider that randomly picks .conf file
ovpn_01:
image: ghcr.io/wfg/openvpn-client:2.1.0
cap_add:
- NET_ADMIN
security_opt:
- label:disable
restart: unless-stopped
volumes:
- /dev/net:/dev/net:z
- ./openvpn/:/data/vpn:z
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
environment:
KILL_SWITCH: "on"
HTTP_PROXY: "off"
VPN_AUTH_SECRET: provider01_secret
VPN_CONFIG_PATTERN: provider01*.conf # this will match provider01_country01.conf, provider01_country02.conf etc
secrets:
- provider01_secret
# creates OpenVPN Docker container to first provider with specific .conf file
ovpn_02:
image: ghcr.io/wfg/openvpn-client:2.1.0
cap_add:
- NET_ADMIN
security_opt:
- label:disable
restart: unless-stopped
volumes:
- /dev/net:/dev/net:z
- ./openvpn/:/data/vpn:z
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
environment:
KILL_SWITCH: "on"
HTTP_PROXY: "off"
VPN_AUTH_SECRET: provider01_secret
VPN_CONFIG_FILE: provider01.endpoint02.conf # will use only this .conf file
secrets:
- provider01_secret
# creates OpenVPN Docker container to second provider with specific .conf file
ovpn_03:
image: ghcr.io/wfg/openvpn-client:2.1.0
cap_add:
- NET_ADMIN
security_opt:
- label:disable
restart: unless-stopped
volumes:
- /dev/net:/dev/net:z
- ./openvpn/:/data/vpn:z
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
environment:
KILL_SWITCH: "on"
HTTP_PROXY: "off"
VPN_AUTH_SECRET: provider02_secret
VPN_CONFIG_FILE: provider02.endpoint01.conf # will use only this .conf file
secrets:
- provider02_secret
# this Docker container will use VPN 01
db1000n_01:
image: ghcr.io/arriven/db1000n-advanced
restart: unless-stopped
depends_on:
- ovpn_01
network_mode: "service:ovpn_01"
# this Docker container will use VPN 02
db1000n_02:
image: ghcr.io/arriven/db1000n-advanced
restart: unless-stopped
depends_on:
- ovpn_02
network_mode: "service:ovpn_02"
# this Docker container will use VPN 03
db1000n_03:
image: ghcr.io/arriven/db1000n-advanced
restart: unless-stopped
depends_on:
- ovpn_03
network_mode: "service:ovpn_03"
secrets:
provider01_secret:
file: ./openvpn/provider01.txt
provider02_secret:
file: ./openvpn/provider02.txt