diff options
| author | namilsk <namilsk@namilsk.tech> | 2026-03-14 19:15:14 +0300 |
|---|---|---|
| committer | namilsk <namilsk@namilsk.tech> | 2026-03-14 19:17:16 +0300 |
| commit | bc8bc0c2e4fb09070d82aab1f922ef8160c66528 (patch) | |
| tree | c7d36233840007a638bffe3ffa9e503325a51794 /src/config.rs | |
| parent | 7019867411cdca87b394f38dfc589958e09a2b73 (diff) | |
First minimal commit
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..85f4e81 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,33 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Deserialize, Serialize, Default)] +pub enum RunTypes { + #[default] + Tor, + I2P, +} + +#[derive(Serialize, Deserialize)] +pub struct NSCConfig { + /// Paths to v2ray `geosite.dat', `geoip.dat` + pub geo_files: [String; 2], + /// Routing settings similar to v2ray + pub routing: String, + /// TOR/I2P Proxies + pub mode: RunTypes, +} + +impl Default for NSCConfig { + fn default() -> Self { + Self { + geo_files: [ + String::from("/etc/nsc/data/geoip.dat"), + String::from("/etc/nsc/data/geosite.dat"), + ], + routing: String::from("/etc/nsc/routing.toml"), + mode: RunTypes::Tor, + } + } +} + + |
