Adding a ZennoPoster worker

Steps

  1. On the machine with ZennoPoster, run the zpServer.zp template.
  2. A registration line — a single line of JSON — appears in the run log:
{"machine":"WORKER-01","host":"192.168.0.10","external":"203.0.113.5","port":22222,"firewall":"off","portRule":"no"}
  1. Copy it whole.
  2. Open ZP7, press NODES and paste the line into the add-node field.

The node appears in the list. From there z3nDash polls its state on its own.

Running it on every ZennoPoster start

zpServer.zp should run after every ZennoPoster start: the machine address and the firewall state can change, and the registration records them.

How you arrange that is up to you — ZennoPoster's own autostart, or a schedule in Tasker. Running it again over an already registered node breaks nothing: the record is updated, not duplicated.

What the line must contain

Parsing is done by ZpNodeStore.TryParse.

Required:

  • machine — the machine name, non-empty;
  • port — between 1 and 65535;
  • host or external — either one is enough.

Optional: external, firewall, portRule.

A boolean urlacl field is accepted instead of portRule: true reads as yes, false as no.

A trailing single quote is stripped before parsing, so the line can be copied from the log as it is, without cleaning it by hand.

What z3nDash does next

The node is stored in the zp_nodes table of the current schema. host and port go into the requests:

GET  http://HOST:PORT/state
POST http://HOST:PORT/command
GET  http://HOST:PORT/log
GET  http://HOST:PORT/traffic

The node serves logs and traffic from files on its own machine; z3nDash does not store them but forwards the request through GET /zp/log and GET /zp/traffic. See Logs and Traffic.

Checking it

  1. Open ZP7.
  2. Make sure the node appears in the list.
  3. Check that the state loads.
  4. Send a start or stop command.
  5. Open allLogs and traffic — the node should answer in both windows.

The z3n7 build on the node

The traffic window asks for the tail of the file with the tail parameter. If a node returns the first N records instead of the last ones, it is running a z3n7.dll build without tail support: there will be data, but the wrong data. Update the build on that node.