node-chatgpt-api icon indicating copy to clipboard operation
node-chatgpt-api copied to clipboard

Undici do not support proxy by socks5

Open thunderning opened this issue 1 year ago • 3 comments

I have tried to config proxy to socks5://xxxxxx,and got "InvalidArgumentError: invalid protocol" error . I think undici dont support socks proxy, is there any way to solve this problem?

thunderning avatar Mar 19 '23 09:03 thunderning

It seems like you can modify the client to work with socks5 using this: https://github.com/Kaciras/fetch-socks

waylaidwanderer avatar Mar 21 '23 22:03 waylaidwanderer

you are awesome!thats really useful!and I use SocksProxyAgent instead of HttpsProxyAgent so that I can use socks5 in bing mode now! maybe u can add them to this repository later, thank u!

thunderning avatar Mar 22 '23 17:03 thunderning

Yup, I'll look into it, thanks for reporting!

waylaidwanderer avatar Mar 23 '23 00:03 waylaidwanderer