Rip is already taken on crates.io
This commit is contained in:
parent
03e18b00b1
commit
2c106cdd26
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -54,7 +54,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rip"
|
||||
name = "ripper"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
10
Cargo.toml
10
Cargo.toml
@ -1,19 +1,19 @@
|
||||
[package]
|
||||
name = "rip"
|
||||
name = "ripper"
|
||||
version = "0.1.0"
|
||||
authors = ["Kevin Cotugno <kevin@kevincotugno.com>"]
|
||||
|
||||
[[bin]]
|
||||
name = "rip"
|
||||
name = "ripper"
|
||||
path = "src/bin/client.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "rip-server"
|
||||
name = "ripper-server"
|
||||
path = "src/bin/server.rs"
|
||||
|
||||
[lib]
|
||||
name = "rip"
|
||||
path = "src/rip/lib.rs"
|
||||
name = "ripper"
|
||||
path = "src/ripper/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = "~2.32"
|
||||
|
@ -4,11 +4,11 @@ use std::io::Write;
|
||||
use std::net::IpAddr;
|
||||
|
||||
fn main() {
|
||||
let port = rip::DEFAULT_PORT.to_string();
|
||||
let args = App::new(rip::NAME)
|
||||
.version(rip::VERSION)
|
||||
.author(rip::AUTHOR)
|
||||
.about(rip::ABOUT)
|
||||
let port = ripper::DEFAULT_PORT.to_string();
|
||||
let args = App::new(ripper::NAME)
|
||||
.version(ripper::VERSION)
|
||||
.author(ripper::AUTHOR)
|
||||
.about(ripper::ABOUT)
|
||||
.arg(
|
||||
Arg::with_name("port")
|
||||
.short("p")
|
||||
@ -42,10 +42,10 @@ fn run(args: &ArgMatches) -> Result<IpAddr, String> {
|
||||
Err(_) => return Err("Port must be a valid unsigned 16bit integer".to_string()),
|
||||
};
|
||||
|
||||
let dest = match rip::parse_socket_addr(args.value_of("host").unwrap(), port) {
|
||||
let dest = match ripper::parse_socket_addr(args.value_of("host").unwrap(), port) {
|
||||
Ok(v) => v,
|
||||
Err(err) => return Err(err),
|
||||
};
|
||||
|
||||
rip::run_client(dest)
|
||||
ripper::run_client(dest)
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
extern crate clap;
|
||||
use clap::{App, Arg, ArgMatches};
|
||||
|
||||
const NAME: &str = "rip-server";
|
||||
const NAME: &str = "ripper-server";
|
||||
|
||||
fn main() {
|
||||
let port = rip::DEFAULT_PORT.to_string();
|
||||
let port = ripper::DEFAULT_PORT.to_string();
|
||||
let args = App::new(NAME)
|
||||
.version(rip::VERSION)
|
||||
.author(rip::AUTHOR)
|
||||
.about(rip::ABOUT)
|
||||
.version(ripper::VERSION)
|
||||
.author(ripper::AUTHOR)
|
||||
.about(ripper::ABOUT)
|
||||
.arg(
|
||||
Arg::with_name("port")
|
||||
.short("p")
|
||||
@ -32,5 +32,5 @@ fn run(args: &ArgMatches) -> Result<(), String> {
|
||||
Err(_) => return Err("Port must be a valid unsigned 16bit integer".to_string()),
|
||||
};
|
||||
|
||||
rip::run_server(port)
|
||||
ripper::run_server(port)
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ use std::io;
|
||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, UdpSocket};
|
||||
use std::time::Duration;
|
||||
|
||||
pub const NAME: &str = "rip";
|
||||
pub const NAME: &str = "ripper";
|
||||
pub const VERSION: &str = "0.1.0";
|
||||
pub const ABOUT: &str = "Rip is a simple client/server to retrieving a public IP via UDP.";
|
||||
pub const AUTHOR: &str = "Kevin Cotugno <kevin@kevincotugno.com>";
|
Reference in New Issue
Block a user