diff --git a/lg.cfg b/lg.cfg index 7e9bc23..038074d 100644 --- a/lg.cfg +++ b/lg.cfg @@ -9,8 +9,8 @@ BIND_IP = "0.0.0.0" BIND_PORT = 5000 PROXY = { - "gw": 5000, - "h3": 5000, + "gw": "gw.some.network:5000", + "h3": "h3.some.network:5000", } # Used for bgpmap diff --git a/lg.py b/lg.py index 6a9f4e7..9075fb2 100644 --- a/lg.py +++ b/lg.py @@ -138,14 +138,14 @@ def bird_proxy(host, proto, service, query): elif proto == "ipv4": path = service - port = app.config["PROXY"].get(host, "") + proxyHost = app.config["PROXY"].get(host, "") - if not port: + if not proxyHost: return False, 'Host "%s" invalid' % host elif not path: return False, 'Proto "%s" invalid' % proto else: - url = "http://%s.%s:%d/%s?q=%s" % (host, app.config["DOMAIN"], port, path, quote(query)) + url = "http://%s/%s?q=%s" % (proxyHost, path, quote(query)) try: f = urlopen(url) resultat = f.read()