From 1b6a2f126af11f493aea55a24bf63981f6d6fa20 Mon Sep 17 00:00:00 2001 From: zedddie Date: Sun, 15 Mar 2026 13:47:48 +0100 Subject: rename NSCConfig to Config for now :1 --- src/config.rs | 4 ++-- src/geoparsers/geoip2.rs | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/config.rs b/src/config.rs index ec4e92c..6552a65 100644 --- a/src/config.rs +++ b/src/config.rs @@ -8,7 +8,7 @@ pub enum RunTypes { } #[derive(Serialize, Deserialize)] -pub struct NSCConfig { +pub struct Config { /// Paths to v2ray `geosite.dat', `geoip.dat` pub geo_files: [String; 2], /// Routing settings similar to v2ray @@ -17,7 +17,7 @@ pub struct NSCConfig { pub mode: RunTypes, } -impl Default for NSCConfig { +impl Default for Config { fn default() -> Self { Self { geo_files: [ diff --git a/src/geoparsers/geoip2.rs b/src/geoparsers/geoip2.rs index 39ad79d..af5d03e 100644 --- a/src/geoparsers/geoip2.rs +++ b/src/geoparsers/geoip2.rs @@ -1,12 +1,12 @@ use ipnet::IpNet; -use crate::config::NSCConfig; +use crate::config::Config; -/// Enum for declaring GeoSite/IP routing +/// Enum for declaring GeoSite/IP routing pub enum RouteType { /// GeoSite MMDB type, like `category-ads-all` GeoSite(String), /// Subnet - GeoIp(IpNet), + GeoIp(IpNet), } /// Routing actions @@ -18,15 +18,15 @@ pub enum RouteAction { type Rules = Vec; -/// Type for declaring the routing rules like: -/// ```toml +/// Type for declaring the routing rules like: +/// ```toml /// [rule] -/// action = enum RouteAction -/// target = enum RouteType +/// action = enum RouteAction +/// target = enum RouteType /// /// [rule] -/// target = "geosite:category-ads-all" -/// action = "block" +/// target = "geosite:category-ads-all" +/// action = "block" /// ``` pub struct Rule { pub target: RouteType, -- cgit v1.2.3