diff options
| author | Jeff Carr <[email protected]> | 2023-12-28 09:43:45 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-28 09:43:45 -0600 |
| commit | 6fa6d6dfc9e5a88e7dff2ed3c148b3b4271f566c (patch) | |
| tree | f08edaac07ddf1a2e8a7401ef32c53707bdf5537 /main.go | |
| parent | 73b0cee93320bb5b572881cd1a5ba9d878a4ba3a (diff) | |
Detect that a VPN is needed
IPv6() returns true if it's working
display duration
a 'DNS Lookup Status' window
actual dig results
display status and failure counters
count lookup failures and successes
add TCP dns lookup
logic to test if dns is working at all
add DNS over HTTPS
cloudflare new & update kind of working
holy shit, go.wit.com finally works with git mod tidy
working, but cloudflare api stuff is broken
AAAA '(none)' logic detection is better
cloudflare control panel
display the working real AAAA addresses
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -59,6 +59,27 @@ func main() { /* Poll for changes to the networking settings */ + +/* https://github.com/robfig/cron/blob/master/cron.go + +// Run the cron scheduler, or no-op if already running. +func (c *Cron) Run() { + c.runningMu.Lock() + if c.running { + c.runningMu.Unlock() + return + } + c.running = true + c.runningMu.Unlock() + c.run() +} + +// run the scheduler.. this is private just due to the need to synchronize +// access to the 'running' state variable. +func (c *Cron) run() { + c.logger.Info("start") +*/ + func checkNetworkChanges() { var lastLocal time.Time = time.Now() var lastDNS time.Time = time.Now() @@ -119,12 +140,12 @@ func DNSloop() { } else if (duration > 100 * time.Millisecond ) { newSpeed = "OK" if (me.fixProc != nil) { - me.fixProc.Disable() + // me.fixProc.Disable() } } else { newSpeed = "FAST" if (me.fixProc != nil) { - me.fixProc.Disable() + // me.fixProc.Disable() } } if (newSpeed != me.DnsSpeedLast) { @@ -156,7 +177,7 @@ func linuxLoop() { } var aaaa []string - aaaa = realAAAA() + aaaa = dhcpAAAA() var all string for _, s := range aaaa { debug(LogNet, "my actual AAAA = ",s) |
