psanford / wormhole-william

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
MIT License
1.07k stars 54 forks source link

support for queuing files ? #104

Closed ihubgit closed 11 months ago

ihubgit commented 1 year ago

Hi this is just a question. Using wormhole-william on Apple Silicon with GUI client. I would like to know whether your implementation of the wormhole protocol already includes the ability to queue files or not ? F.ex. when sharing multiple individual files and sharing their individual codes to the recipient, when the latter launches multiple shares at once, will they all start being streamed ? If so, can i suggest to implement the ability to queue the shares, so that when the recipient launches them all, only the first one launches (to benefit of all the bandwith) and only starts the next one, when the first one is finished. Would this be possible ?

psanford commented 11 months ago

This would require protocol level changes.

You can accomplish this (with some loss of security properties) by specifying your own wormhole code and reusing it within a bash loop. For example:

# choose a random, high mailbox
mailbox=87
random_code=$(dd if=/dev/urandom bs=30 count=1 | xxd -p)
echo $random_code

# on sender side
for f in $(ls dir/with/files); do
  wormhole-william send --code $mailbox-$random_code $f
done

# on receiver side
while true; do
  echo y | wormhole-william recv $mailbox-$random_code
done

If you use this strategy its important that you generate a secure random wormhole code since you are reusing it.