Commit Graph

95 Commits

Author SHA1 Message Date
Dustin Wilson
2c1f6102ec
Delete tun device if exists when create_tun_device is set (#2328) 2022-08-29 09:11:41 +09:00
Jan Matias Rivø
ab202865af
Added docker secret support for rpc credentials (#2321)
Co-authored-by: Jan Rivø <jan.rivo@cgi.com>
2022-08-29 09:04:05 +09:00
koukihai
67ae2da5c1
Replace ip route add with ip route replace (#2285) 2022-06-27 09:32:16 +09:00
MustangGB
0a9d4b5c33
Execute a script on VPN connection failure (#2252)
* Update start.sh

* Update persistEnvironment.py

* Update modify-openvpn-config.sh

* Update tunnelUp.sh

* Update modify-openvpn-config.sh

* Update modify-openvpn-config.sh

* Update modify-openvpn-config.sh

* Update modify-openvpn-config.sh

* Create config-failure.sh

* Update config-failure.sh

* Update tunnelUp.sh

* Update modify-openvpn-config.sh
2022-05-18 12:03:29 +09:00
Patrick Kishino
51e8a0270a
Bash not equals fixed 2022-04-12 06:42:55 +09:00
Patrick Kishino
edb73e83d1
more explicit custom check
use VPN_PROVIDER when checking for CUSTOM and avoid external fetch
2022-04-10 12:45:26 +09:00
MustangGB
8952476945
Enforce new vpn endpoint on restart/failure (#2237)
* Fixed typo in line 95

`form` to `from`

* supported setting DISABLE_PORT_UPDATER to false

previously DISABLE_PORT_UPDATER had to not exist..now it can also be set to false

* Fix minor typos (#2074)

* Fixed missing $ from UFW variable use

There were a number of variable references missing $

* Fixed some more variables missing $

* Removed outdated typeset

this fixes and closes #2095

* Fix building-blocks links (#2126)

* Update bug_report.yaml

* Update start.sh

Co-authored-by: Kobi <kobirosenstein@gmail.com>
Co-authored-by: Kristian Haugene <haugene@users.noreply.github.com>
Co-authored-by: Patrick Kishino <patrick.a.kishino@gmail.com>
Co-authored-by: Sean Kelly <xconverge@users.noreply.github.com>
Co-authored-by: Chris Buckley <chris@cmbuckley.co.uk>
2022-04-06 15:26:05 +09:00
edgd1er
383252d3cd
use docker secrets for openvpn credentials (#2169)
* use docker secrets for openvpn credentials

* openvpn creds in one file

Co-authored-by: Patrick Kishino <patrick.a.kishino@gmail.com>
2022-02-18 09:12:03 +09:00
edgd1er
b65dedd01e
Add feature to NORDVPN: connect directly to a known server. (#2142)
* Add feature NORDVPN_SERVER, to download directly server's config.

* define vars as empty to avoid unbound variables

* restore shebang, define default values for NORDVPN_*
2022-01-29 15:35:11 +09:00
Josh S
ff664f4fd4
Add ability to run custom script after routes are added (#2100)
* Fixed typo in line 95

`form` to `from`

* supported setting DISABLE_PORT_UPDATER to false

previously DISABLE_PORT_UPDATER had to not exist..now it can also be set to false

* Fix minor typos (#2074)

* Fixed missing $ from UFW variable use

There were a number of variable references missing $

* Fixed some more variables missing $

* Removed outdated typeset

this fixes and closes #2095

* add capability for routes-post-start.sh

* update docs

* amended position

placed entry where it should be in logical order when thinking about container lifecycle

Co-authored-by: Kobi <kobirosenstein@gmail.com>
Co-authored-by: Kristian Haugene <haugene@users.noreply.github.com>
Co-authored-by: Patrick Kishino <patrick.a.kishino@gmail.com>
Co-authored-by: Sean Kelly <xconverge@users.noreply.github.com>
2021-12-10 13:02:49 +09:00
edgd1er
af3d905b3a
DEBUG: print all lines before execution (#2096)
* DEBUG: print all lines before execution

if var DEBUG is set to anything other than false, each bash script will be run with a set -x. This would ease debugging

* DEBUG: centralize commands in utils.sh
2021-12-05 08:25:22 +09:00
XMB5
42b99aa86d
Fix IP leak for first few seconds after tunnel up (#2080) 2021-11-27 18:33:07 +09:00
Patrick Kishino
7793e9d23b
Using CUSTOM provider should not trigger download from vpn-repo (#2010) 2021-10-16 12:33:30 +09:00
ShaRose
ce3d931791
Add openvpn-post-config.sh, ran after we finish any configuration tweaks (Passing the path to the selected ovpn file). (#1822)
* Add openvpn-post-config hook

Adds a script check for /scripts/openvpn-post-config.sh, designed so you can make any custom changes to the selected openvpn config file after everything else is ready.

* Update config documentation

Added openvpn-post-config to the documentation. Not sure if openvpn-pre-start should be edited to say before the configuration is processed.

* Fix typo

Serves me right for making changes before bed.
2021-05-06 06:37:09 +09:00
MustangGB
5da95dafee
Implement selfheal.sh (#1805)
* Create selfheal.sh

* Update healthcheck.sh

* Update selfheal.sh

* Update start.sh

* Update Dockerfile

* Update selfheal.sh

* Update selfheal.sh

* Update selfheal.sh

* Update selfheal.sh
2021-04-20 07:56:08 +09:00
Kristian Haugene
1221d7cee3 This caused errors, have to revisit later #1775 2021-03-17 18:16:55 +01:00
Kristian Haugene
b383d7ec41
Merge pull request #1744 from haugene/feature/separate-config-repo
Moving configs to separate repo
2021-03-15 23:56:46 +01:00
Kristian Haugene
63964c877e Add explicit exits, trap for cleanup and exit on errors 2021-03-14 15:49:14 +01:00
Kristian Haugene
3547066b33 Export vpn provider so it's available for subshells 2021-03-14 02:29:21 +01:00
Kristian Haugene
e664036334 Initial setup for downloading configs from external repo 2021-03-14 02:07:42 +01:00
Kristian Haugene
9f5adcc891
Stop Transmission before routes are removed #1362 (#1745) 2021-03-09 09:56:57 +09:00
Patrick Kishino
3b3a2e59eb
Merge branch 'master' into dev 2021-02-12 09:22:28 +09:00
Mayeul Cantan
75d0b53642
Make sure configure-openvpn.sh cannot change the current directory (#1616)
VYPRVPN sets $PWD to a deleted directory, which causes a cascade of
issues for the rest of `start.sh`.

This saves the current directory before sourcing `configure-openvpn.sh`
scripts, making sure such an issue cannot happen for any VPN.

A proper fix would be to avoid sourcing the script in the first place.
2021-01-19 10:39:57 +09:00
clement-z
9317d7f512
Add DNS resolution checks (fix #1608) (#1617)
* Add dns resolution test to healthcheck script

* Add dns resolution test to start script

Co-authored-by: Patrick Kishino <patrick.a.kishino@gmail.com>
2021-01-19 10:37:08 +09:00
Kristian Haugene
87c8ce416b Add log statement about TUN device #1503 2020-11-13 00:23:17 +01:00
Kristian Haugene
c42e60cda0 Make config modifications more effective, only modify the config we're about to use #1496 2020-11-11 22:22:05 +01:00
Kristian Haugene
cd9a5694cf Print revision to logs on startup to make debugging easier 2020-11-04 00:59:33 +01:00
Kristian Haugene
f27d47c121 Add help message when choosing an invalid config 2020-11-04 00:10:23 +01:00
Kristian Haugene
91b036b398 Use xargs to run modification script, plus some syntax updates #1334 2020-10-28 22:02:14 +01:00
Kristian Haugene
14ec8d4fb8 Add a method to hard override dns servers 2020-10-24 00:36:30 +02:00
Kristian Haugene
803fb1970c Add configuration script for PIA, downloading and modifying configs on startup 2020-10-11 21:46:01 +02:00
Kristian Haugene
5a511d6d9e Restructure start script, extract provider specific scripts and add support for fetching configs from URL 2020-08-23 19:45:05 +02:00
Kristian Haugene
12e6378bfe Replace dockerize, make settings persistent, let settings be overridden by env vars 2020-08-09 18:02:51 +02:00
colinwebber
1ee289cc3b
Removed space within parsed VPNBOOK password.
VPNBOOK password is provided as a picture/image. The http://api.ocr.space/parse/image service erroneously sees a space between certain character combinations. Since passwords generally do not contain spaces, this extra awk expression removes the space.
2020-05-12 08:47:32 +02:00
Gabriele Pongelli
a460c31eb4 FreeVPN password is obtained into the update script, retrieved here and removed temporary file 2020-04-01 22:24:24 +02:00
Gabriele Pongelli
c08e417ba8 Removed crontab management, useless with ping-exit option 2020-03-30 21:23:48 +02:00
Gabriele Pongelli
cae111b2fa Check crontab to avoid adding the job multiple times 2020-03-30 20:45:11 +02:00
Gabriele Pongelli
76192c4a2a Launch updateFreeVPN start.sh and add it to daily crontab 2020-03-30 14:43:20 +02:00
Jonathan Sloan
a75f81987b possible fix for #1020 -- syntax error fix 2020-03-29 14:47:09 +02:00
Stefan Fuchs
c0dd2a3bd6 Make ip commands explicit
On buster, ip r l m doesn't work, but route list match does
2020-01-26 11:18:39 +11:00
Andrea Bonini
ceeae6d0e4 added vpnbook password grabber to start.sh 2019-10-11 19:05:34 +02:00
abonini
2d8005a043 added automatic password filling for freevpn provider 2019-04-25 13:17:03 +01:00
eskemojoe007
75780821ab Finalizing Dallas 2019-04-11 15:05:38 -04:00
eskemojoe007
687d81090e Update start.sh 2019-04-11 12:00:49 -04:00
eskemojoe007
d0b0461967 Add some comments 2019-04-11 11:55:42 -04:00
eskemojoe007
433f3cac85 Adding GP 2019-04-11 10:56:02 -04:00
eskemojoe007
abf30f7068 Quick check of settings 2019-04-11 10:47:02 -04:00
Tom Humphrey
43da3ea5f6 Fix for automatic setting of NORDVPN_PROTOCOL
NORDVPN_PROTOCOL wasn't being set correctly when an OPENVPN_CONFIG was provided. Now fixed.
2019-03-27 13:09:43 +00:00
Tom Humphrey
ca99395250 NordVPN On Demand
After resolving an issue with the default.ovpn symlink, it was bugging me that each time the container ran it would download all of the NordVPN configs. After a bit of research I found a url where I could download just one ovpn file. A bit of rework and now only downloads the applicable config based off of NordVPNs api. No more 4000+ configs.

User can configure this using either NORDVPN_COUNTRY to connect to the best server in that country or a specific config using the OPENVPN_CONFIG parameter. If neither are specified config will be selected based off of NordVPN api and if both are specified it will connect to OPENVPN_CONFIG server first using the api to decide on a backup 'default.ovpn' config in case it fails.

In my rewriting of this I also realised there was no need for the updateConfigs.sh script anymore, but to keep everything in keeping I replaced the contents of the updateConfigs.sh script with the NordVPN_selector one and removed the latter.
2019-03-26 17:02:11 +00:00
Kristian Haugene
6bdb5d88cc Case insentitive matching #632 2019-03-17 22:00:14 +01:00