From ed5fab6952de19ab79ebbfb3171b57f6d075eba4 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 24 Apr 2022 11:56:07 +0200 Subject: [PATCH] Update proxy example --- docs/source/topics/proxy.rst | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/source/topics/proxy.rst b/docs/source/topics/proxy.rst index 74e054bc..28674349 100644 --- a/docs/source/topics/proxy.rst +++ b/docs/source/topics/proxy.rst @@ -19,17 +19,16 @@ you can omit ``username`` and ``password``. .. code-block:: python - from pyrogram import Client + from pyrogram import Client - app = Client( - "my_account", - proxy=dict( - scheme="socks5", # "socks4", "socks5" and "http" are supported - hostname="11.22.33.44", - port=1234, - username="", - password="" - ) - ) + 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()