Currently its using "github.com/aeden/traceroute" to implement the actual tracerouting logic, but I intend to to change this in the near future (more on this in #112).
In case you're testing this locally
The check is extremely slow, since it creates a lot of network requests. I tried to improve by concurrently running the check for every target, but the internals of the library do everything synchronously so there isn't much we can actually improve there outside of #112. While developing I used the below config, with retries set to 0, and it took a minute or so per run of the check.
Since this check requires extra permissions to open the required sockets, debugging is a bit complicated. I have added a script in scripts/debug-elevated.sh which compiles sparrow as an unoptimized binary and launches it with a headless debugger and elevated permissions. You can then use the Connect to server target in the .vscode/launch.json to connect to the debugger and debug as usual. This is only necessary, when you actually need to debug the traceroute check, you can debug the others as usual.
Motivation
This pr implements a basic traceroute check.
Relates to #111, #112
Currently its using "github.com/aeden/traceroute" to implement the actual tracerouting logic, but I intend to to change this in the near future (more on this in #112).
In case you're testing this locally
The check is extremely slow, since it creates a lot of network requests. I tried to improve by concurrently running the check for every target, but the internals of the library do everything synchronously so there isn't much we can actually improve there outside of #112. While developing I used the below config, with retries set to 0, and it took a minute or so per run of the check.
Config
Debugging
Since this check requires extra permissions to open the required sockets, debugging is a bit complicated. I have added a script in
scripts/debug-elevated.sh
which compiles sparrow as an unoptimized binary and launches it with a headless debugger and elevated permissions. You can then use theConnect to server
target in the.vscode/launch.json
to connect to the debugger and debug as usual. This is only necessary, when you actually need to debug the traceroute check, you can debug the others as usual.Changes
For additional information look at the commits.
Tests done
TODO