Documentation
¶
Overview ¶
Package config loads runtime settings from the environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
PanelAddr string
NodeUUID string
Token string
Insecure bool
// ServerName overrides the TLS SNI when the panel sits behind a proxy.
ServerName string
XrayBinary string
XrayWorkDir string
// XrayAPIAddr is the local address of the xray stats API injected into the
// generated configuration.
XrayAPIAddr string
LogLevel string
}
Agent holds the node agent settings.
type Panel ¶
type Panel struct {
// HTTPAddr serves the REST API and the embedded web UI.
HTTPAddr string
// GRPCAddr accepts agent control streams.
GRPCAddr string
DatabaseURL string
JWTSecret string
TokenTTL time.Duration
// PublicURL is the externally reachable panel origin, used to build
// subscription links and node installation commands.
PublicURL string
// SubscriptionPublicURL overrides PublicURL for subscription links when the
// subscription page is served from a separate domain.
SubscriptionPublicURL string
// GRPCPublicHost/Port is what a node agent dials back on. Behind the
// bundled Caddy this is the panel's domain on 443, and GRPCPublicTLS makes
// the generated install command tell the agent to dial over TLS.
GRPCPublicHost string
GRPCPublicPort int
GRPCPublicTLS bool
BootstrapAdmin string
BootstrapPassword string
HeartbeatInterval time.Duration
UsageInterval time.Duration
UsageRetention time.Duration
SubscriptionProfileTitle string
SubscriptionSupportURL string
// AgentDistDir holds prebuilt node agent binaries the panel serves at
// /dist, so a node can install itself without a Go toolchain or a registry.
AgentDistDir string
CORSOrigins []string
LogLevel string
TLSCert string
TLSKey string
}
Panel holds every setting the panel process needs.
Click to show internal directories.
Click to hide internal directories.