
See "Security/Privacy Issues" below before installing.

Overview:

    traxd (the server) is best run on a firewall/router box that sits
    between your LAN and the internet or other WAN.  Provide it the LAN
    network device as its main parameter, and it will tally up activity
    by host in a way that the trax client (which can be run anywhere
    that can reach the traxd server) can display.

    You *can* run traxd on your local machine and connect to it locally
    with trax and get a reasonably good result as well (of what your
    local machine is doing on the net), but for now you should run
    the trax client with the -l (local) flag in that case.  (Eventually
    that flag should be moved to traxd where it belongs.)

    Originally traxd used pcapy, but currently it's configured to use
    libpcap directly (via python's ctypes) because pcapy had a memory
    leak, and the newer pcapy without the leak crashes...  But you can
    still use pcapy if you prefer, by setting use_ctypes to False.

Prerequisites:

    Besides the libraries mentioned below, running "arp -a" on
    the server machine should show all your local machines with their
    MACs and IP addys.  If it doesn't, I'm not sure how well trax will
    work.

Install:

    - Unpack wherever.
    - Install python3-trio  (for where trax  will be run; traxd doesn't need this)
    - Install libpcap-dev   (for where traxd will be run; trax  doesn't need this.)

    Alternately, you can set "use_ctypes=False" at the head of traxd, and do
        this instead of libpcap-dev:

    - Install python3-pcapy (for where traxd will be run; trax doesn't need this.)

Server:

    Manually:

        Run traxd as root on your router/firewall, with your LANs interface and IP, e.g.:

        # traxd en1 -i 192.168.1.1 -v     # Verbose is optional.  '-i <IP>' limits clients to that ip.

    With systemctl (for long-term install):

        To enable auto-start on boot:

            - edit all "YOUR" values in traxd.service to something suitable, then:
            # cp trax.service /etc/systemd/system
            # systemctl daemon-reload
            # systemctl enable trax

        To start immediately, after the above:

            # systemctl start trax

Client:

    One-off:

        > trax <servername>

    Long-term:

        - Use your shell rc to set environ var TRAXD to your servername, then:
        > trax

    Keys:

        (Hit "?" in trax to get a full list -- these are just some)

        q           - quit
        hjkl/arrows - navigate up and down, open and close items
        r           - reset the totals to 0
        ?           - show help

Security/Privacy Issues

    traxd runs as root and so has access to the hostnames everybody on
    the network is connecting to.  It makes these available to any client
    that connects to it, including those run by ordinary users.  So just
    beware you are making everybody's browsing habits visible to everyone
    who can connect to traxd.  You can limit that somewhat by specifying
    only a certain IP to accept connections on, via the "-i" flag (mainly
    useful to make sure traxd only answers on your LAN, not the WAN!),
    but in theory you could close it down more with firewall rules or,
    worst case, modifying the code.

    traxd shuts down input from the clients first thing, so it's pretty
    unlikely it could be hacked by a remote client.

