Add Transparent Proxy and PROXY v2 support and help page
This commit is contained in:
@@ -34,10 +34,11 @@ def connect(path):
|
||||
def init(path):
|
||||
conn = connect(path)
|
||||
conn.executescript(schema_sql())
|
||||
# Databases from before tunnel nodes lack nodes.iface (same migration as db.c).
|
||||
# Older databases lack nodes.iface / nodes.origin (same migrations as db.c).
|
||||
cols = {r["name"] for r in conn.execute("PRAGMA table_info(nodes)")}
|
||||
if "iface" not in cols:
|
||||
conn.execute("ALTER TABLE nodes ADD COLUMN iface TEXT NOT NULL DEFAULT ''")
|
||||
for col in ("iface", "origin"):
|
||||
if col not in cols:
|
||||
conn.execute(f"ALTER TABLE nodes ADD COLUMN {col} TEXT NOT NULL DEFAULT ''")
|
||||
conn.close()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user