Adding alias-clients to Pi-hole FTL

Combined Clients? Combi-Clients? Joined Clients? Composite Clients?

Composite sound nice.

How is the status on this awesome feature? I keep merging the current status of development into this branch and compiling locally as I really like this feature.

Is it just the naming that is blocking this? I'm personally very happy with super-clients. comppsoite-clients just seems way too long. Maybe what @DanSchaper suggested, but written as b-clients. However, we'll have to explain the users what this means.

Mostly, yes. Still looking for a good name.

What about client-interfaces or multiNIC-clients?

client-aliases

alias-clients sounds good to me.

An alias (/ˈeɪliəs/) is a fictitious name that a person or group assumes for a particular purpose, which differs from their original or true name (orthonym).

I guess that's the way to go then. I'll do the renaming and merge latest development while I'm at it.

Done. If you were already testing this branch before, you'll need to rename a few things your database. Fortunately, this can be done with two simple commands:

sudo sqlite3 /etc/pihole/pihole-FTL.db "ALTER TABLE superclient RENAME TO aliasclient;"
sudo sqlite3 /etc/pihole/pihole-FTL.db "ALTER TABLE network RENAME COLUMN superclient_id TO aliasclient_id;"

The second command may fail if your installed version of sqlite3 is too old (at least 3.25.0 is required). You should consider upgrading it and use the new syntax.

If you cannot upgrade your SQLite3 CLI, the following sequence of commands will do the same, just in a lot lengthier variant (click to see the instruction).
sudo sqlite3 /etc/pihole/pihole-FTL.db

and therein

BEGIN TRANSACTION;

CREATE TABLE "network_new" ( id INTEGER PRIMARY KEY NOT NULL, hwaddr TEXT UNIQUE NOT NULL, interface TEXT NOT NULL, firstSeen INTEGER NOT NULL, lastQuery INTEGER NOT NULL, numQueries INTEGER NOT NULL, macVendor TEXT, aliasclient_id INTEGER);

INSERT INTO "network_new"(id, hwaddr, interface, firstSeen, lastQuery, numQueries, macVendor, aliasclient_id) SELECT id, hwaddr, interface, firstSeen, lastQuery, numQueries, macVendor, superclient_id FROM "network";

DROP TABLE "network";

ALTER TABLE "network_new" RENAME TO "network";

COMMIT;

You can leave the SQLite3 CLI Prompt by pressing Ctrl + D.

This creates a new table with the new column names, and copies the data from the old table. Thereafter, the old table is deleted and the new table (with the updated column name) is renamed to become the new old network table.

1 Like

Alias-clients have been merged into development and will be contained in the next release of Pi-hole. Thanks all for your feedback and testing!

2 Likes