Skip to content

Fix: Pass proxy to download requests#63

Open
McIgor wants to merge 1 commit intoFOSWLY:mainfrom
McIgor:main
Open

Fix: Pass proxy to download requests#63
McIgor wants to merge 1 commit intoFOSWLY:mainfrom
McIgor:main

Conversation

@McIgor
Copy link

@McIgor McIgor commented Feb 25, 2026

The --proxy flag was not being used for downloading translated audio from Yandex S3 (vtrans.s3-private.mds.yandex.net), causing ETIMEDOUT errors when direct access to Yandex is blocked.

This change passes the parsed proxyData through to axios download calls in both audio and subtitle download paths.

Fixes downloads behind corporate firewalls and in regions where Yandex services are blocked.

Changes:

  • src/download.js: Add proxyData parameter to downloadFile()
  • src/index.js: Pass proxyData to both downloadFile() calls

Testing:
Tested with HTTP proxy on blocked network:

  • Audio translation download: ✅ Works
  • Subtitle download: ✅ Works
  • Without proxy on open network: ✅ Still works (backward compatible)

Manual Testing:

Tested on Windows 11 with multiple proxy configurations:

Test 1: HTTP proxy with auth

vot-cli --proxy "http://user:pass@proxy:6114" --output=./test --reslang=ru
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
✅ Audio downloaded successfully through proxy

Test 2: Without proxy (backward compatibility)
vot-cli --output=./test --reslang=ru "https://www.youtube.com/watch?v=jNQXAC9IVRw"
✅ Works as before (when Yandex is reachable)

Test 3: Subtitle download with proxy
vot-cli --proxy "http://user:pass@proxy:6114" --subs --output=./test --reslang=ru
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
✅ Subtitles downloaded through proxy

Impact:
- No breaking changes - `proxyData` defaults to `false` when not provided

The --proxy flag was not being used for downloading translated audio
from Yandex S3 (vtrans.s3-private.mds.yandex.net), causing ETIMEDOUT
errors when direct access to Yandex is blocked.

This change passes the parsed proxyData through to axios download
calls in both audio and subtitle download paths.

Fixes downloads behind corporate firewalls and in regions where
Yandex services are blocked.

Changes:
- src/download.js: Add proxyData parameter to downloadFile()
- src/index.js: Pass proxyData to both downloadFile() calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant