proxyconfig

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2024 Paulo Almeida <almeidapaulopt@gmail.com> SPDX-License-Identifier: MIT

SPDX-FileCopyrightText: 2025 Paulo Almeida <almeidapaulopt@gmail.com> SPDX-License-Identifier: MIT

Index

Constants

View Source
const (
	// Default values to proxyconfig
	//
	DefaultProxyAccessLog = true
	DefaultProxyProvider  = ""
	DefaultTLSValidate    = true

	// tailscale defaults
	DefaultTailscaleEphemeral    = true
	DefaultTailscaleRunWebClient = false
	DefaultTailscaleVerbose      = false
	DefaultTailscaleFunnel       = false
	DefaultTailscaleControlURL   = ""

	// Dashboard defauts
	DefaultDashboardVisible = true
	DefaultDashboardIcon    = "tsdproxy"
)

Variables

This section is empty.

Functions

func ProxyStateString added in v1.4.0

func ProxyStateString(s ProxyState) string

Types

type Config

type Config struct {
	Tailscale Tailscale `validate:"dive"`
	Dashboard Dashboard `validate:"dive"`
	// Global
	TargetProvider string
	TargetID       string
	ProxyProvider  string
	TargetURL      *url.URL
	ProxyURL       *url.URL
	Hostname       string
	ProxyAccessLog bool `default:"true" validate:"boolean"`
	TLSValidate    bool `default:"true" validate:"boolean"`
}

Config struct stores all the configuration for the proxy

func NewConfig added in v1.2.0

func NewConfig() (*Config, error)

type Dashboard added in v1.2.0

type Dashboard struct {
	Label   string `validate:"string" yaml:"label"`
	Icon    string `default:"tsdproxy" validate:"string" yaml:"icon"`
	Visible bool   `default:"true" validate:"boolean" yaml:"visible"`
}

type ProxyState added in v1.4.0

type ProxyState int32
const (
	ProxyStateInitializing ProxyState = iota
	ProxyStateStarting
	ProxyStateAuthenticating
	ProxyStateRunning
	ProxyStateStopping
	ProxyStateStopped
	ProxyStateError
)

type Tailscale

type Tailscale struct {
	AuthKey      string
	Ephemeral    bool `default:"true" validate:"boolean"`
	RunWebClient bool `default:"false" validate:"boolean"`
	Verbose      bool `default:"false" validate:"boolean"`
	Funnel       bool `default:"false" validate:"boolean"`
}

Tailscale struct stores the configuration for tailscale ProxyProvider

Jump to

Keyboard shortcuts

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