aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web/src/tui/controllers/tor.py
blob: d07cb7110818bb6e7c9833acf9c0c9183f11951a (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
import web
import view, config
from view import render
from tui.utils import session

"""
The main Tor status page
"""
class status:
  def GET(self):
    return render.base(render.torstatus())

  def POST(self):
    return render.base(render.torstatus())

"""
Tor configuration page
"""
class config:
  def update_config(self, data):
    return True

  def GET(self):
    return render.base(render.torconfig())

  def POST(self):
    self.update_config(web.input())
    return render.base(render.torconfig())