chiark / gitweb /
config: Copy defaults from python hippotat
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 14:28:03 +0000 (15:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 14:29:19 +0000 (15:29 +0100)
Directly copied from d5100ea6b9bb1d0d858c5475469f9cc4e3200b3a

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/config.rs

index 7e9e222d36923d815c96de784cc0fb1e3ba0dd93..b9cb74420011053652e69fab6093e010539ec90f 100644 (file)
@@ -6,6 +6,48 @@ use crate::prelude::*;
 
 use configparser::ini::Ini;
 
+static DEFAULT_CONFIG: &str = r#"
+[COMMON]
+max_batch_down = 65536
+max_queue_time = 10
+target_requests_outstanding = 3
+http_timeout = 30
+http_timeout_grace = 5
+max_requests_outstanding = 6
+max_batch_up = 4000
+http_retry = 5
+port = 80
+vroutes = ''
+ifname_client = hippo%%d
+ifname_server = shippo%%d
+max_clock_skew = 300
+
+#[server] or [<client>] overrides
+ipif = userv root ipif %(local)s,%(peer)s,%(mtu)s,slip,%(ifname)s %(rnets)s
+
+# relating to virtual network
+mtu = 1500
+
+# addrs = 127.0.0.1 ::1
+# url
+
+# relating to virtual network
+vvnetwork = 172.24.230.192
+# vnetwork = <prefix>/<len>
+# vaddr    = <ipaddr>
+# vrelay   = <ipaddr>
+
+
+# [<client-ip4-or-ipv6-address>]
+# secret = <secret>    # used by both, must match
+
+[LIMIT]
+max_batch_down = 262144
+max_queue_time = 121
+http_timeout = 121
+target_requests_outstanding = 10
+"#;
+
 #[derive(StructOpt,Debug)]
 pub struct Opts {
   /// Top-level config file or directory