go-resty / resty

Simple HTTP and REST client library for Go
MIT License
9.68k stars 681 forks source link

Can it support socket5 proxy? #786

Closed erosiners closed 2 months ago

erosiners commented 3 months ago

Can it support socket5 proxy? I found that it can only support http proxy.

jeevatkm commented 2 months ago

@erosiners It seems Go has the socks5 dialer here https://pkg.go.dev/golang.org/x/net/proxy. I will schedule this with v3.

jeevatkm commented 2 months ago

@erosiners, I just validated the Go documentation; it seems the socks5 proxy is already supported out-of-the-box.

client := resty.New().SetProxy("socks5://127.0.0.1:1080/")

I will update the godoc.