X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcfg.go;h=0937ab0f4f51d5eef96e6f2dd9d2b0d54cd57e7a;hb=be389bd7f3d36d371007c86341059b042233d455;hp=55c9dd0a2479cbe93ae98d97edb2aeb846098ff7;hpb=54b0f8a0e20847d666dd445bd92c282fd9ab5dec;p=nncp.git diff --git a/src/cfg.go b/src/cfg.go index 55c9dd0..0937ab0 100644 --- a/src/cfg.go +++ b/src/cfg.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -146,6 +146,8 @@ type CfgJSON struct { Neigh map[string]NodeJSON `json:"neigh"` Areas map[string]AreaJSON `json:"areas,omitempty"` + + YggdrasilAliases map[string]string `json:"yggdrasil-aliases,omitempty"` } func NewNode(name string, cfg NodeJSON) (*Node, error) { @@ -191,7 +193,7 @@ func NewNode(name string, cfg NodeJSON) (*Node, error) { } var freqPath *string - freqChunked := int64(MaxFileSize) + var freqChunked int64 var freqMinSize int64 freqMaxSize := int64(MaxFileSize) if cfg.Freq != nil { @@ -542,6 +544,8 @@ func Cfg2Ctx(cfgJSON *CfgJSON) (*Ctx, error) { Alias: make(map[string]*NodeId), MCDRxIfis: cfgJSON.MCDRxIfis, MCDTxIfis: cfgJSON.MCDTxIfis, + + YggdrasilAliases: cfgJSON.YggdrasilAliases, } if cfgJSON.Notify != nil { if cfgJSON.Notify.File != nil {