Quentin McGaw (desktop)
ab910403c6
Fix: public IP loop being stuck
2021-07-26 01:35:43 +00:00
Quentin McGaw (laptop)
7b20cec035
Maint: rename SettingsGetterSetter to SettingsGetSetter
2021-07-24 19:49:50 +00:00
Quentin McGaw (laptop)
8d512852a4
Maint: rework publicip package
...
- Use loopstate package
- Loop interface composition
- Return concrete struct from constructors
- Split into more files
- Add publicip/state package
2021-07-24 19:49:11 +00:00
Quentin McGaw (desktop)
3c44214d01
Maint: pass only single strings to logger methods
...
- Do not assume formatting from logger's interface
- Allow to change golibs in the future to accept only strings for logger methods
2021-07-23 17:36:08 +00:00
Quentin McGaw (desktop)
21f4cf7ab5
Maint: do not mock os functions
...
- Use filepaths with /tmp for tests instead
- Only mock functions where filepath can't be specified such as user.Lookup
2021-07-23 16:06:19 +00:00
Quentin McGaw (desktop)
0ed738cd61
Maint: make all set status context aware
2021-07-16 00:49:59 +00:00
Quentin McGaw
7d6763cde7
Maintenance: upgrade golibs (affects logger)
2021-05-14 14:07:16 +00:00
Quentin McGaw
cff5e693d2
Maintenance: shutdown order
...
- Order of threads to shutdown (control then tickers then health etc.)
- Rely on closing channels instead of waitgroups
- Move exit logs from each package to the shutdown package
2021-05-11 22:24:32 +00:00
Quentin McGaw
d9a70fd094
Maintenance: improve publicip with Result struct
2021-05-08 23:30:29 +00:00
Quentin McGaw
c54ee71e1d
Maintenance: new logging, shorter with less deps
2021-02-25 23:51:29 +00:00
Quentin McGaw
3deb65b529
Feature: log out country, region and city of IP
2021-02-08 00:01:14 +00:00
Quentin McGaw
b1f1f94a76
Maintenance: remove some type aliases
2021-02-06 18:31:14 +00:00
Quentin McGaw
90aaf71270
Configuration package ( #369 )
2021-02-06 11:05:50 -05:00
Quentin McGaw
5757f0e201
Fix: Only log subproc error when it's not nil
2021-01-30 18:07:12 +00:00
Quentin McGaw
5194361f3b
Fix public IP on restarts, refers to 359
2021-01-29 00:06:55 +00:00
Quentin McGaw
5dcbe79fa8
Move OS package to golibs
2021-01-02 01:57:00 +00:00
Quentin McGaw
25acbf8501
Feature: Increasing backoff time for crashes
...
- Fix #247
2020-12-30 17:22:54 +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
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
db886163c2
Public IP getter loop refactored
2020-12-28 01:51:55 +00:00
Quentin McGaw
82a02287ac
Public IP endpoint with GET /ip fixing #319
2020-12-27 21:06:00 +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
98f778c3bb
Improve timing behavior of ticking in loops
2020-10-15 23:20:36 +00:00
Quentin McGaw
e0e450ca1c
Revisit waitgroup ( #241 )
...
* Fix Add to waitgroup out of goroutines calling wg.Done()
* Pass waitgroup to other loop functions
2020-09-12 14:34:15 -04:00
Quentin McGaw
f95f6201b1
Rename repo to Gluetun, refers to #112
2020-07-26 12:07:06 +00:00
Quentin McGaw
b4a4e441c1
Fix #199 when ticker period is 0
2020-07-16 12:00:25 +00:00
Quentin McGaw
9b92ece5a1
Fix race condition for public ip loop
2020-07-16 01:44:48 +00:00
Quentin McGaw
51af8d1ab0
PUBLICIP_PERIOD environment variable
2020-07-16 01:12:54 +00:00
Quentin McGaw
616ba0c538
Replace explicit channels with functions
2020-07-15 01:34:46 +00:00
Quentin McGaw
ccf11990f1
Fix several async issues
...
- race conditions between ctx.Done and waitError channel
- Sleep for retry cancels on cancelation of context
- Stops the any loop at the start if the context was canceled
- Mentions when loops exit
- Wait for errors on triggered loop restarts
2020-07-11 20:59:30 +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