mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-29 00:32:14 +00:00
25 lines
372 B
Go
25 lines
372 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/tendermint/tendermint/p2p/upnp"
|
||
|
)
|
||
|
|
||
|
func probe_upnp() {
|
||
|
|
||
|
capabilities, err := upnp.Probe()
|
||
|
if err != nil {
|
||
|
fmt.Println("Probe failed: %v", err)
|
||
|
} else {
|
||
|
fmt.Println("Probe success!")
|
||
|
jsonBytes, err := json.Marshal(capabilities)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
fmt.Println(string(jsonBytes))
|
||
|
}
|
||
|
|
||
|
}
|