Skip to content

Commit

Permalink
no .exe while generating on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
fakeboboliu committed Aug 6, 2022
1 parent a4e7be2 commit 7a6b546
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion authpass.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"net/url"
"os"
"regexp"
"runtime"
"strings"
)

Expand Down Expand Up @@ -48,8 +49,14 @@ func init() {
flag.StringVar(&u, "u", "", "开启了访问验证的隧道地址, e.g. https://something:12345")
flag.StringVar(&p, "p", "", "访问验证密码")
flag.BoolVar(&nopersist, "nopersist", false, "不记住认证(将于auth_time后失效)")
flag.StringVar(&output, "o", "authpass_generated.exe", "生成专用客户端的存放路径")
help := flag.Bool("h", false, "显示此帮助信息")

if runtime.GOOS == "windows" {
flag.StringVar(&output, "o", "authpass_generated.exe", "生成专用客户端的存放路径")
} else {
flag.StringVar(&output, "o", "authpass_generated", "生成专用客户端的存放路径")
}

flag.Parse()

if *help {
Expand Down

0 comments on commit 7a6b546

Please sign in to comment.