Skip to content

Add SOCKS proxy support#602

Open
vasiliadi wants to merge 2 commits into
jdepoix:masterfrom
vasiliadi:chore/pysocks
Open

Add SOCKS proxy support#602
vasiliadi wants to merge 2 commits into
jdepoix:masterfrom
vasiliadi:chore/pysocks

Conversation

@vasiliadi

Copy link
Copy Markdown
Contributor

Summary

Adds SOCKS proxy support for generic proxy configuration and the CLI.

Changes

  • Enables the requests[socks] extra so PySocks is installed transitively.
  • Adds socks_url to GenericProxyConfig and uses it as the fallback proxy for HTTP and HTTPS requests.
  • Adds a --socks-proxy CLI argument that passes SOCKS proxy URLs into GenericProxyConfig.
  • Covers SOCKS-only and mixed proxy fallback behavior in proxy and CLI tests.

@coveralls

coveralls commented May 30, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 26670183465

Coverage remained the same at 100.0%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 507
Covered Lines: 507
Line Coverage: 100.0%
Coverage Strength: 7.0 hits per line

💛 - Coveralls

@vasiliadi

Copy link
Copy Markdown
Contributor Author

Or maybe it’s better to edit README.md

-Alternatively to using [Webshare](https://github.com/jdepoix/youtube-transcript-api#using-webshare), you can set up any generic HTTP/HTTPS/SOCKS proxy using the GenericProxyConfig class:
+Alternatively to using [Webshare](https://github.com/jdepoix/youtube-transcript-api#using-webshare), you can set up any generic HTTP/HTTPS proxy using the GenericProxyConfig class:

@vasiliadi

Copy link
Copy Markdown
Contributor Author

And my ruff format youtube_transcript_api doesn't find any issues: 15 files left unchanged.
I use ruff==0.15.15. So have no idea how to fix static-checks.

Poe => ruff format youtube_transcript_api --check
Would reformat: youtube_transcript_api/test/test_cli.py
1 file would be reformatted, 14 files already formatted
Error: Process completed with exit code 1.

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.

2 participants