-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/traceroute #113
Feat/traceroute #113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some remarks:
- please document at least the exposed functions
- Please use a consistent name for the receiver of the
Traceroute
functions (d
andc
are used,tr
maybe be a good candidate)
Signed-off-by: Niklas Treml <[email protected]>
Signed-off-by: Niklas Treml <[email protected]>
Signed-off-by: Niklas Treml <[email protected]>
Signed-off-by: Niklas Treml <[email protected]>
Signed-off-by: Niklas Treml <[email protected]>
@niklastreml Please also document the check in a new section of the README. |
Signed-off-by: Niklas Treml <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only some minor things, I think after that it'll LGTM.
Signed-off-by: Niklas Treml <[email protected]>
Signed-off-by: Niklas Treml <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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