mirror of
https://github.com/yggdrasil-network/yggdrasil-go
synced 2024-11-09 23:20:26 +03:00
Fix -normaliseconf
when using PrivateKeyPath
This commit is contained in:
parent
39c4b24395
commit
f6f669617f
@ -162,6 +162,9 @@ func main() {
|
|||||||
|
|
||||||
case *normaliseconf:
|
case *normaliseconf:
|
||||||
cfg.AdminListen = ""
|
cfg.AdminListen = ""
|
||||||
|
if cfg.PrivateKeyPath != "" {
|
||||||
|
cfg.PrivateKey = nil
|
||||||
|
}
|
||||||
var bs []byte
|
var bs []byte
|
||||||
if *confjson {
|
if *confjson {
|
||||||
bs, err = json.MarshalIndent(cfg, "", " ")
|
bs, err = json.MarshalIndent(cfg, "", " ")
|
||||||
|
@ -40,8 +40,8 @@ import (
|
|||||||
// options that are necessary for an Yggdrasil node to run. You will need to
|
// options that are necessary for an Yggdrasil node to run. You will need to
|
||||||
// supply one of these structs to the Yggdrasil core when starting a node.
|
// supply one of these structs to the Yggdrasil core when starting a node.
|
||||||
type NodeConfig struct {
|
type NodeConfig struct {
|
||||||
PrivateKey KeyBytes `comment:"Your private key. DO NOT share this with anyone!"`
|
PrivateKey KeyBytes `json:",omitempty" comment:"Your private key. DO NOT share this with anyone!"`
|
||||||
PrivateKeyPath string `json:",omitempty"`
|
PrivateKeyPath string `json:",omitempty" comment:"The path to your private key file in PEM format."`
|
||||||
Certificate *tls.Certificate `json:"-"`
|
Certificate *tls.Certificate `json:"-"`
|
||||||
Peers []string `comment:"List of connection strings for outbound peer connections in URI format,\ne.g. tls://a.b.c.d:e or socks://a.b.c.d:e/f.g.h.i:j. These connections\nwill obey the operating system routing table, therefore you should\nuse this section when you may connect via different interfaces."`
|
Peers []string `comment:"List of connection strings for outbound peer connections in URI format,\ne.g. tls://a.b.c.d:e or socks://a.b.c.d:e/f.g.h.i:j. These connections\nwill obey the operating system routing table, therefore you should\nuse this section when you may connect via different interfaces."`
|
||||||
InterfacePeers map[string][]string `comment:"List of connection strings for outbound peer connections in URI format,\narranged by source interface, e.g. { \"eth0\": [ \"tls://a.b.c.d:e\" ] }.\nNote that SOCKS peerings will NOT be affected by this option and should\ngo in the \"Peers\" section instead."`
|
InterfacePeers map[string][]string `comment:"List of connection strings for outbound peer connections in URI format,\narranged by source interface, e.g. { \"eth0\": [ \"tls://a.b.c.d:e\" ] }.\nNote that SOCKS peerings will NOT be affected by this option and should\ngo in the \"Peers\" section instead."`
|
||||||
|
Loading…
Reference in New Issue
Block a user