Skip to content

Commit

Permalink
docs: Extract advanced usage, add proxy info
Browse files Browse the repository at this point in the history
  • Loading branch information
ihabunek committed Dec 30, 2018
1 parent 226713a commit 7195a05
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 19 deletions.
Binary file added docs/_static/auth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
==============
Advanced usage
==============

Disabling HTTPS
---------------

You may pass the ``--disable-https`` flag to use unencrypted HTTP instead of
HTTPS for a given instance. This is inherently insecure and should be used only
when connecting to local development instances.

.. code-block:: sh
toot login --disable-https --instance localhost:8080
Using proxies
-------------

You can configure proxies by setting the ``HTTPS_PROXY`` or ``HTTP_PROXY``
environment variables. This will cause all http(s) requests to be proxied
through the specified server.

For example:

.. code-block:: sh
export HTTPS_PROXY="http://1.2.3.4:5678"
toot login --instance mastodon.social
**NB:** This feature is provided by
`requests <http://docs.python-requests.org/en/master/user/advanced/#proxies>`_
and setting the environment variable will affect other programs using this
library.

This environment can be set for a single call to toot by prefixing the command
with the environment variable:

.. code-block:: sh
HTTPS_PROXY="http://1.2.3.4:5678" toot login --instance mastodon.social
21 changes: 11 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,26 @@ toot is a commandline tool for interacting with Mastodon social networks.
.. image:: https://img.shields.io/pypi/v/toot.svg?maxAge=3600&style=flat-square
:target: https://pypi.python.org/pypi/toot

Features
--------

* Posting, replying, deleting statuses
* Support for media uploads, spoiler text, sensitive content
* Search by account or hash tag
* Following, muting and blocking accounts
* Simple switching between multiple Mastodon accounts

Contents
--------

.. toctree::
:maxdepth: 1
:maxdepth: 2

install
usage
advanced
release

Features
--------

* Posting, replying, deleting statuses
* Support for media uploads, spoiler text, sensitive content
* Search by account or hash tag
* Following, muting and blocking accounts
* Simple swithcing between authenticated in Mastodon accounts

Curses UI
---------

Expand Down
9 changes: 0 additions & 9 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ You will be redirected to your Mastodon instance to log in and authorize toot to

The application and user access tokens will be saved in the configuration file located at ``~/.config/toot/instances/config.json``.

Disabling HTTPS
~~~~~~~~~~~~~~~

You may pass the ``--disable-https`` flag to use unencrypted HTTP instead of HTTPS for a given instance. This is inherently insecure and should be used only when connecting to local development instances.

.. code-block:: sh
toot login --disable-https --instance localhost:8080
Using multiple accounts
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 7195a05

Please sign in to comment.