read vk token and upstream socks pass from the environment for vk-bot (#148)
* read vk token and upstream socks pass from the environment for vk-bot * update env variable name and documentation --------- Co-authored-by: Sbenazar <voroninan95ton@gmail.com> Co-authored-by: kulikov0 <19497634+kulikov0@users.noreply.github.com>
This commit is contained in:
2 files changed
+9
No files matched your search
@@ -497,6 +497,13 @@ func main() {
|
||||
upstreamPass := flag.String("upstream-pass", "", "upstream SOCKS5 password forwarded to spawned creators")
|
||||
flag.Parse()
|
||||
|
||||
if *token == "" {
|
||||
*token = os.Getenv("VK_TOKEN")
|
||||
}
|
||||
if *upstreamPass == "" {
|
||||
*upstreamPass = os.Getenv("UPSTREAM_PASS")
|
||||
}
|
||||
|
||||
switch *resources {
|
||||
case "default", "moderate", "unlimited":
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user