Replace tpo git repository URL by gitlab
[stem.git] / docs / tutorials.rst
blobb5f606351b966c92ac151afe42a7e71d2d71ae04
1 Tutorial
2 ========
4 .. Image Sources:
5    
6    * The Little Relay That Could - train.png
7      Source: https://openclipart.org/detail/140185/tren-train-by-antroares
8      Author: Antroares
9      License: Public Domain
10      Alternate: https://openclipart.org/detail/1128/train-roadsign-by-ryanlerch
11    
12    * To Russia With Love - soviet.png
13      Source: https://openclipart.org/detail/146017/flag-of-the-soviet-union-by-marxist-leninist
14      Author: Unknown
15      License: Public Domain (not a subject of copyright according the Russian civil code)
16      Alternate: https://openclipart.org/detail/85555/communist-sabbatarian-ribbon-by-rones-85555
17    
18    * Tortoise and the Hare - tortoise.png
19      Source: https://openclipart.org/detail/27911/green-tortoise-%28cartoon%29-by-arking-27911
20      Author: arking
21      License: Public Domain
22    
23    * Over the River and Through the Wood - riding_hood.png
24      Source: https://openclipart.org/detail/163771/little-red-riding-hood-by-tzunghaor
25      Author: tzunghaor
26      License: Public Domain
27    
28    * Mirror Mirror On The Wall - mirror.png
29      Source: https://openclipart.org/detail/152155/mirror-frame-by-gsagri04
30      Author: Unknown (gsagri04?)
31      License: Public Domain
32      Alternate: https://openclipart.org/detail/174179/miroir-rectangulaire-by-defaz36-174179
33    
34    * East of the Sun & West of the Moon - windrose.png
35      Source: https://commons.wikimedia.org/wiki/File:Compass_card_%28sl%29.svg
36      Author: Andrejj
37      License: CC0 (https://creativecommons.org/publicdomain/zero/1.0/deed.en)
38    
39    * Mad Hatter - mad_hatter.png
40      Source: http://www.krepcio.com/vitreosity/archives/MadHatter-ALL-illus600.jpg
41      Author: John Tenniel
42      License: Public Doman
43      Augmented: Colored by me, and used the card from...
44        https://openclipart.org/detail/1892/mad-hatter-with-label-on-hat-by-nayrhcrel
45    
46    * Double Double Toil and Trouble - cauldron.png
47      Source: https://openclipart.org/detail/174099/cauldron-by-jarda-174099
48      Author: Unknown (jarda?)
49      License: Public Domain
51 Getting started with any new library can be daunting, so let's get our feet wet
52 by jumping straight in with some tutorials...
54 .. list-table::
55    :widths: 1 10
56    :header-rows: 0
58    * - .. image:: /_static/section/tutorials/train.png
59           :target: tutorials/the_little_relay_that_could.html
61      - .. image:: /_static/label/the_little_relay_that_could.png
62           :target: tutorials/the_little_relay_that_could.html
64        Basics for talking with Tor. This will step you through configuring Tor
65        and writing your first script to talk with it.
67    * - .. image:: /_static/section/tutorials/soviet.png
68           :target: tutorials/to_russia_with_love.html
70      - .. image:: /_static/label/to_russia_with_love.png
71           :target: tutorials/to_russia_with_love.html
73        Rather than talking to Tor, we'll now talk **through** it. In this
74        tutorial we'll programmatically start Tor then use it to read a site
75        through mother Russia!
77    * - .. image:: /_static/section/tutorials/tortoise.png
78           :target: tutorials/tortoise_and_the_hare.html
80      - .. image:: /_static/label/tortoise_and_the_hare.png
81           :target: tutorials/tortoise_and_the_hare.html
83        As Tor runs it generates a variety of **events** that controllers can
84        subscribe to be notified of. In this tutorial we'll do just that,
85        writing a curses application that graphs the bandwidth usage of Tor.
87    * - .. image:: /_static/section/tutorials/riding_hood.png
88           :target: tutorials/over_the_river.html
90      - .. image:: /_static/label/over_the_river.png
91           :target: tutorials/over_the_river.html
93        `Hidden services
94        <https://www.torproject.org/docs/hidden-services.html.en>`_ are a way
95        of providing a service that isn't easily trackable. As a dissident, for
96        instance, this could let you safely publish a blog without getting your
97        door kicked down. Here we'll walk you through an example.
99    * - .. image:: /_static/section/tutorials/mirror.png
100           :target: tutorials/mirror_mirror_on_the_wall.html
102      - .. image:: /_static/label/mirror_mirror_on_the_wall.png
103           :target: tutorials/mirror_mirror_on_the_wall.html
105        Getting and acting upon information about relays in the Tor network.
106        Relay information is provided through documents called **descriptors**.
107        This walks you through both where to get them and a small script to tell
108        you the fastest Tor exits.
110    * - .. image:: /_static/section/tutorials/windrose.png
111           :target: tutorials/east_of_the_sun.html
113      - .. image:: /_static/label/east_of_the_sun.png
114           :target: tutorials/east_of_the_sun.html
116        Stem provides several utility modules frequently useful for Tor
117        controller applications. Here we introduce some of them.
119    * - .. image:: /_static/section/tutorials/mad_hatter.png
120           :target: tutorials/down_the_rabbit_hole.html
122      - .. image:: /_static/label/down_the_rabbit_hole.png
123           :target: tutorials/down_the_rabbit_hole.html
125        Interactive interpreter for Tor that provides you with direct access to
126        Tor's `control interface
127        <https://gitweb.torproject.org/torspec.git/tree/control-spec.txt>`_
128        via either python or direct requests. This is an easy way of
129        experimenting with Stem and learning what Tor can do.
131    * - .. image:: /_static/section/tutorials/cauldron.png
132           :target: tutorials/double_double_toil_and_trouble.html
134      - .. image:: /_static/label/double_double_toil_and_trouble.png
135           :target: tutorials/double_double_toil_and_trouble.html
137        Sometimes it's easiest to learn a library by seeing how it's used in the
138        wild. This is a directory of scripts and applications that use Stem.