Better HN
topnewbestaskshowjobs
Log inSign up

FujiApple

237 karma · joined Jun 7, 2019 (7y ago) · 47 submissions

Submissions

comment 7mo ago · link · parent

> If you ever see packet loss in a trace at one step but the steps after it aren't showing it, you can ignore that packet loss, it's likely a CPU limitation on a busy router.

Trippy now includes [0] forward loss (Floss) and backward loss (Bloss) _heuristics_ to help surface such behaviour.

The idea was inspired by our previous discussion [1] on the topic on HN some time ago!

These columns are experimental and so not shown by default but can be enabled [2].

[0] https://github.com/fujiapple852/trippy/blob/master/RELEASES....

[1] https://news.ycombinator.com/item?id=38591827

[2] https://trippy.rs/reference/column

comment 1y ago · link · parent

I’ve recently been building a similar tool [1] which defines a specification for CLIs, though the goals are slightly different to the tool you mention I think. I just added support for fish as it happens.

[1] https://github.com/fujiapple852/claptrap

comment 1y ago · link · parent

Something I’ve been working on recently is a command line tool [1] to bring clap declarative command line parsing to shell scripts. Unfinished WIP but largely functional.

[1] https://github.com/fujiapple852/claptrap

comment 1y ago · link · parent

Great concept. I was on mobile and agree the custom keyboard is far from ideal. As others have said I also found it to be overly US-centric. Keen to see how this develops, feels like a winning idea!

comment 1y ago · link · parent

You can, with several caveats, detect which hop(s) on the path perform NAT by using some trickery [1]:

> NAT devices are detected by observing a difference in the expected and actual checksum of the UDP packet that is returned as the part of the Original Datagram in the ICMP Time Exceeded message. If they differ then it indicates that a NAT device has modified the packet. This happens because the NAT device must recalculate the UDP checksum after modifying the packet (i.e. translating the source port) and so the checksum in the UDP packet that is nested in the ICMP error may not, depending on the device, match the original checksum.

[1] https://github.com/fujiapple852/trippy/releases/tag/0.11.0

comment 2y ago · link · parent

OP, you may find this [1] “trick” useful. It allows you to dynamically determine the correct byte order for the various IPv4 headers for the platform and thus avoid the need to statically decide on the byte ordering for each platform you intend to target.

You may also find this [2] table useful, it shows which platforms allow the combination of IPPROTO_ICMP + IP_HDRINCL so it may be used without elevated privileges.

In general, my experience of raw sockets is that they are not very “raw” at all, the OS can and does still perform a variety of modifications and additions to what you send and receive, in highly platform specific and often poorly documented ways. In particular, TCP and raw sockets should generally be avoided.

[1] https://github.com/fujiapple852/trippy/blob/master/crates/tr...

[2] https://github.com/fujiapple852/trippy/issues/101#issuecomme...

comment 2y ago · link · parent

It’s not guaranteed to be accurate, but tracing using the UDP/dublin strategy with a fixed dest port and varying src port per round can help to identify and visualize valid ECMP flows. I recently wrote some guidance [1] on using Trippy in this way.

[1] https://github.com/fujiapple852/trippy?tab=readme-ov-file#ud...

comment 2y ago · link · parent

I recently had to look at the implementation of the Sparkline [1] widget in Ratatui which uses a similar Unicode technique but scales nicely for sparklines with larger vertical size.

[1] https://github.com/ratatui/ratatui/blob/20c88aaa5b9eb011a522...

comment 2y ago · link · parent

Exploring adding the (novel?) concept of forward and backward packet loss heuristics to Trippy [1] as discussed here [2].

[1] https://github.com/fujiapple852/trippy/issues/860

[2] https://news.ycombinator.com/item?id=38591945

comment 2y ago · link · parent

I recently tried Zulip [1] again after a few years and the UX is much improved on web and mobile, worth a look (it is OSS and you can self host).

[1] https://zulip.com/

comment 2y ago · link · parent

This Tailscale blog [1] from 2020 has been posted on HN many times before I’m sure but is worth highlighting again as it does a great job outlining the technical complexities that CGNAT (and NAT in general) introduce.

I have my head in this space at the moment as I’m trying to implement NAT detection (as pioneered by Dublin traceroute [2]) into Trippy [3].

[1] https://tailscale.com/blog/how-nat-traversal-works

[2] https://dublin-traceroute.net/

[3] https://github.com/fujiapple852/trippy/issues/1104

comment 2y ago · link · parent

What is the state of the art for running NetBSD (and other *BSD) in CI such as GitHub actions?

Edit: to add a bit more detail, I maintain a cross platform tool [1] on GitHub and require a way to build and test it in CI for several platform not natively supported by GitHub.

Currently I use cargo-cross [2] to build it from a Linux OS but this doesn’t work for running the tests.

One option I’m aware of is running a qemu VM on Linux, which is the approach taken by postgres [3].

Another option is using an external CI provider such as Cirrus who claim to have native support [4] for various *BSD.

[1] https://github.com/fujiapple852/trippy

[2] https://github.com/cross-rs/cross

[3] https://github.com/anarazel/pg-vm-images

[4] https://cirrus-ci.org/guide/FreeBSD/

comment 2y ago · link · parent

Thanks! I’ll take a look

comment 2y ago · link · parent

For the RTT and loss% measurements Trippy just does the obvious thing (i.e. RTT = recv time - send time and loss% = lost / total_sent).

There is a plan [0] to add custom columns to Trippy and then to add various jitter measurements [1].

Thanks for pointing out the above RFCs, I'll take a look at those and see if they make sense to add to Trippy.

[0] https://github.com/fujiapple852/trippy/issues/757

[1] https://github.com/fujiapple852/trippy/issues/39

comment 2y ago · link · parent

Thanks for that, I'll give this some thought and write a proposal in this [0] placeholder issue.

[0] https://github.com/fujiapple852/trippy/issues/860

comment 2y ago · link · parent

I agree regarding documentation. There was a request [0] for something similar, though not specifically covering this important point.

Regarding sending a ping flood, Trippy allow you to reduce the minimum and maximum round time (and grace period) to send packets almost as fast as you like. For example, to send at 50ms intervals (with a 10ms grace period):

> trip example.com -i 50ms -T 50ms -g 10ms

[0] https://github.com/fujiapple852/trippy/issues/853

comment 2y ago · link · parent

Something I intend to add to Trippy, but have not got around to it yet; is to codify the "If a packet takes the path A -> B -> C and pings to B have 50% loss but pings to C have 0% loss, then the path is perfectly fine" idea and use that to produce more meaningful headline status information to the user. How would you codify this?

comment 2y ago · link · parent

Thank you, I'll look into those RFCs.

comment 2y ago · link · parent

That looks great, seems like they've raised the bar for GeoIp accuracy, kudos to them.

It looks like they provide mmdb files (for a fee) which should be compatible with Trippy. I'd love to be able to test it out, the sample [0] they provide is rather limited but I guess enough to test compatibility.

[0] https://github.com/ipinfo/sample-database/blob/main/IP%20Geo...

comment 2y ago · link · parent

Thank you for adding Trippy to your list.

> how did you accomplish all the package managers?

In most cases I didn't do anything! I've discovered that there are many kind souls out there who are willing to give up their free time to package and maintain 3rd party applications for a variety of systems they wish to support. It's tedious and, I suspect, usually thankless work. I am very grateful to all of those who have helped with this for Trippy.

comment 2y ago · link · parent

You are right that showing packet loss for intermediate hops is a frequent source of confusion.

Rather than leave it out, I added a status column which shows different statuses for intermediate hops (blue if the hop responds to less than 100% of probes and brown if it responds to 0%) vs the target hop (which show amber and red respectively).

Where this breaks down is when dealing with ECMP for UDP & TCP tracing, as a given hop (ttl) may represent the target for a given round of tracing but not for the next. The mistake, imho, is to associate _any_ data with a hop (ttl) rather than the hop in the context of a tracing flow.

That is why Trippy had a number of features aimed at helping with ECMP, such as Paris and Dublin tracing, and the ability to filter tracing by unique flow id. I've covered these quite a bit in the 0.8.0 [0] and 0.9.0 [1] release notes if you want to know more.

[0] https://github.com/fujiapple852/trippy/releases/tag/0.8.0

[1] https://github.com/fujiapple852/trippy/releases/tag/0.9.0

comment 2y ago · link · parent

The TUI is built with the awesome Ratatui [0] library (formerly tui-rs [1]). UX is certainly not my area of expertise and I would not have been able to create Trippy without this library.

[0] https://github.com/ratatui-org/ratatui

[1] https://github.com/fdehau/tui-rs

comment 2y ago · link · parent

Yes, in my experience GeoIp is _highly_ unreliable, alas Trippy can do no more than report the location from the provided mmdb file.

I'm aware of some interesting techniques which use timing measurements from multiple locations to try and triangulate a more accurate location. In fact somebody raised a request for supporting JA4L [0] to me just this morning.

[0] https://github.com/fujiapple852/trippy/issues/856

comment 2y ago · link · parent

Author here, thanks for posting this (i’d meant to do a show HN post at some point).

Trippy is a modern, cross platform, feature rich alternative to MTR with a fancy TUI. And yes, it’s written in Rust.

https://github.com/fujiapple852/trippy

comment 3y ago · link · parent

"Never attribute to malice that which can be adequately explained by stupidity"

comment 3y ago · link · parent

Very little coverage of this bill passing in the UK mainstream media that I have seen.

comment 3y ago · link · parent

This is very similar to the layering approach I ended up with for a service I built a couple of years ago (AWS using Pulumi).

Global - Things from the AWS global region, notably DNS (DelegationSet and Zone) and IAM

Core - Semi-permanent per-stack resources such as secrets and certificates

Network - Network resources per-stack (ie. VPC & EC2)

Database - Database resources per-stack (i.e. RDS) and rotating secrets (via Lambda)

Application - Application resources per-stack (i.e. ECS)

Breakglass - Resources for breakglass shell access to the DMZ subnets

comment 3y ago · link · parent

Great resource, thanks for sharing.

comment 3y ago · link · parent

This is great, good luck with the inevitable NYT buyout :)

One nit, the letters could snap the grid a bit more aggressive, I found I frequently had letter “miss” the grid and have to drag them again (on an iPad).

12