2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-31 06:16:06 +00:00

Update docs

This commit is contained in:
Dan
2018-02-22 11:02:38 +01:00
parent 6a5810134b
commit 7439e1e8f2
6 changed files with 146 additions and 9 deletions

View File

@@ -25,5 +25,26 @@ with your own settings:
- ``1``, ``yes``, ``True`` or ``on``: Enables the proxy
- ``0``, ``no``, ``False`` or ``off``: Disables the proxy
- If your proxy doesn't require authorization you can omit username and password by either leaving the values blank
or completely delete the lines.
Alternatively, you can setup your proxy without the need of the *config.ini* file by using the *proxy* parameter
in the Client class:
.. code-block:: python
from pyrogram import Client
client = Client(
session_name="example",
proxy=dict(
hostname="11.22.33.44",
port=1080,
username="<your_username>",
password="<your_password>"
)
)
client.start()
...
.. note:: If your proxy doesn't require authorization you can omit *username* and *password* by either leaving the
values blank/empty or completely delete the lines.