diff --git a/Cargo.toml b/Cargo.toml index ecf723e..7dd2230 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,12 +2,21 @@ name = "netstack-smoltcp" version = "0.1.0" edition = "2021" +authors = ["cavivie "] +license = "MIT OR Apache-2.0" +repository = "https://github.com/automesh-network/netstack-smoltcp" +homepage = "https://github.com/automesh-network/netstack-smoltcp" +documentation = "https://docs.rs/netstack-smoltcp" +description = """ +A netstack for the special purpose of turning packets from/to a TUN interface +into TCP streams and UDP packets. It uses smoltcp-rs as the backend netstack. +""" [dependencies] tracing = { version = "0.1", default-features = false, features = ["std"] } tokio = { version = "1", features = ["sync", "time", "rt", "macros"] } tokio-util = "0.7.10" -etherparse ="0.13" +etherparse = "0.13" futures = "0.3" rand = "0.8" spin = "0.9" @@ -24,7 +33,12 @@ smoltcp = { version = "0.11", default-features = false, features = [ [dev-dependencies] tun = { package = "tun2", version = "1.0", features = ["async"] } -tokio = { version = "1", features = ["rt", "macros", "rt-multi-thread", "io-util"] } +tokio = { version = "1", features = [ + "rt", + "macros", + "rt-multi-thread", + "io-util", +] } tracing = { version = "0.1", default-features = false, features = ["std"] } tracing-subscriber = "0.3.18" structopt = "0.3" diff --git a/LICENSE b/LICENSE-APACHE similarity index 100% rename from LICENSE rename to LICENSE-APACHE diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 0000000..ede7ee9 --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,25 @@ +Copyright (c) 2024 cavivie and netstack-smoltcp Contributors + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index be14a01..f1bca7f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,20 @@ A netstack for the special purpose of turning packets from/to a TUN interface into TCP streams and UDP packets. It uses smoltcp-rs as the backend netstack. +[![Crates.io][crates-badge]][crates-url] +[![MIT licensed][mit-badge]][mit-url] +[![Apache licensed, Version 2.0][apache-badge]][apache-url] +[![Build Status][actions-badge]][actions-url] + +[crates-badge]: https://img.shields.io/crates/v/netstack-smoltcp.svg +[crates-url]: https://crates.io/crates/netstack-smoltcp +[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg +[mit-url]: https://github.com/automesh-network/netstack-smoltcp/blob/master/LICENSE-MIT +[apache-badge]: https://img.shields.io/badge/license-APACHE2.0-blue.svg +[apache-url]: https://github.com/automesh-network/netstack-smoltcp/blob/master/LICENSE-APACHE +[actions-badge]: https://github.com/automesh-network/netstack-smoltcp/workflows/CI/badge.svg +[actions-url]: https://github.com/automesh-network/netstack-smoltcp/actions?query=workflow%3ACI+branch%3Amain + ## Example ```rust // let device = tun2::create_as_async(&cfg)?; @@ -47,4 +61,17 @@ tokio::spawn(async move { ## License -This project is licensed under the [Apache License 2.0](./LICENSE). +This project is licensed under either of + + * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or + https://www.apache.org/licenses/LICENSE-2.0) + * MIT license ([LICENSE-MIT](LICENSE-MIT) or + https://opensource.org/licenses/MIT) + +at your option. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in cc-rs by you, as defined in the Apache-2.0 license, shall be +dual licensed as above, without any additional terms or conditions.