waylaidwanderer / node-chatgpt-api

A client implementation for ChatGPT and Bing AI. Available as a Node.js module, REST API server, and CLI app.
https://www.npmjs.com/package/@waylaidwanderer/chatgpt-api
MIT License
4.2k stars 737 forks source link

Undici do not support proxy by socks5 #212

Open thunderning opened 1 year ago

thunderning commented 1 year ago

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?

waylaidwanderer commented 1 year ago

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

thunderning commented 1 year ago

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!

waylaidwanderer commented 1 year ago

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