|
@@ -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).
|