proxy

package
v0.16.0-unstable48 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STRIKE = 0
	TEMP   = 1
	PERM   = 2
)

Variables

This section is empty.

Functions

func AddConstellationToken

func AddConstellationToken(route utils.ProxyRouteConfig) func(next http.Handler) http.Handler

func BotDetectionMiddleware

func BotDetectionMiddleware(next http.Handler) http.Handler

botDetectionMiddleware checks if the User-Agent is a known bot

func BuildFromConfig

func BuildFromConfig(router *mux.Router, config utils.ProxyConfig) *mux.Router

func CleanUp added in v0.15.0

func CleanUp()

func GetActiveProxies added in v0.15.0

func GetActiveProxies() map[string]chan bool

func GetClientID

func GetClientID(r *http.Request, route utils.ProxyRouteConfig) string

func GetShield added in v0.15.0

func GetShield() int

func InitInternalTCPProxy added in v0.14.0

func InitInternalTCPProxy()

func NewProxy

func NewProxy(targetHost string, AcceptInsecureHTTPSTarget bool, DisableHeaderHardening bool, CORSOrigin string, route utils.ProxyRouteConfig) (*httputil.ReverseProxy, error)

NewProxy takes target host and creates a reverse proxy

func PublishAllMDNSFromConfig

func PublishAllMDNSFromConfig()

func RouteTo

func RouteTo(route utils.ProxyRouteConfig) http.Handler

func RouterGen

func RouterGen(route utils.ProxyRouteConfig, router *mux.Router, destination http.Handler) *mux.Route

func SmartShieldMiddleware

func SmartShieldMiddleware(shieldID string, route utils.ProxyRouteConfig) func(http.Handler) http.Handler

Types

type PortsPair added in v0.15.7

type PortsPair struct {
	From string
	To   string
}

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher() (*Publisher, error)

NewPublisher creates a new service for Publisher.

func (*Publisher) Close

func (p *Publisher) Close()

Close associated resources.

func (*Publisher) Fqdn

func (p *Publisher) Fqdn() string

Fqdn returns the fully qualified domain name from Avahi.

func (*Publisher) PublishCNAMES

func (p *Publisher) PublishCNAMES(cnames []string, ttl uint32) error

PublishCNAMES send via Avahi-daemon CNAME records with the provided TTL.

type SmartResponseWriterWrapper

type SmartResponseWriterWrapper struct {
	http.ResponseWriter
	ClientID     string
	Status       int
	Bytes        int64
	ThrottleNext int
	TimeStarted  time.Time
	TimeEnded    time.Time
	RequestCost  int
	Method       string
	// contains filtered or unexported fields
}

func (*SmartResponseWriterWrapper) Flush

func (w *SmartResponseWriterWrapper) Flush()

func (*SmartResponseWriterWrapper) Hijack

func (*SmartResponseWriterWrapper) IsOld

func (w *SmartResponseWriterWrapper) IsOld() bool

func (*SmartResponseWriterWrapper) IsOver

func (w *SmartResponseWriterWrapper) IsOver() bool

func (*SmartResponseWriterWrapper) Write

func (w *SmartResponseWriterWrapper) Write(p []byte) (int, error)

func (*SmartResponseWriterWrapper) WriteHeader

func (w *SmartResponseWriterWrapper) WriteHeader(status int)

Jump to

Keyboard shortcuts

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