]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/govpn/cmd/govpn-server/conf.go
EncLess -> Encless for convenience
[govpn.git] / src / govpn / cmd / govpn-server / conf.go
index 76d56cd8ae9f5185e954ff2dbc729b28a40c15f0..cd746699b4870159dc42b24b3f0e37325ed7da92 100644 (file)
@@ -1,6 +1,6 @@
 /*
 GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
 
 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
@@ -53,14 +53,23 @@ func confRead() map[govpn.PeerId]*govpn.PeerConf {
                if err != nil {
                        log.Fatalln("Unable to decode the key:", err.Error(), pc.VerifierRaw)
                }
+               if pc.Encless {
+                       pc.Noise = true
+               }
+               if pc.MTU == 0 {
+                       pc.MTU = govpn.MTUDefault
+               }
                conf := govpn.PeerConf{
                        Verifier: verifier,
                        Id:       verifier.Id,
                        Name:     name,
+                       Iface:    pc.Iface,
+                       MTU:      pc.MTU,
                        Up:       pc.Up,
                        Down:     pc.Down,
                        Noise:    pc.Noise,
                        CPR:      pc.CPR,
+                       Encless:  pc.Encless,
                }
                if pc.TimeoutInt <= 0 {
                        pc.TimeoutInt = govpn.TimeoutDefault