From 50c76826ea210403a070797ddf6fb7161ab142a6 Mon Sep 17 00:00:00 2001 From: zephyr Date: Sun, 17 Apr 2022 21:02:40 +0900 Subject: [PATCH] display transport feature in help --- Cargo.lock | 2 +- Cargo.toml | 2 +- readme.md | 2 +- src/lib.rs | 2 +- src/utils/consts.rs | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e1243a31..f2c0a250 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -823,7 +823,7 @@ dependencies = [ [[package]] name = "realm" -version = "2.0.0" +version = "2.0.1" dependencies = [ "bytes", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index 599bc6c9..d74baaa8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "realm" -version = "2.0.0" +version = "2.0.1" authors = ["zhboner "] edition = "2021" diff --git a/readme.md b/readme.md index eaddec6e..f9e0df01 100644 --- a/readme.md +++ b/readme.md @@ -79,7 +79,7 @@ Or have a look at [Cross](https://github.com/cross-rs/cross), it makes things ea ## Usage ```shell -Realm 2.0.0 [udp][zero-copy][trust-dns][proxy-protocol][multi-thread] +Realm 2.x [udp][zero-copy][trust-dns][proxy-protocol][transport][multi-thread] A high efficiency relay tool USAGE: diff --git a/src/lib.rs b/src/lib.rs index ecb91843..4c967420 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,5 +4,5 @@ pub mod conf; pub mod utils; pub mod relay; -pub const VERSION: &str = "2.0.0"; +pub const VERSION: &str = "2.0.1"; pub const ENV_CONFIG: &str = "REALM_CONF"; diff --git a/src/utils/consts.rs b/src/utils/consts.rs index 15e6ab6a..ae2584b5 100644 --- a/src/utils/consts.rs +++ b/src/utils/consts.rs @@ -42,6 +42,7 @@ def_feat!(FEATURE_PROXY_PROTOCOL, "proxy-protocol"); def_feat!(FEATURE_MIMALLOC, "mi-malloc"); def_feat!(FEATURE_JEMALLOC, "jemalloc"); def_feat!(FEATURE_MULTI_THREAD, "multi-thread"); +def_feat!(FEATURE_TRANSPORT, "transport"); pub struct Features { pub udp: bool, @@ -52,6 +53,7 @@ pub struct Features { pub jemalloc: bool, pub multi_thread: bool, pub proxy_protocol: bool, + pub transport: bool, } pub const FEATURES: Features = Features { @@ -63,6 +65,7 @@ pub const FEATURES: Features = Features { jemalloc: FEATURE_JEMALLOC, multi_thread: FEATURE_MULTI_THREAD, proxy_protocol: FEATURE_PROXY_PROTOCOL, + transport: FEATURE_TRANSPORT, }; impl Display for Features { @@ -79,6 +82,7 @@ impl Display for Features { disp_feat!(zero_copy, "zero-copy"); disp_feat!(trust_dns, "trust-dns"); disp_feat!(proxy_protocol, "proxy-protocol"); + disp_feat!(transport, "transport"); disp_feat!(multi_thread, "multi-thread"); disp_feat!(mimalloc, "mimalloc"); disp_feat!(jemalloc, "jemalloc");