From 2a01827e6c41ab4770b478ecfd0a740c5983be24 Mon Sep 17 00:00:00 2001 From: zedddie Date: Sun, 15 Mar 2026 13:31:20 +0100 Subject: rm trailing newlines & add type alias for Vec --- README.md | 2 +- src/config.rs | 4 ++-- src/geoparsers/geoip2.rs | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 61b7a31..64ef17e 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ Tun-in interface with marching on TOR/I2P similar to v2ray/xray -The project is designed by the desire to transfer all the charms of routing and tun-in of modern VPN cores to Mesh networks. \ No newline at end of file +The project is designed by the desire to transfer all the charms of routing and tun-in of modern VPN cores to Mesh networks. diff --git a/src/config.rs b/src/config.rs index 85f4e81..ec4e92c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -11,9 +11,9 @@ pub enum RunTypes { pub struct NSCConfig { /// Paths to v2ray `geosite.dat', `geoip.dat` pub geo_files: [String; 2], - /// Routing settings similar to v2ray + /// Routing settings similar to v2ray pub routing: String, - /// TOR/I2P Proxies + /// TOR/I2P Proxies pub mode: RunTypes, } diff --git a/src/geoparsers/geoip2.rs b/src/geoparsers/geoip2.rs index 9e8f29d..39ad79d 100644 --- a/src/geoparsers/geoip2.rs +++ b/src/geoparsers/geoip2.rs @@ -16,6 +16,8 @@ pub enum RouteAction { Direct, } +type Rules = Vec; + /// Type for declaring the routing rules like: /// ```toml /// [rule] @@ -31,9 +33,8 @@ pub struct Rule { pub action: RouteAction, } -pub fn parse_ruleset(config: NSCConfig) -> Result, Box> { +pub fn parse_ruleset(config: NSCConfig) -> Result> { let reader = maxminddb::Reader::open_readfile(config.geo_files[0].clone())?; - // Ok(()) todo!(); -- cgit v1.2.3