Browse Source

feat: show xproxy version

v1.x.x
dnomd343 2 years ago
parent
commit
761c3f3739
  1. 6
      cmd/xproxy.go

6
cmd/xproxy.go

@ -6,6 +6,7 @@ import (
"XProxy/cmd/custom"
"XProxy/cmd/process"
"flag"
"fmt"
log "github.com/sirupsen/logrus"
"io"
"os"
@ -48,9 +49,14 @@ func xproxyInit() {
if os.Getenv("CONFIG") != "" {
xproxyConfig = os.Getenv("CONFIG")
}
isVersion := flag.Bool("version", false, "Show version")
isDebug := flag.Bool("debug", os.Getenv("DEBUG") == "true", "Enable debug mode")
configName := flag.String("config", xproxyConfig, "Config file name")
flag.Parse()
if *isVersion {
fmt.Printf("XProxy version %s (%s)\n", version, goVersion) // show version info and exit
os.Exit(0)
}
exposeDir = "/xproxy" // default folder
if os.Getenv("EXPOSE_DIR") != "" {

Loading…
Cancel
Save