safing-portmaster/spn/testing/simple
2025-01-13 10:09:11 +01:00
..
clientsim.sh Add spn testing setup 2024-12-20 13:31:52 +01:00
config-template.json Add spn testing setup 2024-12-20 13:31:52 +01:00
docker-compose.yml Add spn testing setup 2024-12-20 13:31:52 +01:00
entrypoint.sh Add spn testing setup 2024-12-20 13:31:52 +01:00
inject-intel.sh Add spn testing setup 2024-12-20 13:31:52 +01:00
intel-client.yaml Add spn testing setup 2024-12-20 13:31:52 +01:00
intel-testnet.json Add spn testing setup 2024-12-20 13:31:52 +01:00
join.sh Add spn testing setup 2024-12-20 13:31:52 +01:00
README.md Use code quotes for cmds in docs 2024-12-20 13:37:01 +01:00
reset-databases.sh Fix SPN build 2025-01-13 10:09:11 +01:00
run.sh Add spn testing setup 2024-12-20 13:31:52 +01:00
stop.sh Add spn testing setup 2024-12-20 13:31:52 +01:00

Setup Guide

  1. Build SPN Hub
cd ../../../cmds/hub/
./build
  1. Reset any previous state (for a fresh test)
./reset-databases.sh
  1. Change compose file and config template as required

Files:

  • docker-compose.yml
  • config-template.json
  1. Start test network
./run.sh
  1. Option 1: Join as Hub

For testing just one Hub with a different build or config, you can simply use ./join.sh to join the network with the most recently build hub binary.

  1. Option 2: Join as Portmaster

For connecting to the SPN test network with Portmaster, execute portmaster like this:

sudo ../../../cmds/portmaster-core/portmaster-core --disable-shutdown-event --devmode --log debug --data /opt/safing/portmaster --spn-map test --bootstrap-file ./testdata/shared/bootstrap.dsd

Note: This uses the same portmaster data and config as your installed version. As the SPN Test net operates under a different ID ("test" instead of "main"), this will not pollute the SPN state of your installed Portmaster.

  1. Stop the test net

This is important, as just stopping the ./run.sh script will leave you with interfaces with public IPs!

./stop.sh