How to Make Resty Use a SOCKS5 Proxy for Better Connectivity?

18 Replies, 2124 Views

Hey! I’ve been using resty with socks5 proxy for a while now, and it’s been pretty solid. You’ll need to tweak the client config to include the proxy details.

If your proxy requires authentication, you can add the username and password in the proxy URL like this: `socks5://user:pass@proxy:port`.

Here’s a quick example:
```lua
local http = require("resty.http")
local client = http.new()
clientConfusedet_proxy("socks5://user:pass@proxy:port")
```
If you’re still stuck, let me know, and I can share more details!

Messages In This Thread



Users browsing this thread: 1 Guest(s)