Преглед на файлове

Merge pull request #438 from himred/dev

Add support for multiple servers in OPENVPN_CONFIG
master
Kristian Haugene преди 6 години
родител
ревизия
4d657ab72e
No account linked to committer's email address
променени са 2 файла, в които са добавени 18 реда и са изтрити 0 реда
  1. 9
    0
      README.md
  2. 9
    0
      openvpn/start.sh

+ 9
- 0
README.md Целия файл

-e "OPENVPN_CONFIG=ipvanish-AT-Vienna-vie-c02" -e "OPENVPN_CONFIG=ipvanish-AT-Vienna-vie-c02"
``` ```


You can also provide a list of openvpn configuration filenames separated by a space.
If you provide a list, a file will be randomly chosen in the list, this is useful for redundancy setups. For example:
```
-e "OPENVPN_CONFIG=ipvanish-AT-Vienna-vie-c02 ipvanish-FR-Paris-par-a01 ipvanish-DE-Frankfurt-fra-a01"
```
If you provide a list and the selected server goes down, after the value of ping-timeout the container will be restarted and a server will be randomly chosen, note that the faulty server can be chosen again, if this should occur, the container will be restarted again until a working server is selected.

To make sure this work in all cases, you should add ```--pull-filter ignore ping``` to your OPENVPN_OPTS variable.

As you can see, the container also expects a data volume to be mounted. As you can see, the container also expects a data volume to be mounted.
This is where Transmission will store your downloads, incomplete downloads and look for a watch directory for new .torrent files. This is where Transmission will store your downloads, incomplete downloads and look for a watch directory for new .torrent files.
By default a folder named transmission-home will also be created under /data, this is where Transmission stores its state. By default a folder named transmission-home will also be created under /data, this is where Transmission stores its state.

+ 9
- 0
openvpn/start.sh Целия файл



if [ ! -z "$OPENVPN_CONFIG" ] if [ ! -z "$OPENVPN_CONFIG" ]
then then
n=$(echo "$OPENVPN_CONFIG" | wc -w)
if [ $n -gt 1 ]
then
rnd=$((RANDOM%n+1))
srv=$(echo "$OPENVPN_CONFIG" | awk -vrnd=$rnd '{print $rnd}')
echo "$n servers found in OPENVPN_CONFIG, $srv chosen randomly"
OPENVPN_CONFIG=$srv
fi

if [ -f $vpn_provider_configs/"${OPENVPN_CONFIG}".ovpn ] if [ -f $vpn_provider_configs/"${OPENVPN_CONFIG}".ovpn ]
then then
echo "Starting OpenVPN using config ${OPENVPN_CONFIG}.ovpn" echo "Starting OpenVPN using config ${OPENVPN_CONFIG}.ovpn"

Loading…
Отказ
Запис