Quentin McGaw
b1596bc7e4
Firewall refactoring
...
- Ability to enable and disable rules in various loops
- Simplified code overall
- Port forwarding moved into openvpn loop
- Route addition and removal improved
2020-07-11 21:03:55 +00:00
Quentin McGaw
1ac06ee4a8
Fatal waits for subprocesses to complete
2020-07-09 22:04:04 +00:00
Quentin McGaw
dc1c7eab81
Fix #187 (silly me #2 )
2020-07-09 11:56:43 +00:00
Quentin McGaw
5bf471767d
Remove unneeded waiter object
2020-07-08 23:43:03 +00:00
Quentin McGaw
99e386abc8
Using a waitgroup to wait for all programs to exit
2020-07-08 23:36:02 +00:00
Quentin McGaw
8669748289
Shadowsocks loop
2020-07-08 23:29:40 +00:00
Quentin McGaw
a39d885e34
Minor fixes
...
- Not logging program name twice for wait errors
- Wait for tinyproxy to exit
2020-07-08 23:29:22 +00:00
Quentin McGaw
7d36993450
Tinyproxy run loop
2020-07-08 23:20:33 +00:00
Quentin McGaw
ad73a027f3
Gets public IP every hour
2020-07-08 22:47:12 +00:00
Quentin McGaw
53b7fafc49
Public IP loop, fixes #186
...
- Uses common http client with 15 seconds timeout
- Repeats on fail after 5 seconds sleep time
2020-07-08 22:33:28 +00:00
Quentin McGaw
7450ffce2b
uid and gid variables (no change at runtime)
2020-07-08 22:13:59 +00:00
Quentin McGaw
765f06e5a8
Write auth file in openvpn loop
2020-07-08 22:11:23 +00:00
Quentin McGaw
7a136db085
Simplified loop mechanism for openvpn and dns
...
- Refers to #91
- http control server starts without waiting for unbound and/or openvpn
- Trying to get rid of waiter and use channels directly
- Simpler main.go
- More robust logic overall
2020-07-08 13:14:39 +00:00
Rick van Hattem
dd529a48fa
Stripped extraneous whitespace ( #180 )
2020-07-07 17:33:35 -04:00
Quentin McGaw
18e99d07d0
Move provider settings in openvpn settings
2020-07-05 20:05:38 +00:00
Quentin McGaw
c9368e352c
DNS_PLAINTEXT_ADDRESS, fixes #176
2020-06-26 14:40:46 +00:00
Quentin McGaw
082a5bdf51
Fix http control server not working when DOT=off
2020-06-16 00:11:22 +00:00
Quentin McGaw
7369808b84
Refactor ( #174 )
...
- Goal was to simplify main.go complexity
- Use common structures and interfaces for all vpn providers
- Moved files around
- Removed some alias models
2020-06-13 14:08:29 -04: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
bdcadf09ec
Fix: Shadowsocks nameserver when DOT=off
2020-06-13 13:57:26 +00:00
Quentin McGaw
8cae369186
Add FIREWALL variable, refers to #171
2020-06-12 17:11:21 +00:00
Quentin McGaw
6107f5c4ab
Fix #173
2020-06-10 01:16:58 +00:00
Quentin McGaw
e33a6a8503
Fix #170
2020-06-05 19:32:12 -04:00
Quentin McGaw
f262ee6454
Resolver cli changes
...
- Max of 10 simultaneous goroutines to avoid being throttled by DNS
- All template formatting moved to formatLine function
- resolveRepeat is synchronous to avoid being throttled by DNS
2020-06-02 23:10:04 +00: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
Quentin McGaw
a7739b6f5d
Add multi hop regions and ips for Surfshark
2020-05-31 19:50:28 +00:00
Quentin McGaw
96e57d2c32
Surfshark ( #167 )
2020-05-29 07:24:27 -04:00
Quentin McGaw
85a93bdd34
Remove timestamps from program logs
...
- Using suppress-timestamps for openvpn
- Using custom regexp for tinyproxy, shadowsocks and unbound
- Time is now only shown once per line
- Log level of subprogram is preserverd
2020-05-29 11:17:14 +00:00
Quentin McGaw
3f6d3d7c2a
Openvpn files parser tool binary
2020-05-29 10:13:42 +00:00
Quentin McGaw
09a0ba1228
DNS Resolver tool binary
2020-05-29 10:13:29 +00:00
Quentin McGaw
aac4298f69
Moved main.go to cmd/gluetun/main.go
2020-05-28 23:59:35 +00:00
Quentin McGaw
43c15b3e68
Removed double message in port forwarding logging
2020-05-18 13:39:01 +00:00
Quentin McGaw
ab223a5e06
User specified iptables rules ( #161 )
2020-05-18 09:37:34 -04:00
Quentin McGaw
5eb1859f41
Fix #156 falls back to dns on ipv4 only
2020-05-09 00:54:49 +00:00
Quentin McGaw
b45fa026dd
Improved openvpn run loop
2020-05-09 00:43:09 +00:00
Quentin McGaw
da739a0c3d
Fix waitForAll context for graceful exits
2020-05-07 12:58:37 +00:00
Quentin McGaw
0dc400b540
Fix Unbound run loop logic
...
- Plain DNS is used only for the first resolving of github.com to obtain block lists and crypto files required by Unbound
- DNS over TLS is used at all time by the system and the Go program thereafter, even between periodic restarts
- Downtime during a periodic update is < 1 second
- On an Unbound start or unexpected exit error, the container falls back on the unencrypted version of the DNS in order to try restarting Unbound
2020-05-07 12:56:49 +00:00
Quentin McGaw
d73765a5f5
DNS_UPDATE_PERIOD environment variable
2020-05-05 18:00:56 +00:00
Quentin McGaw
754bab9763
Unbound restart logic
...
- Update files and restart unbound every 24hours
- HTTP route to force update & restart of Unbound
- Fix #151
2020-05-02 17:08:15 +00:00
Quentin McGaw
507374ca4e
Improve openvpn run loop logs
2020-05-02 17:03:11 +00:00
Quentin McGaw
c068484fa0
Initial DNS IP is ipv4/6 depending on DOT_IPV6
2020-05-02 15:41:28 +00:00
Quentin McGaw
363fabc810
Reduced main.go code complexity
2020-05-02 14:48:18 +00:00
Quentin McGaw
bc05ff34fd
Launch DNS over TLS after tunneling
...
- No data is downloaded before tunneling
- Fixes #127
2020-05-02 13:11:41 +00:00
Quentin McGaw
8e77842f1e
FatalOnError cancels parent context
2020-05-02 13:05:09 +00:00
Quentin McGaw
41168f88cd
Improved connected signaling mechanism
2020-05-01 03:15:49 +00:00
Quentin McGaw
f4cd1896c9
Go HTTP control server with restart openvpn route
...
- Fix #147
- Dockerfile updated
- Documentation updated
- Using contexts to restart openvpn
- Code foundation for more http routes
2020-04-30 23:41:57 +00:00
Quentin McGaw
944e6a107b
Logs wait function errors as soon as they happen
2020-04-30 23:39:28 +00:00
Quentin McGaw
b6135d2476
Support consoles without /dev/stdout
2020-04-30 23:34:35 +00:00
Quentin McGaw
c9b6e79792
Clear ip status file on termination
2020-04-30 12:55:07 +00:00
Quentin McGaw
94255aaa38
Better onConnected logic
...
- First port forward after 5 seconds
- Public IP obtained ASAP
- Logging in main only
- Allow port forward firewall with 1 second timeout local context
2020-04-30 12:54:48 +00:00