1 parent
f70dfe9de8
commit
11b87f879a
2 files changed
+6
No files matched your search
@@ -57,6 +57,7 @@ This produces output like:
|
||||
|
||||
````
|
||||
weave router 0.7.0
|
||||
Encryption off
|
||||
Our name is 7a:f4:56:87:76:3b
|
||||
Sniffing traffic on &{39 65535 ethwe ae:e3:07:9c:8c:d4 up|broadcast|multicast}
|
||||
MACs:
|
||||
|
||||
@@ -135,8 +135,13 @@ func main() {
|
||||
}
|
||||
|
||||
func handleHttp(router *weave.Router) {
|
||||
encryption := "off"
|
||||
if router.Password != nil && len(*router.Password) > 0 {
|
||||
encryption = "on"
|
||||
}
|
||||
http.HandleFunc("/status", func(w http.ResponseWriter, r *http.Request) {
|
||||
io.WriteString(w, fmt.Sprintln("weave router", version))
|
||||
io.WriteString(w, fmt.Sprintln("Encryption", encryption))
|
||||
io.WriteString(w, router.Status())
|
||||
})
|
||||
http.HandleFunc("/connect", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in new issue
Block a user