summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs33
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,
+ }
+ }
+}
+
+