5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-22 22:15:46 +00:00

Add handlers for setTunnelRouting/getTunnelRouting

This commit is contained in:
Neil Alexander 2019-03-06 17:37:48 +00:00
parent ad7e392afe
commit 3bc3002fff
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -402,6 +402,16 @@ func main() {
}
}
}
case "settunnelrouting":
fallthrough
case "gettunnelrouting":
if enabled, ok := res["enabled"].(bool); !ok {
fmt.Println("Tunnel routing is disabled")
} else if !enabled {
fmt.Println("Tunnel routing is disabled")
} else {
fmt.Println("Tunnel routing is enabled")
}
default:
if json, err := json.MarshalIndent(recv["response"], "", " "); err == nil {
fmt.Println(string(json))