pyrofork/docs/source/topics/proxy.rst
wulan17 261214ec1c
PyroFork: Bring back docs
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2023-08-18 01:42:01 +07:00

34 lines
804 B
ReStructuredText

Proxy Settings
==============
Pyrofork supports proxies with and without authentication. This feature allows Pyrofork to exchange data with Telegram
through an intermediate SOCKS 4/5 or HTTP (CONNECT) proxy server.
.. contents:: Contents
:backlinks: none
:depth: 1
:local:
-----
Usage
-----
To use Pyrofork with a proxy, use the *proxy* parameter in the Client class. If your proxy doesn't require authorization
you can omit ``username`` and ``password``.
.. code-block:: python
from pyrogram import Client
proxy = {
"scheme": "socks5", # "socks4", "socks5" and "http" are supported
"hostname": "11.22.33.44",
"port": 1234,
"username": "username",
"password": "password"
}
app = Client("my_account", proxy=proxy)
app.run()