Always enable HTTPS, require config.yaml

This commit is contained in:
Ian Gulliver
2026-01-25 11:33:15 -08:00
parent 2ab66520b6
commit f9afd3abb6
6 changed files with 13 additions and 12 deletions

View File

@@ -54,7 +54,8 @@
"Bash(git stash drop:*)",
"Bash(git remote set-url:*)",
"WebFetch(domain:iphostmonitor.com)",
"WebFetch(domain:mibbrowser.online)"
"WebFetch(domain:mibbrowser.online)",
"Bash(pip3 install:*)"
]
}
}

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@ log
*.swp
*.swo
*~
cert.pem
key.pem

View File

@@ -8,7 +8,7 @@ import (
func main() {
iface := flag.String("i", "", "interface to use")
configFile := flag.String("config", "", "path to YAML config file")
configFile := flag.String("config", "config.yaml", "path to YAML config file")
noARP := flag.Bool("no-arp", false, "disable ARP discovery")
noLLDP := flag.Bool("no-lldp", false, "disable LLDP discovery")
noSNMP := flag.Bool("no-snmp", false, "disable SNMP discovery")
@@ -31,7 +31,6 @@ func main() {
debugBMD := flag.Bool("debug-bmd", false, "debug Blackmagic discovery")
debugShure := flag.Bool("debug-shure", false, "debug Shure discovery")
debugYamaha := flag.Bool("debug-yamaha", false, "debug Yamaha discovery")
enableHTTPS := flag.Bool("https", false, "enable HTTPS server on port 443")
flag.Parse()
t := tendrils.New()
@@ -59,6 +58,5 @@ func main() {
t.DebugBMD = *debugBMD
t.DebugShure = *debugShure
t.DebugYamaha = *debugYamaha
t.EnableHTTPS = *enableHTTPS
t.Run()
}

View File

@@ -8,7 +8,12 @@ locations:
- lighting-2
- "48:59:00:41:00:29" # Pixie Driver 8k Port 1
- "48:59:00:28:00:27" # Pixie Driver 8k Port 2
- "48:59:00:43:00:29" # Pixie Driver 8k Port 3
- "48:59:00:42:00:29" # Pixie Driver 8k Port 4
- "48:59:00:3c:00:3e" # Pixie Driver 8k Port 5
- "48:59:00:3f:00:3e" # Pixie Driver 8k Port 6
- "48:59:00:25:00:3e" # Pixie Driver 8k Port 7
- "48:59:00:41:00:3e" # Pixie Driver 8k Port 8
- ART9 # Cyc
- ART10 # Cyc
- ART11 # Cyc
@@ -140,6 +145,7 @@ locations:
- name: Sound Control
nodes:
- SQ-7
- "00:04:c4:15:07:a4" # SQ-7 bridge port
- BT
- name: Camera Control

View File

@@ -32,10 +32,6 @@ type StatusResponse struct {
}
func (t *Tendrils) startHTTPServer() {
if !t.EnableHTTPS {
return
}
if err := ensureCert(); err != nil {
log.Printf("[ERROR] failed to ensure certificate: %v", err)
return

View File

@@ -60,7 +60,6 @@ type Tendrils struct {
DebugBMD bool
DebugShure bool
DebugYamaha bool
EnableHTTPS bool
}
func New() *Tendrils {
@@ -101,10 +100,9 @@ func (t *Tendrils) Run() {
cfg, err := LoadConfig(t.ConfigFile)
if err != nil {
log.Printf("[ERROR] failed to load config: %v", err)
} else {
t.config = cfg
log.Fatalf("[ERROR] failed to load config: %v", err)
}
t.config = cfg
t.populateLocalAddresses()
t.startHTTPServer()