From 03916a47927aff86f5525fa52d8d99e88acaeefe Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 27 Feb 2018 18:18:25 +0100 Subject: [PATCH] Update Proxy page --- docs/source/resources/SOCKS5Proxy.rst | 56 +++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/source/resources/SOCKS5Proxy.rst b/docs/source/resources/SOCKS5Proxy.rst index 0004ecad..a9b51a39 100644 --- a/docs/source/resources/SOCKS5Proxy.rst +++ b/docs/source/resources/SOCKS5Proxy.rst @@ -7,44 +7,44 @@ through an intermediate SOCKS5 proxy server. Usage ----- -To use Pyrogram with a proxy, simply append the following to your ``config.ini`` file and replace the values -with your own settings: +- To use Pyrogram with a proxy, simply append the following to your ``config.ini`` file and replace the values + with your own settings: -.. code-block:: ini + .. code-block:: ini - [proxy] - enabled = True - hostname = 11.22.33.44 - port = 1080 - username = - password = + [proxy] + enabled = True + hostname = 11.22.33.44 + port = 1080 + username = + password = -- To enable or disable the proxy without deleting your settings from the config file, - change the ``enabled`` value as follows: + - To enable or disable the proxy without deleting your settings from the config file, + change the ``enabled`` value as follows: - - ``1``, ``yes``, ``True`` or ``on``: Enables the proxy - - ``0``, ``no``, ``False`` or ``off``: Disables the proxy + - ``1``, ``yes``, ``True`` or ``on``: Enables the proxy + - ``0``, ``no``, ``False`` or ``off``: Disables the proxy -Alternatively, you can setup your proxy without the need of the *config.ini* file by using the *proxy* parameter -in the Client class: +- 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 + .. code-block:: python - from pyrogram import Client + from pyrogram import Client - client = Client( - session_name="example", - proxy=dict( - hostname="11.22.33.44", - port=1080, - username="", - password="" - ) - ) + client = Client( + session_name="example", + proxy=dict( + hostname="11.22.33.44", + port=1080, + username="", + password="" + ) + ) - client.start() + 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. \ No newline at end of file