localrelay

package
v0.149.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoostReadyFDEnv = "WT_ROOST_READY_FD"

	RoostDaemonReadyTimeout = 10 * time.Second
)
View Source
const (
	DefaultLocalHTTPSAddr = "127.0.0.1:8443"
)

Variables

This section is empty.

Functions

func AuthProvidersConfigured

func AuthProvidersConfigured() bool

func AwaitRoostReady

func AwaitRoostReady(reader io.ReadCloser, timeout time.Duration) (resultErr error)

func DefaultBaseURL

func DefaultBaseURL(localHTTPS *LocalHTTPSConfig) string

func DefaultHTTPSAddr

func DefaultHTTPSAddr() string

func EnsureJWTKeyInWingYaml

func EnsureJWTKeyInWingYaml(configDir string) (string, error)

ensureJWTKeyInWingYaml loads the JWT signing key from wing.yaml, or generates one and saves it. Used by local/roost mode where there's no external secrets manager.

func EnsureSelfHostedPro

func EnsureSelfHostedPro(store *relay.RelayStore, userID, plan string) error

func EnvOr

func EnvOr(key, fallback string) string

func InstallLocalTrust

func InstallLocalTrust(ctx context.Context, m *localtls.Material) (bool, error)

func JwtKeyFromEnvironment

func JwtKeyFromEnvironment() (string, error)

jwtKeyFromEnvironment prefers an explicit encoded P-256 key. Existing deployments that provide only WT_JWT_SECRET get a stable, domain-separated P-256 key without another secret.

func ListenerResult

func ListenerResult(result namedServerError) error

func LoadServeRuntime

func LoadServeRuntime(flyDataDir string) (*serveRuntime, error)

func LocalHTTPURL

func LocalHTTPURL(addr string) string

func NewRelayListeners

func NewRelayListeners(handler http.Handler, httpAddr string, localHTTPS *LocalHTTPSConfig) *relayListeners

func PrepareLocalHTTPAddress

func PrepareLocalHTTPAddress(addr string, explicit bool) (string, error)

func PrintLocalCertDisclosure

func PrintLocalCertDisclosure(m *localtls.Material)

func RelayPolicyFromEnv

func RelayPolicyFromEnv() (string, time.Time, error)

func ReplaceEnvironmentValue

func ReplaceEnvironmentValue(environment []string, key, value string) []string

func RoostAllowedEmailsFromEnv

func RoostAllowedEmailsFromEnv() ([]string, error)

func RunRoostForeground

func RunRoostForeground(version string, addrFlag string, devFlag bool, labelsFlag, pathsFlag, eggConfigFlag, orgFlag string, auditFlag, debugFlag bool, localHTTPS *LocalHTTPSConfig) error

func SaveLocalServeToken

func SaveLocalServeToken(configDir, token string) error

func ValidateAuthProviderEnvironment

func ValidateAuthProviderEnvironment() error

func ValidateLocalHTTPSMode

func ValidateLocalHTTPSMode(requested, localMode, edgeMode bool) error

Types

type LocalHTTPSConfig

type LocalHTTPSConfig struct {
	HTTPAddr  string
	HTTPSAddr string
	URL       string
	Material  *localtls.Material
}

func PrepareLocalHTTPS

func PrepareLocalHTTPS(ctx context.Context, configDir, httpAddr, httpsAddr string, httpAddrExplicit bool) (*LocalHTTPSConfig, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL