zerodytrash / TikTok-Live-Connector

Node.js library to receive live stream events (comments, gifts, etc.) in realtime from TikTok LIVE.
https://discord.gg/2c6kX6g3Pa
MIT License
1.33k stars 277 forks source link

Axios proxy bug #18

Closed Davincible closed 2 years ago

Davincible commented 2 years ago

Turns out axios is a dump when it comes to proxies, and the default env proxy configurations cause axios to crash; https://github.com/axios/axios/issues/3384

Not sure if there's a fix available, but would be nice to be able to use proxies here

zerodytrash commented 2 years ago

An option to pass a custom httpsAgent would be good. This also allows to use different proxies for each connection. I'll put this on the ToDo list.

zerodytrash commented 2 years ago

It gets a bit more complicated. Axios does not support a custom httpsAgent because it already uses cookie jar's agent. Will try to find a solution.

zerodytrash commented 2 years ago

I removed axios-cookiejar-support and built my own cookie manager. Now custom agents should work. Here is an example:

https://github.com/zerodytrash/TikTok-Livestream-Chat-Connector#connect-via-proxy