timeout int
firstUpCall bool = true
knownPeers govpn.KnownPeers
+ idsCache govpn.CipherCache
)
func main() {
pub, priv := govpn.NewVerifier(id, govpn.StringFromFile(*keyPath))
conf = &govpn.PeerConf{
- Id: id,
- Timeout: time.Second * time.Duration(timeout),
- NoiseEnable: *noisy,
- CPR: *cpr,
- DSAPub: pub,
- DSAPriv: priv,
+ Id: id,
+ Timeout: time.Second * time.Duration(timeout),
+ Noise: *noisy,
+ CPR: *cpr,
+ DSAPub: pub,
+ DSAPriv: priv,
}
- govpn.PeersInitDummy(id, conf)
+ idsCache = govpn.NewCipherCache([]govpn.PeerId{*id})
log.Println(govpn.VersionGet())
tap, err = govpn.TAPListen(*ifaceName)
timeouted := make(chan struct{})
rehandshaking := make(chan struct{})
termination := make(chan struct{})
+ if *proxyAddr != "" {
+ *proto = "tcp"
+ }
switch *proto {
case "udp":
go startUDP(timeouted, rehandshaking, termination)
}
select {
case <-termSignal:
- log.Fatalln("Finishing...")
+ log.Fatalln("Finishing")
termination <- struct{}{}
break MainCycle
case <-timeouted: