timeout int
firstUpCall bool = true
knownPeers govpn.KnownPeers
- idsCache *govpn.CipherCache
+ idsCache *govpn.MACCache
)
func main() {
govpn.EGDInit(*egdPath)
}
+ if *proxyAddr != "" {
+ *proto = "tcp"
+ }
+ if !(*proto == "udp" || *proto == "tcp") {
+ log.Fatalln("Unknown protocol specified")
+ }
if *verifierRaw == "" {
log.Fatalln("No verifier specified")
}
Verifier: verifier,
DSAPriv: priv,
}
- idsCache = govpn.NewCipherCache()
+ idsCache = govpn.NewMACCache()
confs := map[govpn.PeerId]*govpn.PeerConf{*verifier.Id: conf}
idsCache.Update(&confs)
log.Println(govpn.VersionGet())
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)
} else {
go startTCP(timeouted, rehandshaking, termination)
}
- default:
- log.Fatalln("Unknown protocol specified")
}
select {
case <-termSignal: