Skip to content

Commit

Permalink
feat: 新增web端口环境变量修改
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinTan committed May 31, 2024
1 parent b3b80dc commit f74228b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ func main() {
port = "7505"
}

webPort, ok := os.LookupEnv("WEB_PORT")
if !ok {
webPort = "8833"
}

secretKey, ok := os.LookupEnv("SECRET_KEY")
if !ok {
secretKey = "openvpn-web"
Expand Down Expand Up @@ -594,5 +599,5 @@ func main() {
})
}

r.Run(":80")
r.Run(fmt.Sprintf(":%s", webPort))
}

0 comments on commit f74228b

Please sign in to comment.