Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOCKS proxy support #191

Open
pooyangoodarzi opened this issue Dec 23, 2021 · 3 comments
Open

SOCKS proxy support #191

pooyangoodarzi opened this issue Dec 23, 2021 · 3 comments
Assignees

Comments

@pooyangoodarzi
Copy link

Access to the Bandcamp website is banned in my country(Yes, I live in such a hell). Therefore the Bandcamp-dl cannot do anything and just waits until the whole process is timed out. The same thing happens to the youtube-dl, but youtube-dl supports SOCKS proxies, and I can give it the proxies that I have as an option to the command.
It will be beneficial if Bandcamp-dl adds the support for proxies too.

@Evolution0
Copy link
Collaborator

Looks straightforward enough, just a matter of giving the option to pass the proxies on run, something like:
--proxies="httpurl, httpsurl" and if provided use them in the GET requests.

This does pull in optional dependencies that 95% of users likely won't need so I have to figure out if I want to add it as a hard requirement by pulling requests[socks] in or add the option when installing bandcamp-dl itself. (IE pip install bandcamp-downloader[socks])

It will be in the next release, of that you can be sure.

@Evolution0 Evolution0 pinned this issue Dec 25, 2021
@snylonue
Copy link

snylonue commented Aug 4, 2022

requests, the network library bandcamp-dl uses, supports SOCKS with required dependencies installed by python -m pip install requests[socks].
Proxy will be used when HTTP_PROXY, HTTPS_PROXY or ALL_PROXY is set, e.g. ALL_PROXY=socks5://127.0.0.1:1080 bandcamp-dl https://mikazukibigwave.bandcamp.com/album/romantic-album

@Evolution0
Copy link
Collaborator

requests, the network library bandcamp-dl uses, supports SOCKS with required dependencies installed by python -m pip install requests[socks]. Proxy will be used when HTTP_PROXY, HTTPS_PROXY or ALL_PROXY is set, e.g. ALL_PROXY=socks5://127.0.0.1:1080 bandcamp-dl https://mikazukibigwave.bandcamp.com/album/romantic-album

Yep, I was aware it was supported but not that just setting a few environment variables was all that was needed for setup.

May be better if sooner rather than later bandcamp-dl gets config file support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants