Quentin McGaw
bedf613cff
Code maintenance: storage merging reworked
2020-12-29 17:49:38 +00:00
Quentin McGaw
e643ce5b99
Fix publicip and updater loops exit bugs
2020-12-29 16:44:55 +00:00
Quentin McGaw
cb64302294
Rename UID and GID to PUID and PGID
2020-12-29 16:44:35 +00:00
Quentin McGaw
8d5f2fec09
Code maintenance: use native Go HTTP client
2020-12-29 02:55:34 +00:00
Quentin McGaw
f55fb4055f
Code maintenance: OS user abstraction interface
2020-12-29 01:16:53 +00:00
Quentin McGaw
cdd1f87437
Code maintenance: Remove unneeded ctrl.Finish()
2020-12-29 01:04:07 +00:00
Quentin McGaw
7058373916
Code maintenance: Unix abstraction interface
...
- Used for creating the tun device if it does not exist
- Mocks generated for testing
2020-12-29 01:02:47 +00:00
Quentin McGaw
8dd38fd182
Code maintenance: better JSON decoding for HTTP
2020-12-29 00:56:51 +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
f5366c33bc
Remove unneeded .Times(1) for unit tests mocks
2020-12-28 01:52:30 +00:00
Quentin McGaw
db886163c2
Public IP getter loop refactored
2020-12-28 01:51:55 +00:00
Quentin McGaw
91f5338db0
Fix updater loop bug
2020-12-28 01:50:13 +00:00
Quentin McGaw
82a02287ac
Public IP endpoint with GET /ip fixing #319
2020-12-27 21:06:00 +00:00
Quentin McGaw
2dc674559e
Re-use username for UID if it exists
2020-12-27 00:36:39 +00:00
Quentin McGaw
38e713fea2
Fix Block-outside-dns #316
2020-12-23 06:46:54 +00:00
Quentin McGaw
2cbb14c36c
Fix Purevpn settings display, refers to #317
2020-12-22 14:08:12 +00:00
Quentin McGaw
610e88958e
Upgrade golangci-lint to v1.33.0
2020-12-22 13:52:37 +00:00
Quentin McGaw
bb76477467
Fix #316
2020-12-22 13:49:49 +00:00
Quentin McGaw
22965ccce3
Fix #315
2020-12-22 06:21:25 +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
84944a87d3
HTTP proxy authentication fixes ( #300 )
...
- Only accepts HTTP 1.x protocols
- Only checks the credentials when the method is `CONNECT` or the request URL is absolute
- More logging on authorization failures
- Removes the authorization headers before forwarding the HTTP(s) requests
- Refers to #298
2020-12-01 22:29:31 -05:00
Quentin McGaw
fb62910b17
HTTP proxy 24 hours timeout, fix #303
2020-11-21 01:26:02 +00: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
6896cf4258
Update PIA hardcoded servers information
2020-11-14 22:21:08 +00:00
Quentin McGaw
188d63c6b8
Fix #298
2020-11-13 01:14:05 +00:00
Quentin McGaw
aef14a9f6d
Assimilate PIA v4 as PIA in code
2020-11-10 13:35:49 +00:00
Quentin McGaw
40ed070f21
Filter Privado servers by hostnames only
2020-11-09 23:17:22 +00:00
Quentin McGaw
f1e4b9937b
Privado support, fix #285 ( #288 )
2020-11-08 20:56:49 -05:00
Quentin McGaw
096a9c5fc0
Fix #289
2020-11-06 02:54:27 +00:00
Quentin McGaw
7518f74729
Refactor HTTP control server code
2020-11-05 22:26:53 +00:00
Quentin McGaw
854401a150
PureVPN servers json tag fix
2020-11-05 02:22:33 +00:00
Quentin McGaw
a7a7efe9c3
Remove PIA v3 servers support
2020-11-05 02:10:34 +00:00
Quentin McGaw
31883f9adb
Windscribe API and more servers filter options, fixes #197 ( #282 )
...
- Use Windscribe API to fetch servers information
- More data on servers about region, city and hostname
- Add optional server filters with `REGION`, `CITY` and `HOSTNAME` csv environment variables
2020-11-04 20:38:35 -05:00
Quentin McGaw
3b04677f8f
HTTP control server /version endpoint
2020-11-04 14:07:04 +00:00
Quentin McGaw
b5fb2b849a
DOT listens on all interfaces, refers to #281
2020-11-04 03:14:27 +00:00
Quentin McGaw
0c9f74ffa4
HTTP proxy written in Go to replace Tinyproxy ( #269 )
2020-10-31 21:50:31 -04:00
Quentin McGaw
58da55da1e
Retrocompatiblity with EXTRA_SUBNETS key
2020-10-29 23:32:15 +00:00
Quentin McGaw
db64dea664
Fix #273 ( #277 ), adding FIREWALL_OUTBOUND_SUBNETS
2020-10-29 19:23:44 -04:00
Quentin McGaw
f7bff247aa
Fix #275
2020-10-28 22:09:58 +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
78d83145ba
Increase http timeout to 30s for piav4
...
- Refers to #271
2020-10-26 21:53:18 +00:00
Quentin McGaw
0c81154f36
No firewall setup needed for Shadowsocks
2020-10-26 02:52:10 +00:00
Quentin McGaw
53fe08ea26
Fix Mullvad CSV city bug
2020-10-25 21:13:26 +00:00
Quentin McGaw
a6cb1a7052
Remove x/net Go dependency
2020-10-25 20:45:14 +00:00
Quentin McGaw
c64fe7e45d
Routing: use 0.0.0.0/0 instead of nil
2020-10-25 20:41:09 +00:00
Quentin McGaw
a062135148
Add routing verbose option in code
2020-10-25 20:40:17 +00:00
Quentin McGaw
5ae7c15211
Unused shadowsocks code cleanup
2020-10-25 20:38:16 +00:00
Quentin McGaw
f29707fa9f
Remove unneeded openvpn remote-random
2020-10-24 22:26:15 +00:00
Quentin McGaw
e97d1e4a9a
Set default for DOT_CACHING in code
2020-10-24 22:24:20 +00:00
Quentin McGaw
ed4fcc17b3
Routing improvements ( #268 )
...
- Fixes #82
- Remove `EXTRA_SUBNETS`
- Remove no longer needed iptables rules
- Reduce routing interface arity
- Routing setup is done in main.go instead of in the firewall
- Routing setup gets reverted at shutdown
2020-10-24 18:05:11 -04:00