2021-11-29 14:50:23 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
proxy.py
|
|
|
|
~~~~~~~~
|
|
|
|
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
|
|
|
|
Network monitoring, controls & Application development, testing, debugging.
|
|
|
|
|
|
|
|
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
|
|
|
:license: BSD, see LICENSE for more details.
|
|
|
|
"""
|
|
|
|
import tornado.web
|
2022-01-20 10:04:54 +00:00
|
|
|
import tornado.ioloop
|
2021-11-29 14:50:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
# pylint: disable=W0223
|
|
|
|
class MainHandler(tornado.web.RequestHandler): # type: ignore[misc]
|
|
|
|
def get(self) -> None:
|
|
|
|
self.write('HTTP route response')
|
|
|
|
|
|
|
|
|
|
|
|
def make_app() -> tornado.web.Application:
|
|
|
|
return tornado.web.Application([
|
|
|
|
(r'/http-route-example', MainHandler),
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
app = make_app()
|
|
|
|
app.listen(8888, address='127.0.0.1')
|
|
|
|
tornado.ioloop.IOLoop.current().start()
|