Commit Graph

33 Commits

Author SHA1 Message Date
Quentin McGaw
5dcbe79fa8 Move OS package to golibs 2021-01-02 01:57:00 +00:00
Quentin McGaw
a921f9848c Code maintenance: CLI interface abstraction 2020-12-29 18:24:03 +00:00
Quentin McGaw
bedf613cff Code maintenance: storage merging reworked 2020-12-29 17:49:38 +00:00
Quentin McGaw
73479bab26 Code maintenance: OS package for file system
- OS custom internal package for file system interaction
- Remove fileManager external dependency
- Closer API to Go's native API on the OS
- Create directories at startup
- Better testability
- Move Unsetenv to os interface
2020-12-29 00:55:31 +00:00
Quentin McGaw
2dc674559e Re-use username for UID if it exists 2020-12-27 00:36:39 +00:00
Quentin McGaw
4257581f55 Loops and HTTP control server rework (#308)
- CRUD REST HTTP server
- `/v1` HTTP server prefix
- Retrocompatible with older routes (redirects to v1 or handles the requests directly)
- DNS, Updater and Openvpn refactored to have a REST-like state with new methods to change their states synchronously
- Openvpn, Unbound and Updater status, see #287
2020-12-19 20:10:34 -05:00
Quentin McGaw
1cc0f5fee9 Fix #296 (Cyberghost implementation) (#297)
* Reads the client key from /gluetun/client.key
* Read the client certificate from /gluetun/client.crt
* Additional checks for client key and client certificate validity
* Fix client key file parsing if environment variable isn't present
2020-11-19 08:50:55 -05:00
Quentin McGaw
f1e4b9937b Privado support, fix #285 (#288) 2020-11-08 20:56:49 -05:00
Quentin McGaw
a7a7efe9c3 Remove PIA v3 servers support 2020-11-05 02:10:34 +00:00
Quentin McGaw
edc08c46d4 Health server runs on 127.0.0.1:9999, fix #272 2020-10-27 03:28:25 +00:00
Quentin McGaw
a6cb1a7052 Remove x/net Go dependency 2020-10-25 20:45:14 +00:00
Quentin McGaw
9c73faaaeb Add linters and fix lint issues 2020-10-20 02:45:28 +00:00
Quentin McGaw
84c1f46ae4 Upgrade dependencies
- Use of context for custom http client
- Remove unused nodeid for logger
- Upgrade shadowsocks dependency
2020-10-18 02:24:34 +00:00
Quentin McGaw
6f4be72785 Using context for HTTP requests 2020-10-17 21:54:09 +00:00
Quentin McGaw
c4354871f7 Single connection written to openvpn configuration (#258)
- From now only a single OpenVPN connection is written to the OpenVPN configuration file
- If multiple connections are matched given the user parameters (i.e. city, region), it is picked at pseudo random using the current time as the pseudo random seed.
- Not relying on Openvpn picking a random remote address, may refer to #229 
- Program is aware of which connection is to be used, in order to use its matching CN for port forwarding TLS verification with PIA v4 servers, see #236 
- Simplified firewall mechanisms
2020-10-12 15:29:58 -04:00
Quentin McGaw
564d9cbf90 Faster servers information updater (#248)
* Asynchronous repeatResolve
* Parallel cyberghost and PIA (v3) processing, with a 10 goroutines limit
* Add missing vyprvpn cli flag to updater
* Increase DNS repetitions to 5 in order to obtain more IP addresses
* Update old PIA IP addresses
* Add Surfshark servers by API (unused for now)
2020-09-18 15:52:28 -04:00
Quentin McGaw
4e0bd46dd5 Updated Mullvad servers information 2020-09-18 14:16:17 +00:00
Quentin McGaw
a19efbd923 Updater loop with period and http route (#240)
* Updater loop with period and http route
* Using DNS over TLS to update servers
* Better logging
* Remove goroutines for cyberghost updater
* Respects context for servers update (quite slow overall)
* Increase shutdown grace period to 5 seconds
* Update announcement
* Add log lines for each provider update start
2020-09-12 14:04:54 -04:00
Quentin McGaw
797fa33971 Servers updater (#232)
* Support for all VPN providers
* Update all VPN providers servers information
* Remove old tooling binaries
2020-09-05 12:57:16 -04:00
Quentin McGaw
9dcc00900e Healthcheck moved to HTTP control server 2020-08-31 01:57:45 +00:00
Quentin McGaw
049bc5b226 Mullvad updater (#228)
* Add Mullvad to updater cli
* Update hardcoded servers for Mullvad
2020-08-29 13:19:34 -04:00
Quentin McGaw
d463e4cb69 New PIA servers support (#227)
* Adapt storage: SyncServers write to file option, export FlushToFile
* CLI built-in updater for old and new PIA servers
* Update hardcoded IP addresses for PIA old and new servers
* Add PIA old to allServers struct and update timestamps
* Adapt code to work with new and old PIA servers
* Remove PIA subdomains (unneeded) from resolver tool
2020-08-28 08:17:04 -04:00
Quentin McGaw
aa9693a84d Persistent server pools (#226)
* GetAllServers with version & timestamp tests
* Storage package to sync servers
* Use storage Sync to get and use servers
2020-08-25 19:38:50 -04:00
Quentin McGaw
f95f6201b1 Rename repo to Gluetun, refers to #112 2020-07-26 12:07:06 +00:00
Quentin McGaw
7e7312459d Cyberghost: read client key as file, see #179 2020-07-14 00:17:31 +00:00
Quentin McGaw
e3a677c22b Add openvpnconfig command, for #179 2020-07-13 23:43:26 +00:00
Quentin McGaw
4f502abcf8 Cyberghost support (#168)
* Host finder CLI for cyberghost
* Resolver program updated with Cyberghost data
* Gluetun cli clientkey subcommand
2020-06-13 10:43:47 -04:00
Quentin McGaw
634cef2bb2 Only resolve github.com for healthcheck, fix #170 2020-06-10 01:25:10 +00:00
Quentin McGaw
e33a6a8503 Fix #170 2020-06-05 19:32:12 -04:00
Quentin McGaw
0fb065eb61 Fix bad comparison in healthcheck 2020-06-05 12:46:44 +00:00
Quentin McGaw
f6a2aac475 Fix #170 2020-06-04 22:13:49 +00:00
Quentin McGaw
900fa261d8 Better healthcheck (#169), fixes #133
* Changed healthcheck to get and compare IP address
* Change default healthcheck frequency and retries
2020-06-03 21:52:44 -04:00
Quentin McGaw
3ab1298b1f Main function improved
- More explicit cli operation
- Using ctx and os.Args injected for eventual later testing
- Returning exit code
- Cli code moved to cli package
2020-06-02 23:03:18 +00:00