Compare commits

..

2 Commits

Author SHA1 Message Date
Jeff Carr be1e66cb0b Merge branch 'jcarr' of git.wit.org:jcarr/control-panel-dns into jcarr
Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-02-18 23:22:45 -06:00
Jeff Carr 2fc6e74484 v.0.2 release. kinda working
next step: actually work on DNS update
    add RFC 2136 defining nsupdate. Vixie et al in 1997
    attempt to pull DNS records
    start a checkDNS() function
    dampen output. actually track IPs
    poll every 2 seconds
    fuck this shit about logging. I hate log.whatthefuck*(){}
    Do you know what I don't give a damn about? log()
    So, here you go. a stupid log() function.
    Also, because I'm annoyed today sleep() and exit()
    Because, when I want you to sleep or fucking exit, I don't
    want to go to the top of a file and declare stupid shit related
    to nanoseconds or add "import os.Exit" or whatever the hell.
    god damn it, I know what I fucking wanted. I want simple.
    add IsRealIP() and IsIPv6()
    need a netlink function (nope: not going to use this)
    put the gui plugin's in the debian package for now

    Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-02-18 23:15:02 -06:00
2 changed files with 16 additions and 0 deletions

13
gui.go
View File

@ -61,6 +61,18 @@ func addDNSTab(window *gui.Node, title string) {
s := tb.GetText() s := tb.GetText()
log("text =", s) log("text =", s)
} }
<<<<<<< HEAD
g2.NewButton("dump Host.ifmap", func () {
for i, t := range me.ifmap {
log("int =", i, "name =", t.name, t.iface)
}
})
g2.NewButton("checkDNS()", func () {
me.checkDNS()
})
g2.NewButton("getHostname()", func () {
getHostname()
=======
g2.NewButton("Network Interfaces", func () { g2.NewButton("Network Interfaces", func () {
for i, t := range me.ifmap { for i, t := range me.ifmap {
log("name =", t.iface.Name) log("name =", t.iface.Name)
@ -81,6 +93,7 @@ func addDNSTab(window *gui.Node, title string) {
}) })
g2.NewButton("checkDNS()", func () { g2.NewButton("checkDNS()", func () {
checkDNS() checkDNS()
>>>>>>> eb554cfeb772d3ec3c9bc9612603a7c2c5681ea9
}) })
g2.NewButton("os.User()", func () { g2.NewButton("os.User()", func () {
user, _ := user.Current() user, _ := user.Current()

3
net.go
View File

@ -91,6 +91,8 @@ func checkInterface(i net.Interface) {
} }
} }
<<<<<<< HEAD
=======
func realAAAA() []string { func realAAAA() []string {
var aaaa []string var aaaa []string
@ -104,6 +106,7 @@ func realAAAA() []string {
return aaaa return aaaa
} }
>>>>>>> eb554cfeb772d3ec3c9bc9612603a7c2c5681ea9
func checkDNS() (map[string]*IPtype, map[string]*IPtype) { func checkDNS() (map[string]*IPtype, map[string]*IPtype) {
var ipv4s map[string]*IPtype var ipv4s map[string]*IPtype
var ipv6s map[string]*IPtype var ipv6s map[string]*IPtype