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

Accept socks5h:// proxy protocol name #28093

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

whew
Copy link

@whew whew commented Feb 6, 2021

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Closes #22618. Makes youtube-dl recognize the socks5h protocol string like cURL does.

Before PR:

$ youtube-dl --proxy socks5h://127.0.0.1:9050 --simulate dQw4w9WgXcQ
[youtube] dQw4w9WgXcQ: Downloading webpage
ERROR: Unable to download webpage: <urlopen error Tunnel connection failed: 501 Tor is not an HTTP Proxy> (caused by URLError(OSError('Tunnel connection failed: 501 Tor is not an HTTP Proxy')))

After PR:

$ youtube-dl --proxy socks5h://127.0.0.1:9050 --simulate dQw4w9WgXcQ
[youtube] dQw4w9WgXcQ: Downloading webpage

pukkandan pushed a commit to pukkandan/yt-dlp-dev that referenced this pull request Jul 15, 2023
New networking interface consists of a `RequestDirector` that directs
each `Request` to appropriate `RequestHandler` and returns the
`Response` or raises `RequestError`. The handlers define adapters to
transform its internal Request/Response/Errors to our interfaces.

User-facing changes:
- Fix issues with per request proxies on redirects for urllib
- Support for `ALL_PROXY` environment variable for proxy setting
- Support for `socks5h` proxy
   - Closes yt-dlp#6325, ytdl-org/youtube-dl#22618, ytdl-org/youtube-dl#28093
- Raise error when using `https` proxy instead of silently converting it to `http`

Authored by: coletdjnz
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
New networking interface consists of a `RequestDirector` that directs
each `Request` to appropriate `RequestHandler` and returns the
`Response` or raises `RequestError`. The handlers define adapters to
transform its internal Request/Response/Errors to our interfaces.

User-facing changes:
- Fix issues with per request proxies on redirects for urllib
- Support for `ALL_PROXY` environment variable for proxy setting
- Support for `socks5h` proxy
   - Closes yt-dlp#6325, ytdl-org/youtube-dl#22618, ytdl-org/youtube-dl#28093
- Raise error when using `https` proxy instead of silently converting it to `http`

Authored by: coletdjnz
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.

Support for socks5h:// proxies
1 participant