We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a51228 commit 78f0a09Copy full SHA for 78f0a09
main.go
@@ -19,9 +19,14 @@ import (
19
"golang.org/x/crypto/acme/autocert"
20
)
21
22
-var configFile = flag.String("config", "", "Proxy configuration filename")
+var (
23
+ configFile = flag.String("config", "", "Proxy configuration filename")
24
+ v = flag.Bool("v", false, "Prints current version and exits")
25
+)
26
27
var (
28
+ version = "1.1.0"
29
+
30
proxy = newReverseProxy()
31
32
allowedNetworksHTTP atomic.Value
@@ -31,7 +36,12 @@ var (
36
37
func main() {
33
38
flag.Parse()
39
+ if *v {
40
+ fmt.Printf("Version %s\n", version)
41
+ os.Exit(0)
42
+ }
34
43
44
+ log.Infof("Chproxy version: %s", version)
35
45
log.Infof("Loading config: %s", *configFile)
46
cfg, err := reloadConfig()
47
if err != nil {
0 commit comments