Skip to content

Commit

Permalink
Merge pull request #249 from KDima23/env-var-passwd
Browse files Browse the repository at this point in the history
feat: get password from env variable
  • Loading branch information
riobard authored Sep 13, 2023
2 parents 828576d + 750e89a commit 43c8294
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ func main() {
addr := flags.Client
cipher := flags.Cipher
password := flags.Password
if flags.Password == "" {
password = os.Getenv("SS_PASSWORD")
}
var err error

if strings.HasPrefix(addr, "ss://") {
Expand Down Expand Up @@ -149,6 +152,9 @@ func main() {
addr := flags.Server
cipher := flags.Cipher
password := flags.Password
if flags.Password == "" {
password = os.Getenv("SS_PASSWORD")
}
var err error

if strings.HasPrefix(addr, "ss://") {
Expand Down

0 comments on commit 43c8294

Please sign in to comment.