Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
manforowicz committed Apr 1, 2024
1 parent f5b2578 commit 947713b
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 36 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `gday`
# Gday Project

**WORK IN PROGRESS - THIS PROJECT IS NOT READY YET**

Expand All @@ -7,6 +7,10 @@ Then go to the [gday page](gday/README.md).

## Similar Projects

I heavily took inspiration from these projects.
I'm very grateful to their creators and contributors.
We stand on the shoulders of giants.

<table>
<tr>
<th></th>
Expand Down
2 changes: 1 addition & 1 deletion gday/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "4.5.3", features = ["derive"] }
clap = { version = "4.5.4", features = ["derive"] }
env_logger = "0.11.3"
gday_encryption = { version = "0.1.0", path = "../gday_encryption" }
gday_file_offer_protocol = { version = "0.1.0", path = "../gday_file_offer_protocol" }
Expand Down
3 changes: 0 additions & 3 deletions gday/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# `gday`
![Crates.io Version](https://img.shields.io/crates/v/gday) ![docs.rs](https://img.shields.io/docsrs/gday)

Want to send files easily, securely, and directly, without a relay or port forwarding?
Then go to the [gday page](gday/README.md).

**Work in progress - not ready yet**

A command line tool to send files easily, securely, and directly, without a relay or port forwarding.
Expand Down
25 changes: 7 additions & 18 deletions gday/src/dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ pub fn confirm_receive(files: &[FileMeta]) -> std::io::Result<Vec<Option<u64>>>
HumanBytes(new_size).bold()
);
println!("{}", "Options:".bold());
println!("1. Download all files.");
println!("2. Download only files with new path or size. Resume any interrupted downloads.");
println!("1. Download only files with new path or size. Resume any interrupted downloads.");
println!("2. Fully download all files.");
println!("3. Cancel.");
println!("Note: Gday will create new files, instead of overwriting existing files.");
print!("{} ", "Choose an option (1, 2, or 3):".bold());
Expand All @@ -79,10 +79,10 @@ pub fn confirm_receive(files: &[FileMeta]) -> std::io::Result<Vec<Option<u64>>>
let mut response = String::new();
std::io::stdin().read_line(&mut response)?;
match response.trim() {
// all files
"1" => Ok(vec![Some(0); files.len()]),
// new files
"2" => Ok(new_files),
"1" => Ok(new_files),
// all files
"2" => Ok(vec![Some(0); files.len()]),
// cancel
_ => Ok(vec![None; files.len()]),
}
Expand All @@ -96,7 +96,7 @@ pub fn confirm_send(paths: &[PathBuf]) -> std::io::Result<Vec<FileMetaLocal>> {
let files = get_paths_metadatas(paths)?;

// print all the file names and sizes
println!("{} {}", files.len().bold(), "files:".bold());
println!("{} {}", files.len().bold(), "files to send:".bold());
for file in &files {
println!("{} ({})", file.short_path.display(), HumanBytes(file.len));
}
Expand All @@ -109,18 +109,7 @@ pub fn confirm_send(paths: &[PathBuf]) -> std::io::Result<Vec<FileMetaLocal>> {
HumanBytes(total_size).bold()
);

// ask the user whether they'd like to send these files
print!("{}", "Would you like to send these files? (y/n): ".bold());
std::io::stdout().flush()?;
let mut response = String::new();
std::io::stdin().read_line(&mut response)?;

if "yes".starts_with(&response.trim().to_lowercase()) {
Ok(files)
} else {
println!("User cancelled file send.");
std::process::exit(0);
}
Ok(files)
}

/// Checks if there already exists a file with the same save path
Expand Down
4 changes: 2 additions & 2 deletions gday_contact_exchange_protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license = "MIT"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.115"
thiserror = "1.0.58"
tokio = { version = "1.36.0", features = ["io-util"] }
tokio = { version = "1.37.0", features = ["io-util"] }

[dev-dependencies]
tokio = { version = "1.36.0", features = ["test-util", "macros"] }
tokio = { version = "1.37.0", features = ["test-util", "macros"] }
2 changes: 1 addition & 1 deletion gday_contact_exchange_protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![Crates.io Version](https://img.shields.io/crates/v/gday_contact_exchange_protocol) ![docs.rs](https://img.shields.io/docsrs/gday_contact_exchange_protocol)

Want to send files easily, securely, and directly, without a relay or port forwarding?
Then go to the [gday page](gday/README.md).
Then go to the [gday page](/gday/README.md).

This library defines a protocol that lets two users exchange
their public and/or private socket addresses via a server.
Expand Down
2 changes: 1 addition & 1 deletion gday_encryption/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![Crates.io Version](https://img.shields.io/crates/v/gday_encryption) ![docs.rs](https://img.shields.io/docsrs/gday_encryption)

Want to send files easily, securely, and directly, without a relay or port forwarding?
Then go to the [gday page](gday/README.md).
Then go to the [gday page](/gday/README.md).

WARNING! This library has not been officially audited for security.

Expand Down
2 changes: 1 addition & 1 deletion gday_file_offer_protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![Crates.io Version](https://img.shields.io/crates/v/gday_file_offer_protocol) ![docs.rs](https://img.shields.io/docsrs/gday_file_offer_protocol)

Want to send files easily, securely, and directly, without a relay or port forwarding?
Then go to the [gday page](gday/README.md).
Then go to the [gday page](/gday/README.md).

This library defines a protocol that lets user agree which files to transfer.
This library provides functions to send and receive messages of this protocol.
Expand Down
4 changes: 2 additions & 2 deletions gday_hole_punch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ blake3 = "1.5.1"
gday_contact_exchange_protocol = { version = "0.1.0", path = "../gday_contact_exchange_protocol" }
log = "0.4.21"
rand = "0.8.5"
rustls = "0.23.3"
rustls = "0.23.4"
socket2 = "0.5.6"
spake2 = { version = "0.4.0", features = ["std"] }
thiserror = "1.0.58"
tokio = { version = "1.36.0", features = ["net", "rt", "time"] }
tokio = { version = "1.37.0", features = ["net", "rt", "time"] }
webpki-roots = "0.26.1"
2 changes: 1 addition & 1 deletion gday_hole_punch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![Crates.io Version](https://img.shields.io/crates/v/gday_hole_punch) ![docs.rs](https://img.shields.io/docsrs/gday_hole_punch)

Want to send files easily, securely, and directly, without a relay or port forwarding?
Then go to the [gday page](gday/README.md).
Then go to the [gday page](/gday/README.md).

This library provides functions for two peers to establish a direct TCP connection.

Expand Down
6 changes: 2 additions & 4 deletions gday_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "4.5.3", features = ["derive"] }
clap = { version = "4.5.4", features = ["derive"] }
socket2 = "0.5.6"
tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros", "net", "time", "sync"] }
tokio = { version = "1.37.0", features = ["rt-multi-thread", "macros", "net", "time", "sync"] }
tokio-rustls = "0.26.0"
gday_contact_exchange_protocol = { path = "../gday_contact_exchange_protocol" }
thiserror = "1.0.58"
log = "0.4.21"
env_logger = "0.11.3"
rustls-pemfile = "2.1.1"
ciborium = "0.2.2"
serde = "1.0.197"
2 changes: 1 addition & 1 deletion gday_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![Crates.io Version](https://img.shields.io/crates/v/gday_server) ![docs.rs](https://img.shields.io/docsrs/gday_server)

Want to send files easily, securely, and directly, without a relay or port forwarding?
Then go to the [gday page](gday/README.md).
Then go to the [gday page](/gday/README.md).

This crate is a server that runs the [`gday_contact_exchange_protocol`](/gday_contact_exchange_protocol/).

Expand Down

0 comments on commit 947713b

Please sign in to comment.