Commit Graph
36 Commits
Author SHA1 Message Date
Floris Bruynooghe 2edb528007 fix: MSRV in CI (#145)
There's even a comment.  But I seem to have ignored that.
2023-02-15 16:00:40 +01:00
Ruediger Klaehn 659d2d2225 ref: use our own bao crate
Requires just a tiny code change since bao takes a reference of a hash
instead of the value.
2023-02-15 10:44:31 +02:00
Floris Bruynooghe d09a78636b feat: Add generic progress emitter utility (#141)
This adds a generic utility which can be used to track progress of
data transfers by emitting progress via a tokio broadcast channel.

This is extracted from the deltachat PR:
https://github.com/deltachat/deltachat-core-rust/pull/4007
2023-02-14 13:17:21 +01:00
Floris Bruynooghe 8e42874a23 deps: Remove duplicate tokio dependency (#137)
The tokio feature of tracing-futures seems crazy outdated and not
needed.  Enabling it pulls in an ancient version of tokio for no
reason whatsoever.  Get rid of it.
2023-02-13 14:12:42 +01:00
Ruediger Klaehn 2e3d5777ea Merge branch 'main' into cid 2023-02-07 16:00:42 +02:00
Floris Bruynooghe 13f703f0ef feat: Allow shutdown of Provider (#121)
This adds Provider::shutdown allowing to stop the Provider without
having to abort it.  On the wire however it still does not do anything
graceful: all the connections are stopped and any in-transit data is
lost.

Additionally this adds tracing spans to the connection handling.

Finally it fixes a bug where read_lp would not return None if the
connection was closed normally.

Part of #77 but this is not very graceful on the wire yet.
2023-02-07 12:56:35 +01:00
Ruediger Klaehn 9db0937cb6 feat: add newtype wrapper for Hash that is compatible with Cid 2023-02-07 13:08:28 +02:00
Friedel Ziegelmayer 3eff210755 feat: switch from s2n-quic to quinn (#112)
Tests are failing because of port reuse issues and shutdown, should be
fixed with the other PRs merged

Needed to allow work on hole punching in the short term.

Ref #111 

See

- https://github.com/aws/s2n-quic/issues/1607
- https://github.com/aws/s2n-quic/issues/1608
2023-02-06 17:36:50 +01:00
Friedel Ziegelmayer c1eaf28fcc feat: introduce custom Hash type (#115)
- avoids relying on blake3::Hash as a type in the public api
- ensures consistent encoding and decoding
- fixes bug where hex decoding was expected in the UI
2023-02-03 22:34:25 +01:00
Kasey 8c254f3ea5 use default-features = false when importing sendme as a library (#110)
closes #74 

Isolate `cli` specific crates behind the `cli` feature.
2023-02-03 11:03:17 -05:00
dignifiedquire 1cf338d41a chore: remove unused dependency 2023-02-03 10:01:39 +01:00
dignifiedquire 891004d805 feat: switch printing from hex to base64
Closes #91
2023-02-03 10:01:39 +01:00
Friedel Ziegelmayer 01c711a0f4 Merge pull request #109 from n0-computer/ramfox/update_deps
update deps to fix console bug
2023-02-03 09:52:54 +01:00
Kasey 48df01c933 comply w/ MSRV 2023-02-03 01:27:56 -05:00
Kasey 2bd329d805 comply with minimally supported rust version 2023-02-03 01:18:06 -05:00
Kasey 84d3a77323 update deps to fix console bug 2023-02-03 00:40:57 -05:00
dignifiedquire 588dbe778b fix(main): remove stderr tty check 2023-02-02 14:54:15 +01:00
Ruediger Klaehn ff39ef2caf feature: step 3 actually add AsyncSliceDecoder and friends 2023-01-31 11:27:21 +02:00
Friedel Ziegelmayer 35cb4bd28a feat: remove varints (#71)
and use `take` to have cleaner protocol reads
2023-01-27 14:19:11 +01:00
Floris Bruynooghe 4ef108e15a Merge branch 'main' into flub/ticket 2023-01-27 12:43:01 +01:00
Friedel Ziegelmayer 5c48f5eec3 refactor: use genawaiter instead of async-stream 2023-01-27 12:02:18 +01:00
Floris Bruynooghe 7c3a7006fd Merge branch 'flub/provider-builder' into flub/ticket 2023-01-27 11:49:11 +01:00
Floris Bruynooghe 5b979abe01 feat: Provide a single ticket to fetch a hash
This adds a ticket format which enables fetching a hash using a single
"ticket" which contains all the connection details.  With an IPv4
address this just over 200 bytes long.
2023-01-26 18:11:35 +01:00
Friedel Ziegelmayer 55ff6ed6aa fix(cli): only write progress if TTY and write it stderr only 2023-01-26 15:44:36 +01:00
dignifiedquire 6073054015 feat(provider): add persistent identity 2023-01-25 19:24:43 +01:00
Floris Bruynooghe 58a2c2a48b feat: Add authentication token to protocol handshake
This ensures that only clients which have the token can connect to the
server and retrieve the file.
2023-01-23 18:17:28 +01:00
Friedel ZiegelmayerandFloris Bruynooghe c121094de2 feat: add STDIN and STDOUT support (#39)
* feat: add STDIN and STDOUT support

also avoid keeping files data in memory, after calculating the outboard data

* Update src/server.rs

Co-authored-by: Floris Bruynooghe <flub@devork.be>

* Update src/server.rs

Co-authored-by: Floris Bruynooghe <flub@devork.be>

Co-authored-by: Floris Bruynooghe <flub@devork.be>
2023-01-23 13:26:10 +01:00
dignifiedquire c899d64264 refactor output to improve client experience 2023-01-18 15:06:25 +01:00
dignifiedquire 6403bd1bb8 feat: add handshake and reduce allocations 2023-01-18 12:25:44 +01:00
Friedel Ziegelmayer 3038bfedf5 split out io on the client & use tracing (#26)
* split out io on the client & use tracing

closes #9

* ups

* fixup close
2023-01-16 22:59:20 +01:00
dignifiedquire c3cd9e63c2 implement custom version of libp2p-tls
- only ed25519 keys are supported
- no support for PeerIds that are based on protobufs
- remove support for RSA on the certificates
2023-01-13 15:07:24 +01:00
Kaseyanddignifiedquire e46d460222 feat: add clap and server and client options
- help & version commands
- optional custom port for server
- optional custom server addr for client
- server takes a list of filepaths
- client saves the transfered file to the filesystem. By default the name of
  this file is the hash. Optional flag for setting your own `out` path

Co-authored-by: dignifiedquire <me@dignifiedquire.com>
2023-01-13 13:07:38 +01:00
dignifiedquire c5eff3e2b8 add progressbar 2023-01-10 10:44:35 +01:00
dignifiedquire 836c125cc0 add blake3 verification 2023-01-09 22:44:38 +01:00
dignifiedquire 9fd0496a71 add framing 2023-01-09 21:39:59 +01:00
dignifiedquire 59fc6c84c3 initial commit 2023-01-09 17:37:25 +01:00