proxy

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const BasicCaddyConfig string = `{ "listen": [ ":80", ":443" ], "routes": [], "tls_connection_policies": [] }`

Variables

This section is empty.

Functions

func AddProxyHost

func AddProxyHost(caddyID string, domain string) error

func AddStaticDomain

func AddStaticDomain(projectID string, domain string) error

func CreateStaticProject

func CreateStaticProject(projectID string, domain string) error

func DeleteCaddyDefaultServer

func DeleteCaddyDefaultServer()

func DeleteStaticProject

func DeleteStaticProject(projectID string) error

func GetMasterProxyHosts

func GetMasterProxyHosts(caddyID string) ([]string, error)

func GetProxyHosts

func GetProxyHosts(caddyID string) ([]string, []string, error)

func GetReverseProxyConfig

func GetReverseProxyConfig(caddyID string) (int, []byte, error)

func HasCaddyConfig

func HasCaddyConfig() (bool, error)

func HttpCaddyRequest

func HttpCaddyRequest(url string, method string, data *string) (int, []byte, error)

func Initialize

func Initialize()

func RemoveProxyHost

func RemoveProxyHost(caddyID string, domain string) error

func RemoveStaticDomain

func RemoveStaticDomain(projectID string, domain string) error

Types

type CaddyError

type CaddyError struct {
	Error error
	Body  []byte
}

func DeleteReverseProxy

func DeleteReverseProxy(containerName string) CaddyError

func SetReverseProxy

func SetReverseProxy(containerName string, opts ProxyOpts) CaddyError

type CaddyHandle

type CaddyHandle struct {
	Handler   string          `json:"handler"`
	Upstreams []CaddyUpstream `json:"upstreams"`
}

type CaddyMatch

type CaddyMatch struct {
	Host []string `json:"host"`
}

type CaddyRoute

type CaddyRoute struct {
	Match  []CaddyMatch  `json:"match"`
	Handle []CaddyHandle `json:"handle"`
}

type CaddyRule

type CaddyRule struct {
	Listen []string     `json:"listen"`
	Routes []CaddyRoute `json:"routes"`
}

type CaddyUpstream

type CaddyUpstream struct {
	Dial string `json:"dial"`
}

type ProxyOpts

type ProxyOpts struct {
	Hosts         []string `json:"hosts"`
	Upstream      string   `json:"upstream"`
	HttpUpstream  bool     `json:"http_upstream"`
	HttpsUpstream bool     `json:"https_upstream"`
}

Jump to

Keyboard shortcuts

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