mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Refactored code for NetworkDomain, added NetworkDomain.Prefix parameter to Mobile module
This commit is contained in:
parent
8da27aad4f
commit
56ed2bd629
8 changed files with 24 additions and 36 deletions
|
@ -47,13 +47,17 @@ func (m *Mesh) StartJSON(configjson []byte) error {
|
|||
if err := json.Unmarshal(configjson, &m.config); err != nil {
|
||||
return err
|
||||
}
|
||||
// Setup the Yggdrasil node itself.
|
||||
// Setup the Mesh node itself.
|
||||
{
|
||||
sk, err := hex.DecodeString(m.config.PrivateKey)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
options := []core.SetupOption{}
|
||||
options := []core.SetupOption{
|
||||
core.NodeInfo(m.config.NodeInfo),
|
||||
core.NodeInfoPrivacy(m.config.NodeInfoPrivacy),
|
||||
core.NetworkDomain(m.config.NetworkDomain),
|
||||
}
|
||||
for _, peer := range m.config.Peers {
|
||||
options = append(options, core.Peer{URI: peer})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue