Add Transparent Proxy and PROXY v2 support and help page
This commit is contained in:
@@ -27,7 +27,7 @@ def _clients():
|
||||
def graph_get():
|
||||
conn = db.get()
|
||||
nodes = [dict(r) for r in conn.execute(
|
||||
"SELECT id, type, client_id, host, port, proto, label, iface, x, y FROM nodes ORDER BY id")]
|
||||
"SELECT id, type, client_id, host, port, proto, label, iface, origin, x, y FROM nodes ORDER BY id")]
|
||||
links = [{"from": r["from_node"], "to": r["to_node"]} for r in conn.execute(
|
||||
"SELECT from_node, to_node FROM links")]
|
||||
return jsonify(nodes=nodes, links=links, clients=_clients(), interfaces=_interfaces())
|
||||
@@ -58,7 +58,7 @@ def graph_put():
|
||||
keep = {n["id"] for n in nodes if n["id"] > 0}
|
||||
for nid in existing - keep:
|
||||
conn.execute("DELETE FROM nodes WHERE id = ?", (nid,))
|
||||
cols = ("type", "client_id", "host", "port", "proto", "label", "iface", "x", "y")
|
||||
cols = ("type", "client_id", "host", "port", "proto", "label", "iface", "origin", "x", "y")
|
||||
for n in nodes:
|
||||
vals = [n[c] for c in cols]
|
||||
if n["id"] > 0 and n["id"] in existing:
|
||||
|
||||
Reference in New Issue
Block a user