From 241a4f7def2b8c6436e243886cb0625040ea6163 Mon Sep 17 00:00:00 2001 From: OleksandrBlack Date: Sun, 10 Dec 2023 13:56:33 +0200 Subject: [PATCH] add --source Parameter (#568) * add --source Parameter * standalone --- src/job/base.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/job/base.go b/src/job/base.go index b91f2798..1a0fcbbd 100644 --- a/src/job/base.go +++ b/src/job/base.go @@ -47,6 +47,7 @@ import ( type GlobalConfig struct { ClientID string UserID string + Source string proxyURLs string proxylist string @@ -69,6 +70,8 @@ func NewGlobalConfigWithFlags() *GlobalConfig { flag.StringVar(&res.UserID, "user-id", utils.GetEnvStringDefault("USER_ID", ""), "user id for optional metrics") + flag.StringVar(&res.Source, "source", utils.GetEnvStringDefault("SOURCE", "standalone"), + "run source info") flag.StringVar(&res.proxyURLs, "proxy", utils.GetEnvStringDefault("SYSTEM_PROXY", ""), "system proxy to set by default (can be a comma-separated list or a template)") flag.StringVar(&res.proxylist, "proxylist", "", "file or url to read a list of proxies from")