mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-26 02:31:37 +00:00
Merge branch 'ios' into link
This commit is contained in:
commit
4ae36dfffe
@ -7,7 +7,6 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
hjson "github.com/hjson/hjson-go"
|
hjson "github.com/hjson/hjson-go"
|
||||||
@ -52,10 +51,6 @@ func (c *Core) StartAutoconfigure() error {
|
|||||||
if hostname, err := os.Hostname(); err == nil {
|
if hostname, err := os.Hostname(); err == nil {
|
||||||
nc.NodeInfo = map[string]interface{}{"name": hostname}
|
nc.NodeInfo = map[string]interface{}{"name": hostname}
|
||||||
}
|
}
|
||||||
ifceExpr, err := regexp.Compile(".*")
|
|
||||||
if err == nil {
|
|
||||||
c.ifceExpr = append(c.ifceExpr, ifceExpr)
|
|
||||||
}
|
|
||||||
if err := c.Start(nc, logger); err != nil {
|
if err := c.Start(nc, logger); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -77,15 +72,6 @@ func (c *Core) StartJSON(configjson []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
nc.IfName = "dummy"
|
nc.IfName = "dummy"
|
||||||
//c.log.Println(nc.MulticastInterfaces)
|
|
||||||
for _, ll := range nc.MulticastInterfaces {
|
|
||||||
//c.log.Println("Processing MC", ll)
|
|
||||||
ifceExpr, err := regexp.Compile(ll)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
c.AddMulticastInterfaceExpr(ifceExpr)
|
|
||||||
}
|
|
||||||
if err := c.Start(nc, logger); err != nil {
|
if err := c.Start(nc, logger); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user