Documentation ¶
Index ¶
- Variables
- func DoRequest(req *http.Request, redirect bool) (*http.Response, int64, error)
- func GetRespBody(oResp *http.Response) ([]byte, error)
- func InitCache(size int)
- func InitHttpClient(ThreadsNum int, DownProxy string, Timeout time.Duration) error
- func ParseHttpRequest(oReq *http.Request) (*structs.Request, error)
- func ParseHttpResponse(oResp *http.Response, milliseconds int64) (*structs.Response, error)
- func ParseTCPUDPRequest(content []byte) (*structs.Request, error)
- func ParseTCPUDPResponse(content []byte, socket *net.Conn, transport string) (*structs.Response, error)
- func ParseUrl(u *url.URL) *structs.UrlType
- func PutAddrType(addrType *structs.AddrType)
- func PutConnectInfo(connInfo *structs.ConnInfoType)
- func PutRequest(request *structs.Request)
- func PutResponse(response *structs.Response)
- func PutUrlType(urlType *structs.UrlType)
- func XrayGetHttpRequestCache(ruleReq *structs.RuleRequest) (*http.Request, *structs.Request, *structs.Response, bool)
- func XrayGetTcpUdpConnectionCache(connectionId string) (*net.Conn, bool)
- func XrayGetTcpUdpResponseCache(content string) ([]byte, *structs.Response, bool)
- func XraySetHttpRequestCache(ruleReq *structs.RuleRequest, request *http.Request, ...) bool
- func XraySetTcpUdpConnectionCache(connectionId string, conn *net.Conn) bool
- func XraySetTcpUdpResponseCache(content string, response []byte, protoResponse *structs.Response) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Client *http.Client ClientNoRedirect *http.Client DialTimout = 5 * time.Second KeepAlive = 15 * time.Second )
View Source
var (
GC gcache.Cache
)
Functions ¶
func InitHttpClient ¶
func ParseHttpResponse ¶
func ParseTCPUDPResponse ¶
func PutAddrType ¶
func PutConnectInfo ¶
func PutConnectInfo(connInfo *structs.ConnInfoType)
func PutRequest ¶
func PutResponse ¶
func PutUrlType ¶
func XrayGetHttpRequestCache ¶
func XraySetHttpRequestCache ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.