aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web/runui.py
blob: 80836b3bf57a4e1e5d718b005ae9162118fefa88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# tui - Tor web UI
# by Arturo Filasto' <hellais@torproject.org>
#

import web
import config
import tui.controllers

from tui.utils import session
from view import render


# This is the main structure of URLs
urls = (
    '/', 'tui.controllers.main.index',
#    '/config/(tor|router)', 'tui.controllers.main.config',
    '/network', 'tui.controllers.network.main',
    '/network/firewall', 'tui.controllers.network.firewall',
    '/network/wireless', 'tui.controllers.network.wireless',
    '/network/wired', 'tui.controllers.network.wired',
    '/network/status', 'tui.controllers.network.status',
    '/tor', 'tui.controllers.tor.status',
    '/tor/config', 'tui.controllers.tor.torrc',
    '/logout', 'tui.controllers.main.logout'
    )
#    '/wizard/([0-9a-f]{1,2})?', 'tui.controllers.wizard.step',
#    '/status', 'tui.controllers.status')

if __name__ == "__main__":
  app = web.application(urls, globals())
  # Add session management to the app
  session.add_session_to_app(app)
  app.internalerror = web.debugerror
  app.run()