mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Show your IPv6 address and subnet when starting
This commit is contained in:
parent
bd32f5890b
commit
04b3e84023
2 changed files with 13 additions and 0 deletions
|
@ -272,6 +272,11 @@ func main() {
|
|||
n.core.DEBUG_stopTun()
|
||||
}()
|
||||
logger.Println("Started...")
|
||||
address := (*n.core.GetAddress())[:]
|
||||
subnet := (*n.core.GetSubnet())[:]
|
||||
subnet = append(subnet, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
logger.Printf("Your IPv6 address is %s", net.IP(address).String())
|
||||
logger.Printf("Your IPv6 subnet is %s/64", net.IP(subnet).String())
|
||||
if cfg.Multicast {
|
||||
addr, err := net.ResolveUDPAddr("udp", multicastAddr)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue