Documentation
¶
Index ¶
- Constants
- func GenClientWithProxy(proxy string) (*http.Client, error)
- func GetAuth(user, passwd, proxy string) ([]*http.Cookie, error)
- func GetCSRFToken(proxy string) (string, []*http.Cookie, error)
- func GetInvoiceHTML(cookies []*http.Cookie, proxy string) (string, error)
- func GetInvoiceInfoHTML(invoice *parser.Invoice, cookies []*http.Cookie, proxy string) (string, error)
- func GetSSRInfoHTML(service *parser.Service, cookies []*http.Cookie, proxy string) (string, error)
- func GetServiceHTML(cookies []*http.Cookie, proxy string) (string, error)
- func SetRequestHeader(request *http.Request, cookies []*http.Cookie, referer, compress string)
Constants ¶
View Source
const ( // UA is Chrome's User-Agent UA = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36" // AcceptType is Chrome's Accept-Type AcceptType = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" )
Variables ¶
This section is empty.
Functions ¶
func GenClientWithProxy ¶
GenClientWithProxy 生成http.Client,并设置代理为proxy指定的代理服务器 proxy url支持http,https和socks5协议
func GetCSRFToken ¶
GetCSRFToken 返回本次回话所使用的CSRFToken
func GetInvoiceHTML ¶
GetInvoiceHTML 获取账单页面的HTML,包含未付款和已付款账单 未付款账单显示在最前列 现只支持获取第一页
func GetInvoiceInfoHTML ¶
func GetInvoiceInfoHTML(invoice *parser.Invoice, cookies []*http.Cookie, proxy string) (string, error)
GetInvoiceInfoHTML 获取账单详情页面内容
func GetSSRInfoHTML ¶
GetSSRInfoHTML 获取服务详细信息页面的HTML,包含使用情况和节点信息
func GetServiceHTML ¶
GetServiceHTML 获取所有已购买服务的状态信息,包括详细页面的地址
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.