Documentation ¶
Index ¶
- Variables
- func CloseHost(urlStr string)
- func FetchJson(url string, v any, useFlareSolverr bool) error
- func FetchUrl(url string, header http.Header, useFlareSolverr bool) (*azuretls.Response, error)
- func HttpRequest(req *azuretls.Request, useFlareSolverr bool) (res *azuretls.Response, err error)
- func Init()
- func IsLocalUrl(urlObj *url.URL) bool
- func PostAndFetchJson(url string, reqBody any, resBody any, useFlareSolverr bool) (err error)
- func SaveUrl(fileUrl string, filename string, addext bool, useFlareSolverr bool) (createdfile string, ext string, err error)
- type FlaresolverrApiRequest
- type FlaresolverrApiResponse
- type FlaresolverrApiResponseCookie
- type FlaresolverrData
- type FlaresolverrReq
Constants ¶
This section is empty.
Variables ¶
View Source
var CF_ACCESS_DENIED_TITLES = []string{
"Access denied",
"Attention Required! | Cloudflare",
}
"Access denied", "Attention Required! | Cloudflare"
View Source
var CF_CHALLENGE_TITLES = []string{
"Just a moment...",
"DDoS-Guard",
}
"Just a moment...", "DDoS-Guard"
Functions ¶
func HttpRequest ¶
func IsLocalUrl ¶
func PostAndFetchJson ¶
func SaveUrl ¶
func SaveUrl(fileUrl string, filename string, addext bool, useFlareSolverr bool) ( createdfile string, ext string, err error)
If addext is true, the ext of fileUrl will be appended to filename. The ext of fileUrl is guessed from response content-type and / or fileUrl path. Return created filename and ext of fileUrl.
Types ¶
type FlaresolverrApiRequest ¶
type FlaresolverrApiResponse ¶
type FlaresolverrApiResponse struct { Status string `json:"status,omitempty"` // "ok" Message string `json:"message,omitempty"` // "Challenge solved!" Solution *FlaresolverrData `json:"solution,omitempty"` }
type FlaresolverrData ¶
type FlaresolverrData struct { Url string `json:"url,omitempty"` Headers map[string]string `json:"headers,omitempty"` Status int `json:"status,omitempty"` UserAgent string `json:"userAgent,omitempty"` Response string `json:"response,omitempty"` Cookies []*FlaresolverrApiResponseCookie `json:"cookies,omitempty"` }
"solution" field in flaresolverr API response
type FlaresolverrReq ¶
type FlaresolverrReq struct { Client *azuretls.Session Req *azuretls.Request Flaresolverr string }
Click to show internal directories.
Click to hide internal directories.