mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
21 lines
419 B
Go
21 lines
419 B
Go
package env
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/yusing/go-proxy/internal/common"
|
|
)
|
|
|
|
func DefaultAgentName() string {
|
|
name, err := os.Hostname()
|
|
if err != nil {
|
|
return "agent"
|
|
}
|
|
return name
|
|
}
|
|
|
|
var (
|
|
AgentName = common.GetEnvString("AGENT_NAME", DefaultAgentName())
|
|
AgentPort = common.GetEnvInt("AGENT_PORT", 8890)
|
|
AgentSkipVersionCheck = common.GetEnvBool("AGENT_SKIP_VERSION_CHECK", false)
|
|
)
|