An embedded yt-dlp client reads its proxy from the options passed to YoutubeDL:

import yt_dlp

options = {
    'proxy': 'socks5://proxy.example:1080',
}
with yt_dlp.YoutubeDL(options) as ydl:
    pass

A candidate from the SOCKS5 proxy list can supply the endpoint in the shown SOCKS5 URL. Replace pass with the application’s intended operations inside the client context. Those operations retain their real media URLs as destinations.

The proxy option supports HTTP, HTTPS and SOCKS endpoints. Its scheme describes the intermediary protocol. An HTTPS proxy also requires a compatible installed request handler, such as Requests or curl_cffi.

An explicit empty proxy string selects direct access. Leaving the option out retains yt-dlp’s normal environment-based proxy behavior.

Configure the YoutubeDL instance doing the work. A Requests session in the surrounding application has its own policy, and a delegated external downloader may need its own proxy input as well.

ХӀокхунах тера йаззамаш