commit 7b2354eb63c673ed6db6c8886233edac31e6ed27
parent fc4cf991deec0f01dbc520075e32e201e504071d
Author: parazyd <parazyd@dyne.org>
Date: Wed, 10 Jul 2019 01:52:06 +0200
Explode with usage() if argv < 2.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/tlstun.go b/tlstun.go
@@ -119,6 +119,10 @@ func server() (net.Listener, error) {
func main() {
flag.Parse()
+ if len(os.Args < 2) {
+ flag.Usage()
+ }
+
if *client {
if _, err := os.Stat(*cacert); os.IsNotExist(err) {
log.Fatal("Cannot find CA certificate.")