Documentation ¶
Index ¶
- Constants
- Variables
- func AddCustomMapping(expr, code, body, contentType string, headers map[string]string) (err error)
- func AddFileMapping(expr, target string, fbt Fbt) (err error)
- func AddFolderMapping(expr, folder string, fbt Fbt)
- func BuildFullUrl(protocol, host, path string) string
- func DelCustomMapping(expr string)
- func DelFileMapping(expr string)
- func DelFolderMapping(expr string)
- func HandleHttp(acs *common.ACStream) (err error)
- func HandleHttps(acs *common.ACStream) (err error)
- func InitCertCache(cache string) (err error)
- func InitHandler(conf *common.Config)
- func TrimHttpPrefix(url string) string
- type Fbt
- type FileInfo
- type Rdt
- type RedirectItem
- type RequestInfo
- type ResponseInfo
- type SessionInfo
Constants ¶
View Source
const ( HttpPrefixLen = len("http://") HttpPort = 80 HttpsPort = 443 )
View Source
const ( RedirectFile = Rdt(iota) RedirectFolder RedirectCustom FallbackToSource = Fbt(iota) FallbackTo404 )
View Source
const RootCertificateName = "root"
View Source
const StoreDir = "easypki"
Variables ¶
View Source
var (
HopByHops = []string{"Proxy-Connection", "Connection", "Proxy-Authenticate", "Keep-Alive"}
)
View Source
var (
HttpsPrefixLen = len("http://")
)
View Source
var (
SslVersionMap = map[byte]string{
0: "SSL 3.0",
1: "TlS 1.0",
2: "TlS 1.1",
3: "TlS 1.2",
}
)
Functions ¶
func AddCustomMapping ¶
func AddFileMapping ¶
func AddFolderMapping ¶
func BuildFullUrl ¶
func DelCustomMapping ¶
func DelCustomMapping(expr string)
func DelFileMapping ¶
func DelFileMapping(expr string)
func DelFolderMapping ¶
func DelFolderMapping(expr string)
func HandleHttp ¶
func HandleHttps ¶
func InitCertCache ¶
func InitHandler ¶
func TrimHttpPrefix ¶
Types ¶
type RedirectItem ¶
type RedirectItem struct { Type Rdt Url string Target string Headers map[string]string Body string ContentType string Fallback Fbt }
func GetMappedPath ¶
func GetMappedPath(path string) *RedirectItem
type RequestInfo ¶
type ResponseInfo ¶
type SessionInfo ¶
type SessionInfo struct { Sid string BeginTime time.Time EndTime time.Time RemoteAddr string RemotePort int RequestInfo *RequestInfo ResponseInfo *ResponseInfo Done bool // contains filtered or unexported fields }
func NewSessionInfo ¶
func NewSessionInfo(conf *common.Config) *SessionInfo
func (*SessionInfo) SessionDone ¶
func (s *SessionInfo) SessionDone()
Click to show internal directories.
Click to hide internal directories.