Open teidesu opened 6 days ago
one thing i worry about is the youtube handler which mentions reading
dispatcher
fromstreamInfo
, but i couldn't find a place where it is being passed there 🧐
it's passed in from match.js
if freebind is enabled (FREEBIND_CIDR
has a value and syscall-napi
compiled successfully).
it's only passed to some services that need it (youtube, twitter and instagram), because, as you mentioned, passing it manually everywhere is very tedious
also it would be worth to mention that ProxyAgent only supports http(s)? proxies, so to fully support everything including using a socks proxy you would need to use something like fetch-socks
only supports http(s)? proxies
yeah, and i mentioned it in the docs too. i personally don't think supporting socks is really worth it:
if one day undici ends up supporting socks (nodejs/undici#2224) we would get socks support for free :D
regarding the freebind dispatcher - i suppose we should error if freebind is enabled and proxy is passed, because there really isn't much point in using both of them at the same time
added support for
API_EXTERNAL_PROXY
env variable that sets up a global undici dispatcherdefinitely not the best way to do this (i really dislike relying on globals), but did it like this anyway because:
fetch()
where i could provide adispatcher
one thing i worry about is the youtube handler which mentions reading
dispatcher
fromstreamInfo
, but i couldn't find a place where it is being passed there 🧐