Browse Source

switch configs from TOML to YAML

Justin Tracey 1 year ago
parent
commit
c479a3669e

+ 1 - 1
Cargo.toml

@@ -10,9 +10,9 @@ rand = "0.8.5"
 rand_distr = { version = "0.4.3", features = ["serde1"] }
 rand_xoshiro = "0.6.0"
 serde = { version = "1.0.158", features = ["derive"] }
+serde_yaml = "0.9.21"
 tokio = { version = "1", features = ["full"] }
 tokio-socks = "0.5.1"
-toml = "0.7.3"
 
 [profile.release]
 lto = true

+ 58 - 58
README.md

@@ -34,9 +34,9 @@ The server will listen for connections on the given interface.
 If none is given, it will listen on `127.0.0.1:6397`.
 
 #### Client/Peer
-`mgen-client [config.toml]...`
+`mgen-client [config.yaml]...`
 
-`mgen-peer [config.toml]...`
+`mgen-peer [config.yaml]...`
 
 The client and peer configuration files are detailed below.
 
@@ -46,60 +46,60 @@ Clients are designed to simulate one user per configuration file, with multiple
 The client can take multiple configuration files, and also accepts globs—similar to techniques used in TGen, a single client can simulate traffic of many individual users.
 The following example configuration with explanatory comments should be enough to understand almost everything you need:
 
-```TOML
-# client-conversation.toml
+```YAML
+# client-conversation.yaml
 
 # A name used for logs and to create unique circuits for each user on a client.
-user = "Alice"
+user: "Alice"
 
 # The <ip>:<port> of a socks5 proxy to connect through.
 # Optional.
-socks = "127.0.0.1:9050"
-
+socks: "127.0.0.1:9050"
 
 # The list of conversations associated with the user.
-[[conversations]]
-
-# A conversation name used for logs, server-side lookups,
-# and unique circuits for each conversation,
-# even when two chats share the same participants.
-group = "group1"
+conversations:
 
-# The <address>:<port> of the message server, where <address> is an IP or onion address.
-server = "insert.ip.or.onion:6397"
+  # A conversation name used for logs, server-side lookups,
+  # and unique circuits for each conversation,
+  # even when two chats share the same participants.
+  - group: "group1"
 
-# The number of seconds to wait until the client starts sending messages.
-# This should be long enough that all clients have had time to start (sending
-# messages to a client that isn't registered on the server is a fatal error),
-# but short enough all conversations will have started by the experiment start.
-bootstrap = 5.0
+    # The <address>:<port> of the message server,
+    # where <address> is an IP or onion address.
+    server: "insert.ip.or.onion:6397"
 
-# The number of seconds to wait after a network failure before retrying.
-retry = 5.0
+    # The number of seconds to wait until the client starts sending messages.
+    # This should be long enough that all clients have had time to start
+    # (sending messages to a client that isn't registered on the server is a
+    # fatal error), but short enough all conversations will have started by
+    # the experiment start.
+    bootstrap: 5.0
 
+    # The number of seconds to wait after a network failure before retrying.
+    retry: 5.0
 
-# Parameters for distributions used by the Markov model.
-[conversations.distributions]
 
-# Probabilities of Idle to Active transition after sending/receiving messages.
-s = 0.5
-r = 0.1
+    # Parameters for distributions used by the Markov model.
+    distributions:
 
-# The distribution of message sizes, as measured in padding blocks.
-m = {distribution = "Poisson", lambda = 1.0}
+      # Probability of Idle to Active transition with sent/received messages.
+      s: 0.5
+      r: 0.1
 
-# Distribution I, the amount of time Idle before sending a message.
-i = {distribution = "Normal", mean = 30.0, std_dev = 100.0}
+      # The distribution of message sizes, as measured in padding blocks.
+      m: { distribution: "Poisson", lambda: 1.0 }
 
-# Distribution W, the amount of time Active without sending or receiving
-# messages to transition to Idle.
-w = {distribution = "Uniform", low = 0.0, high = 90.0}
+      # Distribution I, the amount of time Idle before sending a message.
+      i: { distribution: "Normal", mean: 30.0, std_dev: 100.0 }
 
-# Distribution A_{s/r}, the amount of time Active since last sent/received
-# message until the client sends a message.
-a_s = {distribution = "Exp", lambda = 2.0}
-a_r = {distribution = "Pareto", scale = 1.0, shape = 3.0}
+      # Distribution W, the amount of time Active without sending or receiving
+      # messages to transition to Idle.
+      w: { distribution: "Uniform", low: 0.0, high: 90.0 }
 
+      # Distribution A_{s/r}, the time Active since last sent/received
+      # message until the client sends a message.
+      a_s: { distribution: "Exp", lambda: 2.0 }
+      a_r: { distribution: "Pareto", scale: 1.0, shape: 3.0 }
 ```
 
 Additional examples can be found in the [client shadow test configurations](/shadow/client/shadow.data.template/hosts).
@@ -123,26 +123,26 @@ Running in peer-to-peer mode is very similar to running a client.
 The only differences are that recipients in a group must be listed, users and recipients consist of a name and address each, and there is no server.
 Here is an example peer conversation configuration (again, all values are for demonstration purposes only):
 
-```TOML
-# peer-conversation.toml
-
-user = {name = "Alice", address = "127.0.0.1:6397"}
-socks = "127.0.0.1:9050"
-
-[[conversations]]
-group = "group1"
-recipients = [{name = "Bob", address = "insert.ip.or.onion:6397"}]
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 30.0, std_dev = 100.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
+```YAML
+# peer-conversation.yaml
+
+user: { name: "Alice", address: "127.0.0.1:6397" }
+socks: "127.0.0.1:9050"
+
+conversations:
+  - group: "group1"
+    recipients:
+      - { name: "Bob", address: "insert.ip.or.onion:6397" }
+    bootstrap: 5.0
+    retry: 5.0
+    distributions:
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 30.0, std_dev: 100.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
 ```
 
 Additional examples can be found in the [peer shadow test configurations](/shadow/peer/shadow.data.template/hosts).

+ 0 - 32
shadow/client/shadow.data.template/hosts/client1/alice.toml

@@ -1,32 +0,0 @@
-user = "Alice"
-
-[[conversations]]
-group = "group1"
-server = "100.0.0.1:6397"
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-
-
-[[conversations]]
-group = "group2"
-server = "100.0.0.1:6397"
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}

+ 19 - 0
shadow/client/shadow.data.template/hosts/client1/alice.yaml

@@ -0,0 +1,19 @@
+user: "Alice"
+conversations:
+  - group: "group1"
+    server: "100.0.0.1:6397"
+    bootstrap: 5.0
+    retry: 5.0
+    distributions: &dists
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 15.0, std_dev: 30.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+  - group: "group2"
+    server: "100.0.0.1:6397"
+    bootstrap: 5.0
+    retry: 5.0
+    distributions: *dists

+ 0 - 32
shadow/client/shadow.data.template/hosts/client2/bob.toml

@@ -1,32 +0,0 @@
-user = "Bob"
-
-[[conversations]]
-group = "group1"
-server = "100.0.0.1:6397"
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-
-
-[[conversations]]
-group = "group2"
-server = "100.0.0.1:6397"
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}

+ 19 - 0
shadow/client/shadow.data.template/hosts/client2/bob.yaml

@@ -0,0 +1,19 @@
+user: "Bob"
+conversations:
+  - group: "group1"
+    server: "100.0.0.1:6397"
+    bootstrap: 5.0
+    retry: 5.0
+    distributions: &dists
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 15.0, std_dev: 30.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+  - group: "group2"
+    server: "100.0.0.1:6397"
+    bootstrap: 5.0
+    retry: 5.0
+    distributions: *dists

+ 0 - 16
shadow/client/shadow.data.template/hosts/client2/carol.toml

@@ -1,16 +0,0 @@
-user = "Carol"
-
-[[conversations]]
-group = "group1"
-server = "100.0.0.1:6397"
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}

+ 14 - 0
shadow/client/shadow.data.template/hosts/client2/carol.yaml

@@ -0,0 +1,14 @@
+user: "Carol"
+conversations:
+  - group: "group1"
+    server: "100.0.0.1:6397"
+    bootstrap: 5.0
+    retry: 5.0
+    distributions:
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 15.0, std_dev: 30.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }

+ 0 - 16
shadow/client/shadow.data.template/hosts/client3/dave.toml

@@ -1,16 +0,0 @@
-user = "Dave"
-
-[[conversations]]
-group = "group2"
-server = "100.0.0.1:6397"
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}

+ 14 - 0
shadow/client/shadow.data.template/hosts/client3/dave.yaml

@@ -0,0 +1,14 @@
+user: "Dave"
+conversations:
+  - group: "group2"
+    server: "100.0.0.1:6397"
+    bootstrap: 5.0
+    retry: 5.0
+    distributions:
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 15.0, std_dev: 30.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }

+ 1 - 5
shadow/client/shadow.yaml

@@ -1,9 +1,5 @@
 general:
   stop_time: 1h
-  # old versions of cURL use a busy loop, so to avoid spinning in this busy
-  # loop indefinitely, we add a system call latency to advance the simulated
-  # time when running non-blocking system calls
-  #model_unblocked_syscall_latency: true
 
 network:
   graph:
@@ -24,7 +20,7 @@ hosts:
     network_node_id: 0
     processes:
     - path: mgen-client
-      args: "*.toml"
+      args: "*.yaml"
       start_time: 5s
   client2: *client_host
   client3: *client_host

+ 0 - 39
shadow/peer/shadow.data.template/hosts/peer1/alice.toml

@@ -1,39 +0,0 @@
-user = {name = "Alice", address = "100.0.0.1:6397"}
-
-[[conversations]]
-group = "group1"
-recipients = [
-  { name = "Bob", address = "100.0.0.2:6397" },
-  { name = "Carol", address = "100.0.0.2:6398" }
-]
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = { distribution = "Poisson", lambda = 1.0 }
-i = { distribution = "Normal", mean = 15.0, std_dev = 30.0 }
-w = { distribution = "Normal", mean = 30.0, std_dev = 30.0 }
-a_s = { distribution = "Normal", mean = 10.0, std_dev = 5.0 }
-a_r = { distribution = "Normal", mean = 10.0, std_dev = 5.0 }
-
-
-[[conversations]]
-group = "group2"
-recipients = [
-  { name = "Bob", address = "100.0.0.2:6397" },
-  { name = "Dave", address = "100.0.0.3:6397" }
-]
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = { distribution = "Poisson", lambda = 1.0 }
-i = { distribution = "Normal", mean = 15.0, std_dev = 30.0 }
-w = { distribution = "Normal", mean = 30.0, std_dev = 30.0 }
-a_s = { distribution = "Normal", mean = 10.0, std_dev = 5.0 }
-a_r = { distribution = "Normal", mean = 10.0, std_dev = 5.0 }
-

+ 23 - 0
shadow/peer/shadow.data.template/hosts/peer1/alice.yaml

@@ -0,0 +1,23 @@
+user: { name: "Alice", address: "100.0.0.1:6397" }
+conversations:
+  - group: "group1"
+    recipients:
+      - { name: "Bob", address: "100.0.0.2:6397" }
+      - { name: "Carol", address: "100.0.0.2:6398"}
+    bootstrap: 5.0
+    retry: 5.0
+    distributions: &dists
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 15.0, std_dev: 30.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+  - group: "group2"
+    recipients:
+      - { name: "Bob", address: "100.0.0.2:6397" }
+      - { name: "Dave", address: "100.0.0.3:6397" }
+    bootstrap: 5.0
+    retry: 5.0
+    distributions: *dists

+ 0 - 32
shadow/peer/shadow.data.template/hosts/peer2/bob.toml

@@ -1,32 +0,0 @@
-user = {name = "Bob", address = "100.0.0.2:6397"}
-
-[[conversations]]
-group = "group1"
-recipients = [{name = "Alice", address = "100.0.0.1:6397"}, {name = "Carol", address = "100.0.0.2:6398"}]
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-
-
-[[conversations]]
-group = "group2"
-recipients = [{name = "Alice", address = "100.0.0.1:6397"}, {name = "Dave", address = "100.0.0.3:6397"}]
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}

+ 23 - 0
shadow/peer/shadow.data.template/hosts/peer2/bob.yaml

@@ -0,0 +1,23 @@
+user: { name: "Bob", address: "100.0.0.2:6397" }
+conversations:
+  - group: "group1"
+    recipients:
+      - { name: "Alice", address: "100.0.0.1:6397" }
+      - { name: "Carol", address: "100.0.0.2:6398" }
+    bootstrap: 5.0
+    retry: 5.0
+    distributions: &dists
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 15.0, std_dev: 30.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+  - group: "group2"
+    recipients:
+      - { name: "Alice", address: "100.0.0.1:6397" }
+      - { name: "Dave", address: "100.0.0.3:6397" }
+    bootstrap: 5.0
+    retry: 5.0
+    distributions: *dists

+ 0 - 16
shadow/peer/shadow.data.template/hosts/peer2/carol.toml

@@ -1,16 +0,0 @@
-user = {name = "Carol", address = "100.0.0.2:6398"}
-
-[[conversations]]
-group = "group1"
-recipients = [{name = "Alice", address = "100.0.0.1:6397"}, {name = "Bob", address = "100.0.0.2:6397"}]
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}

+ 16 - 0
shadow/peer/shadow.data.template/hosts/peer2/carol.yaml

@@ -0,0 +1,16 @@
+user: { name: "Carol", address: "100.0.0.2:6398" }
+conversations:
+  - group: "group1"
+    recipients:
+      - { name: "Alice", address: "100.0.0.1:6397" }
+      - { name: "Bob", address: "100.0.0.2:6397" }
+    bootstrap: 5.0
+    retry: 5.0
+    distributions:
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 15.0, std_dev: 30.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }

+ 0 - 16
shadow/peer/shadow.data.template/hosts/peer3/dave.toml

@@ -1,16 +0,0 @@
-user = {name = "Dave", address = "100.0.0.3:6397"}
-
-[[conversations]]
-group = "group2"
-recipients = [{name = "Alice", address = "100.0.0.1:6397"}, {name = "Bob", address = "100.0.0.2:6397"}]
-bootstrap = 5.0
-retry = 5.0
-
-[conversations.distributions]
-s = 0.5
-r = 0.1
-m = {distribution = "Poisson", lambda = 1.0}
-i = {distribution = "Normal", mean = 15.0, std_dev = 30.0}
-w = {distribution = "Normal", mean = 30.0, std_dev = 30.0}
-a_s = {distribution = "Normal", mean = 10.0, std_dev = 5.0}
-a_r = {distribution = "Normal", mean = 10.0, std_dev = 5.0}

+ 16 - 0
shadow/peer/shadow.data.template/hosts/peer3/dave.yaml

@@ -0,0 +1,16 @@
+user: { name: "Dave", address: "100.0.0.3:6397" }
+conversations:
+  - group: "group2"
+    recipients:
+      - { name: "Alice", address: "100.0.0.1:6397" }
+      - { name: "Bob", address: "100.0.0.2:6397" }
+    bootstrap: 5.0
+    retry: 5.0
+    distributions:
+      s: 0.5
+      r: 0.1
+      m: { distribution: "Poisson", lambda: 1.0 }
+      i: { distribution: "Normal", mean: 15.0, std_dev: 30.0 }
+      w: { distribution: "Normal", mean: 30.0, std_dev: 30.0 }
+      a_s: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }
+      a_r: { distribution: "Normal", mean: 10.0, std_dev: 5.0 }

+ 4 - 14
shadow/peer/shadow.yaml

@@ -1,9 +1,5 @@
 general:
   stop_time: 1h
-  # old versions of cURL use a busy loop, so to avoid spinning in this busy
-  # loop indefinitely, we add a system call latency to advance the simulated
-  # time when running non-blocking system calls
-  #model_unblocked_syscall_latency: true
 
 network:
   graph:
@@ -15,21 +11,15 @@ hosts:
   peer1:
     network_node_id: 0
     ip_addr: 100.0.0.1
-    processes:
+    processes: &proc
     - path: mgen-peer
-      args: "*.toml"
+      args: "*.yaml"
       start_time: 5s
   peer2:
     network_node_id: 0
     ip_addr: 100.0.0.2
-    processes:
-    - path: mgen-peer
-      args: "*.toml"
-      start_time: 5s
+    processes: *proc
   peer3:
     network_node_id: 0
     ip_addr: 100.0.0.3
-    processes:
-    - path: mgen-peer
-      args: "*.toml"
-      start_time: 5s
+    processes: *proc

+ 2 - 2
src/bin/mgen-client.rs

@@ -229,8 +229,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
     let _ = args.next();
     let mut handles = vec![];
     for config_file in args.flat_map(|a| glob::glob(a.as_str()).unwrap()) {
-        let toml_s = std::fs::read_to_string(config_file?)?;
-        let config: Config = toml::from_str(&toml_s)?;
+        let yaml_s = std::fs::read_to_string(config_file?)?;
+        let config: Config = serde_yaml::from_str(&yaml_s)?;
         for conversation in config.conversations.into_iter() {
             let handle: task::JoinHandle<Result<(), MessengerError>> = tokio::spawn(
                 manage_conversation(config.user.clone(), config.socks.clone(), conversation),

+ 2 - 2
src/bin/mgen-peer.rs

@@ -325,8 +325,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
     let mut handles = vec![];
 
     for config_file in args.flat_map(|a| glob::glob(a.as_str()).unwrap()) {
-        let toml_s = std::fs::read_to_string(config_file?)?;
-        let config: Config = toml::from_str(&toml_s)?;
+        let yaml_s = std::fs::read_to_string(config_file?)?;
+        let config: Config = serde_yaml::from_str(&yaml_s)?;
 
         // map from `recipient` to things the (user, recipient) reader/writer threads will need
         let mut recipient_map = HashMap::<String, ForIoThreads>::new();