]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/cmd/govpn-client/main.go
No need to explicitly print the fact that we have exited
[govpn.git] / src / cypherpunks.ru / govpn / cmd / govpn-client / main.go
index d16245ac2de3b153abe22be7a8fa46be8c30cfe6..4c2cd3d3717fa063d3438d3f2e5c74392092dd9b 100644 (file)
@@ -84,8 +84,7 @@ func main() {
        }
 
        if *proxyAddr != "" && protocol == client.ProtocolUDP {
-               log.Println("Proxy is supported for TCP only, switch")
-               protocol = client.ProtocolTCP
+               log.Fatalln("HTTP proxy is supported only in TCP mode")
        }
 
        if *verifierRaw == "" {
@@ -104,10 +103,7 @@ func main() {
                if protocol != client.ProtocolTCP {
                        log.Fatalln("Currently encryptionless mode works only with TCP")
                }
-               if !*noisy {
-                       log.Println("-encless is on, force -noisy mode")
-                       *noisy = true
-               }
+               *noisy = true
        }
        conf := client.Configuration{
                PrivateKey: priv,
@@ -148,9 +144,7 @@ func main() {
        signal.Notify(termSignal, os.Interrupt, os.Kill)
        c := client.NewClient(conf, verifier, termSignal)
        go c.MainCycle()
-       if err := <-c.Error; err != nil {
+       if err = <-c.Error; err != nil {
                log.Fatalln(err)
-       } else {
-               log.Println("Closed VPN tunnel")
        }
 }