req
req copied to clipboard
Simple Go HTTP client with Black Magic
Using `ImpersonateChrome` instead works fine. The error seems to be generated in processPushPromise: https://github.com/imroc/req/blob/5323efe519c828b9b97dc52f13386e007e5972b5/internal/http2/transport.go#L3058 ```golang package main import ( "fmt" "log" "github.com/imroc/req/v3" ) func main(){ client := req.C().ImpersonateFirefox() // connection...
Hi, How to set custom TLS Version, SNI, ALPN, CipherSuite, or use ESNI (ECH) ? Can we set decoy SNI / ESNI / Host Header ? What proxy types are...
I think all that would be needed is that the `persistConn` gets "removed". E.g. `decConnsPerHost` would have to be called I think, maybe more? I think the [http.Hijacker](https://pkg.go.dev/net/http#Hijacker) interface could...
I read this comment: https://github.com/imroc/req/blob/5323efe519c828b9b97dc52f13386e007e5972b5/internal/http2/client_conn_pool.go#L20-L22 But `cc.RoundTrip(new(http.Request))` leads to a panic: ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x58e3d4] goroutine...
在http1.1中我用 ``` r.SetHeaderNonCanonical("user-agent", clientInfo.Client.UserAgent) ``` 这个方法设置了ua,在发出请求时,会再次添加User-Agent http2不存在此问题
首先感谢这个项目,它为我省下了很多时间! 1、我发现当发送http2请求时,如果我设置以下cookie ``` request.SetHeaderNonCanonical("cookie", "a=xxx; b=xxx") ``` 实际发出的请求却是分开的,如 ``` cookie: a=xxx cookie: b=xxx ``` 虽然这是符合http2规范的,但是有时候我仍然需要发出这样的请求 ``` cookie: a=xxx; b=xxx ``` 因为该Header已完整的参与了签名计算,如果发送时拆分将影响服务器校验签名; 所以我希望能够增加一个设置项来使req库不会对设置的cookie进行任何操作 2、我希望能为request.SetHeaderNonCanonical功能添加一个整个client有效的配置来默认执行此操作,这样会方便许多
设置burp代理后,每次请求时,明明有响应,且body不为空,但仍会多次发包。 可能是因为代理的关系,明明获取到body了,但err不为空remote error: tls: user canceled 所以触发了err != nil,会继续尝试多次发包。这里可以判断body不为空,或者err不为remote error,否则才继续尝试 
关于重试设置代理
能第一次执行的时候也加上代理吗,这段代码好像只能触发重试才能触发代理 ``` var crawlerClient = NewAutoChangeProxyClient() func NewAutoChangeProxyClient() *req.Client { client := req.C() client.SetTimeout(5 * time.Second). EnableDumpEachRequest(). SetCommonRetryCount(len(proxies)). SetCommonRetryCondition(func(resp *req.Response, err error) bool { return err != nil || resp.StatusCode...
I am writing an app that need to use different clients for different goroutines (so for example, requests to same sites with different accounts will be possible because different clients...