Skip to content

Commit

Permalink
feat: get password from env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Kuchynskyi committed Aug 2, 2023
1 parent 828576d commit 4da9195
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("SECRET")
}
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("SECRET")
}
var err error

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

0 comments on commit 4da9195

Please sign in to comment.