From cbdaa9138c901aaad2008f2f17092315f11a800a Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 18 Feb 2014 11:57:44 +0100 Subject: [PATCH] Change lg-proxy to lgproxy to easly import it in wsgi part2 --- README.mkd | 12 ++++++------ lg.py | 4 ++-- lgproxy.cfg | 8 ++++---- lgproxy.py | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.mkd b/README.mkd index a4b4213..b79e46c 100644 --- a/README.mkd +++ b/README.mkd @@ -6,14 +6,14 @@ This is a looking glass for the Internet Routing Daemon "Bird". Software is split in two parts: - - lg-proxy.py: + - lgproxy.py: It must be installed and started on all bird nodes. It act as a proxy to make traceroute and bird query on the node. - Access restriction to this web service can be done in file "lg-proxy.cfg" (only IP address based restriction for now). + Access restriction to this web service can be done in file "lgproxy.cfg" (only IP address based restriction for now). - lg.py: - This is the frontend, a web based UI that request informations to all lg-proxy.py nodes. + This is the frontend, a web based UI that request informations to all lgproxy.py nodes. The domain and the list of all bird nodes can be done. @@ -21,15 +21,15 @@ Software is split in two parts: *************** - +--> * lg-proxy.py * + +--> * lgproxy.py * | *************** | ******** ******************* | *************** -* USER * ----> * webserver/lg.py *--+--> * lg-proxy.py * +* USER * ----> * webserver/lg.py *--+--> * lgproxy.py * ******** ******************* | *************** | | *************** - +--> * lg-proxy.py * + +--> * lgproxy.py * *************** ``` diff --git a/lg.py b/lg.py index a0fcc35..42ba080 100644 --- a/lg.py +++ b/lg.py @@ -105,9 +105,9 @@ def bird_command(host, proto, query): def bird_proxy(host, proto, service, query): - """Retreive data of a service from a running lg-proxy on a remote node + """Retreive data of a service from a running lgproxy on a remote node - First and second arguments are the node and the port of the running lg-proxy + First and second arguments are the node and the port of the running lgproxy Third argument is the service, can be "traceroute" or "bird" Last argument, the query to pass to the service diff --git a/lgproxy.cfg b/lgproxy.cfg index ad33644..6268964 100644 --- a/lgproxy.cfg +++ b/lgproxy.cfg @@ -1,7 +1,7 @@ DEBUG=False -LOG_FILE="/var/log/lg-proxy.log" +LOG_FILE="/var/log/lg-proxy/lg-proxy.log" LOG_LEVEL="WARNING" -ACCESS_LIST = ["91.224.149.206", "178.33.111.110"] -IPV4_SOURCE="91.224.148.1" -IPV6_SOURCE="2a01:6600:8000::1" +ACCESS_LIST = ["91.224.149.206", "178.33.111.110", "2a01:6600:8081:ce00::1"] +IPV4_SOURCE="" +IPV6_SOURCE="" diff --git a/lgproxy.py b/lgproxy.py index f972672..74f71ac 100644 --- a/lgproxy.py +++ b/lgproxy.py @@ -32,7 +32,7 @@ from flask import Flask, request, abort app = Flask(__name__) app.debug = app.config["DEBUG"] -app.config.from_pyfile('lg-proxy.cfg') +app.config.from_pyfile('lgproxy.cfg') file_handler = TimedRotatingFileHandler(filename=app.config["LOG_FILE"], when="midnight") app.logger.setLevel(getattr(logging, app.config["LOG_LEVEL"].upper())) @@ -96,6 +96,6 @@ def bird(): if __name__ == "__main__": - app.logger.info("lg-proxy start") + app.logger.info("lgproxy start") app.run("0.0.0.0")