wangluozhe / requests

用于快速请求HTTP或HTTPS,并支持修改ja3、ja4指纹
GNU General Public License v3.0
430 stars 100 forks source link

设置代理和不设置代理情况下,通过api 查看ip 结果是相同的 #29

Closed gospider007 closed 1 year ago

gospider007 commented 1 year ago
package main

import (
    "log"

    "github.com/wangluozhe/requests"
    "github.com/wangluozhe/requests/url"
)

func getIp(session *requests.Session, proxy string) {
    req := url.NewRequest()
    req.Proxies = proxy
    r, err := session.Get("https://myip.top", req)
    if err != nil {
        log.Panic(err)
    }
    log.Print(r.Text)
}
func main() {
    session := requests.NewSession()
    getIp(session, "https://127.0.0.1:7005")
    getIp(session, "")
}
wangluozhe commented 1 year ago

谢谢你的反馈,这确实是一个bug,这个是因为我在内部给设置代理的时候是直接设置在tranport中的,所以导致他一直存在。

wangluozhe commented 1 year ago

已更新,将requests更新为1.1.15版本即可。