meejah

Joined 11 years ago

Karma
39
Submissions
51
Member since
Feb 27
https://meejah.ca
View on Hacker News

Recent submissions

Comment · 1 year ago
Here are some fairly simple examples: testing port parsing https://github.com/meejah/fowl/blob/e8253467d7072cd05f21de7c...

...and https://github.com/magic-wormhole/magic-wormhole/blob/1b4732...

The simplest ones to get started with are "strings", IMO, and also gives you lots of mileage (because it'll definitely test some weird unicode). So, somewhere in your API where you take some user-entered strings -- even something "open ended" like "a name" -- you can make use of Hypothesis to try a few things. This has definitely uncovered unicode bugs for me.

Some more complex things can be made with some custom strategies. The most-Hypothesis-heavy tests I've personally worked with are from Magic Folder strategies: https://github.com/tahoe-lafs/magic-folder/blob/main/src/mag...

The only real downside is that a Hypothesis-heavy test-suite like the above can take a while to run (but you can instruct it to only produce one example per test). Obviously, one example per test won't catch everything, but is way faster when developing and Hypothesis remembers "bad" examples so if you occasionally do a longer run it'll remember things that caused errors before.

Comment · 1 year ago
Comment · 1 year ago
Correct.

It does learn some metadata: the endpoints of the messages (unless you use Tor) and the number of bytes in those messages.

Comment · 1 year ago
Comment · 1 year ago
Note, too, that you may run your own "transit helper" (code: https://github.com/magic-wormhole/magic-wormhole-transit-rel... ) and then specify this via "wormhole --transit-helper tcp:<your host>:<port>" when doing a transfer.

You do need to run the helper on a public IP address, like a rented VPS for example.

Comment · 1 year ago
You should probably first test and ensure that you're sending "directly" instead of via the relay -- but if that's true then yes.
Comment · 1 year ago
One use-case could be for SyncThing to actually _use_ magic-wormhole as a way to introduce / join another endpoint to a SyncThing folder.
Comment · 1 year ago
Comment · 1 year ago
You might even use Magic Wormhole to securely transfer WireGuard keys!
Comment · 1 year ago
Comment · 1 year ago
If two Magic Wormhole clients _are_ on the same LAN they should communicate directly that way (i.e. no relay required).
Comment · 1 year ago
Comment · 1 year ago
Building on top of various Magic Wormhole features, "shwim" enables quick and easy 1:1 terminal sharing with durable, end-to-end-encrypted communications using tty-share.
Comment · 2 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton