mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Add handlers for setTunnelRouting/getTunnelRouting
This commit is contained in:
parent
ad7e392afe
commit
3bc3002fff
1 changed files with 10 additions and 0 deletions
|
@ -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:
|
default:
|
||||||
if json, err := json.MarshalIndent(recv["response"], "", " "); err == nil {
|
if json, err := json.MarshalIndent(recv["response"], "", " "); err == nil {
|
||||||
fmt.Println(string(json))
|
fmt.Println(string(json))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue