Documentation
¶
Index ¶
Constants ¶
View Source
const ( DirectiveGeo = "doors_geo" DirectiveHandler = "doors_handler" DirectiveUpstreams = "doors_upstreams" )
Variables ¶
View Source
var ErrorBase64 = errors.New("base64 decode error")
View Source
var ErrorCipher = errors.New("cipher decrypt error")
View Source
var ErrorParse = errors.New("ip parse error")
Functions ¶
func ErrorsJoin ¶
func GetUpstreams ¶
func GetUpstreams(r *http.Request) []*reverseproxy.Upstream
func SetUpstreams ¶
func SetUpstreams(r *http.Request, u []*reverseproxy.Upstream)
Types ¶
type TokenCipher ¶
type TokenCipher interface {
Encode(addr netip.Addr) (token string)
Decode(token string) (netip.Addr, error)
}
func NewTokenCipher ¶
func NewTokenCipher(secret string) (TokenCipher, error)
Click to show internal directories.
Click to hide internal directories.