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 /examples/control-panel-cloudflare/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 'examples/control-panel-cloudflare/main.go')
| -rw-r--r-- | examples/control-panel-cloudflare/main.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/control-panel-cloudflare/main.go b/examples/control-panel-cloudflare/main.go new file mode 100644 index 0000000..0661a93 --- /dev/null +++ b/examples/control-panel-cloudflare/main.go @@ -0,0 +1,40 @@ +// This is a simple example +package main + +import ( + "go.wit.com/gui" + "go.wit.com/control-panel-dns/cloudflare" +) + +var title string = "Cloudflare DNS Control Panel" +var outfile string = "/tmp/guilogfile" +var configfile string = ".config/wit/cloudflare" + +var myGui *gui.Node + +// var buttonCounter int = 5 +// var gridW int = 5 +// var gridH int = 3 + +// var mainWindow, more, more2 *gui.Node + +// var cloudflareURL string = "https://api.cloudflare.com/client/v4/zones/" + +func main() { + // parse the config file + readConfig() + + // initialize a new GO GUI instance + myGui = gui.New().Default() + + // draw the cloudflare control panel window + win := cloudflare.MakeCloudflareWindow(myGui) + win.SetText(title) + + // This is just a optional goroutine to watch that things are alive + gui.Watchdog() + gui.StandardExit() + + // update the config file + saveConfig() +} |
