Always enable HTTPS, require config.yaml
This commit is contained in:
@@ -54,7 +54,8 @@
|
|||||||
"Bash(git stash drop:*)",
|
"Bash(git stash drop:*)",
|
||||||
"Bash(git remote set-url:*)",
|
"Bash(git remote set-url:*)",
|
||||||
"WebFetch(domain:iphostmonitor.com)",
|
"WebFetch(domain:iphostmonitor.com)",
|
||||||
"WebFetch(domain:mibbrowser.online)"
|
"WebFetch(domain:mibbrowser.online)",
|
||||||
|
"Bash(pip3 install:*)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,3 +3,5 @@ log
|
|||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
*~
|
*~
|
||||||
|
cert.pem
|
||||||
|
key.pem
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
iface := flag.String("i", "", "interface to use")
|
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")
|
noARP := flag.Bool("no-arp", false, "disable ARP discovery")
|
||||||
noLLDP := flag.Bool("no-lldp", false, "disable LLDP discovery")
|
noLLDP := flag.Bool("no-lldp", false, "disable LLDP discovery")
|
||||||
noSNMP := flag.Bool("no-snmp", false, "disable SNMP 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")
|
debugBMD := flag.Bool("debug-bmd", false, "debug Blackmagic discovery")
|
||||||
debugShure := flag.Bool("debug-shure", false, "debug Shure discovery")
|
debugShure := flag.Bool("debug-shure", false, "debug Shure discovery")
|
||||||
debugYamaha := flag.Bool("debug-yamaha", false, "debug Yamaha discovery")
|
debugYamaha := flag.Bool("debug-yamaha", false, "debug Yamaha discovery")
|
||||||
enableHTTPS := flag.Bool("https", false, "enable HTTPS server on port 443")
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
t := tendrils.New()
|
t := tendrils.New()
|
||||||
@@ -59,6 +58,5 @@ func main() {
|
|||||||
t.DebugBMD = *debugBMD
|
t.DebugBMD = *debugBMD
|
||||||
t.DebugShure = *debugShure
|
t.DebugShure = *debugShure
|
||||||
t.DebugYamaha = *debugYamaha
|
t.DebugYamaha = *debugYamaha
|
||||||
t.EnableHTTPS = *enableHTTPS
|
|
||||||
t.Run()
|
t.Run()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ locations:
|
|||||||
- lighting-2
|
- lighting-2
|
||||||
- "48:59:00:41:00:29" # Pixie Driver 8k Port 1
|
- "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: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: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
|
- ART9 # Cyc
|
||||||
- ART10 # Cyc
|
- ART10 # Cyc
|
||||||
- ART11 # Cyc
|
- ART11 # Cyc
|
||||||
@@ -140,6 +145,7 @@ locations:
|
|||||||
- name: Sound Control
|
- name: Sound Control
|
||||||
nodes:
|
nodes:
|
||||||
- SQ-7
|
- SQ-7
|
||||||
|
- "00:04:c4:15:07:a4" # SQ-7 bridge port
|
||||||
- BT
|
- BT
|
||||||
|
|
||||||
- name: Camera Control
|
- name: Camera Control
|
||||||
|
|||||||
4
http.go
4
http.go
@@ -32,10 +32,6 @@ type StatusResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *Tendrils) startHTTPServer() {
|
func (t *Tendrils) startHTTPServer() {
|
||||||
if !t.EnableHTTPS {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := ensureCert(); err != nil {
|
if err := ensureCert(); err != nil {
|
||||||
log.Printf("[ERROR] failed to ensure certificate: %v", err)
|
log.Printf("[ERROR] failed to ensure certificate: %v", err)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ type Tendrils struct {
|
|||||||
DebugBMD bool
|
DebugBMD bool
|
||||||
DebugShure bool
|
DebugShure bool
|
||||||
DebugYamaha bool
|
DebugYamaha bool
|
||||||
EnableHTTPS bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func New() *Tendrils {
|
func New() *Tendrils {
|
||||||
@@ -101,10 +100,9 @@ func (t *Tendrils) Run() {
|
|||||||
|
|
||||||
cfg, err := LoadConfig(t.ConfigFile)
|
cfg, err := LoadConfig(t.ConfigFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[ERROR] failed to load config: %v", err)
|
log.Fatalf("[ERROR] failed to load config: %v", err)
|
||||||
} else {
|
|
||||||
t.config = cfg
|
|
||||||
}
|
}
|
||||||
|
t.config = cfg
|
||||||
|
|
||||||
t.populateLocalAddresses()
|
t.populateLocalAddresses()
|
||||||
t.startHTTPServer()
|
t.startHTTPServer()
|
||||||
|
|||||||
Reference in New Issue
Block a user