]> Cypherpunks.ru repositories - govpn.git/commitdiff
We must fail if invalid transport configuration is set
authorSergey Matveev <stargrave@stargrave.org>
Thu, 8 Dec 2016 19:58:10 +0000 (22:58 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 8 Dec 2016 19:58:11 +0000 (22:58 +0300)
We must not do anything unexpected by user. It he specified UDP mode and
HTTP proxy -- it is his fault, but that does not mean that we could
assume switching to TCP mode instead. No unexpectedly generated traffic
must come out.

src/cypherpunks.ru/govpn/cmd/govpn-client/main.go

index d16245ac2de3b153abe22be7a8fa46be8c30cfe6..225dbc82cc574365d00865396146dc954f88a8f9 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 == "" {