-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The introduction of ipgen meant that IPv4 address pairs for a given service were not guaranteed to be adjacent, which means they aren't a /30, which broke networking. While deterministic IP generation is a great property, it's more important for the tool to figure out what's unused and use that. Move error to its own file, seems idiomatic.
- Loading branch information
Showing
16 changed files
with
238 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "innisfree" | ||
version = "0.2.11-alpha.0" | ||
version = "0.2.11-beta.2" | ||
authors = ["Conor Schaefer <[email protected]>"] | ||
edition = "2018" | ||
description = "Exposes local services on public IPv4 address, via cloud server." | ||
|
@@ -17,8 +17,9 @@ custom_error = "~1.9" | |
env_logger = "~0.9" | ||
futures = "0.3" | ||
home = "~0.5" | ||
ipgen = "~1" | ||
ipnet = "~2" | ||
log = "~0.4" | ||
pnet = "~0.28" | ||
rand = "~0.8" | ||
reqwest = { version = "~0.11", features = ["json", "rustls"] } | ||
serde = { version = "1.0", features = ["derive"] } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
extern crate custom_error; | ||
use custom_error::custom_error; | ||
|
||
// Using custom_error mostly for read/write errors | ||
// Note the use of braces rather than parentheses. | ||
custom_error! {pub InnisfreeError | ||
Io{source: std::io::Error} = "input/output error", | ||
// CommandFailure{source: std::process::ExitStatus} = "command failed", | ||
SshCommandFailure = "SSH command failed", | ||
ServerNotFound = "Server does not exist", | ||
CommandFailure{msg: String} = "Local command failed: {}", | ||
NetworkError{source: reqwest::Error} = "Network error, check connection", | ||
PlatformError = "Platform error, only Linux is supported", | ||
Template{source: tera::Error} = "Template generation failed", | ||
IpNetAssignment{source: ipnet::AddrParseError} = "Failed to find unclaimed IP address", | ||
IpAddrAssignment{source: std::net::AddrParseError} = "Failed to find unclaimed IP address", | ||
Unknown = "unknown error", | ||
} |
Oops, something went wrong.