var (
remoteAddr = flag.String("remote", "", "Remote server address")
proto = flag.String("proto", "udp", "Protocol to use: udp or tcp")
var (
remoteAddr = flag.String("remote", "", "Remote server address")
proto = flag.String("proto", "udp", "Protocol to use: udp or tcp")
verifierRaw = flag.String("verifier", "", "Verifier")
keyPath = flag.String("key", "", "Path to passphrase file")
upPath = flag.String("up", "", "Path to up-script")
verifierRaw = flag.String("verifier", "", "Verifier")
keyPath = flag.String("key", "", "Path to passphrase file")
upPath = flag.String("up", "", "Path to up-script")
stats = flag.String("stats", "", "Enable stats retrieving on host:port")
proxyAddr = flag.String("proxy", "", "Use HTTP proxy on host:port")
proxyAuth = flag.String("proxy-auth", "", "user:password Basic proxy auth")
stats = flag.String("stats", "", "Enable stats retrieving on host:port")
proxyAddr = flag.String("proxy", "", "Use HTTP proxy on host:port")
proxyAuth = flag.String("proxy-auth", "", "user:password Basic proxy auth")
timeoutP = flag.Int("timeout", 60, "Timeout seconds")
timeSync = flag.Int("timesync", 0, "Time synchronization requirement")
timeoutP = flag.Int("timeout", 60, "Timeout seconds")
timeSync = flag.Int("timesync", 0, "Time synchronization requirement")
noisy = flag.Bool("noise", false, "Enable noise appending")
encless = flag.Bool("encless", false, "Encryptionless mode")
cpr = flag.Int("cpr", 0, "Enable constant KiB/sec out traffic rate")
egdPath = flag.String("egd", "", "Optional path to EGD socket")
noisy = flag.Bool("noise", false, "Enable noise appending")
encless = flag.Bool("encless", false, "Encryptionless mode")
cpr = flag.Int("cpr", 0, "Enable constant KiB/sec out traffic rate")
egdPath = flag.String("egd", "", "Optional path to EGD socket")
+ syslog = flag.Bool("syslog", false, "Enable logging to syslog")
+ version = flag.Bool("version", false, "Print version information")
+ warranty = flag.Bool("warranty", false, "Print warranty information")
confs := map[govpn.PeerId]*govpn.PeerConf{*verifier.Id: conf}
idsCache.Update(&confs)
log.Println(govpn.VersionGet())
tap, err = govpn.TAPListen(*ifaceName, *mtu)
if err != nil {
confs := map[govpn.PeerId]*govpn.PeerConf{*verifier.Id: conf}
idsCache.Update(&confs)
log.Println(govpn.VersionGet())
tap, err = govpn.TAPListen(*ifaceName, *mtu)
if err != nil {
termSignal := make(chan os.Signal, 1)
signal.Notify(termSignal, os.Interrupt, os.Kill)
termSignal := make(chan os.Signal, 1)
signal.Notify(termSignal, os.Interrupt, os.Kill)
timeouted := make(chan struct{})
rehandshaking := make(chan struct{})
termination := make(chan struct{})
timeouted := make(chan struct{})
rehandshaking := make(chan struct{})
termination := make(chan struct{})