Skip to content

Commit

Permalink
Merge pull request #260 from JesseEstum/example_config
Browse files Browse the repository at this point in the history
Add example config.json file to README.md
  • Loading branch information
sirupsen authored Sep 4, 2019
2 parents 4ca1edd + 18165c8 commit cfe8289
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,25 @@ separate configuration file. We use `config/toxiproxy.json`. This file can be
passed to the server using the `-config` option, or loaded by the application
to use with the `populate` function.

An example `config/toxiproxy.json`:

```json
[
{
"name": "web_dev_frontend_1",
"listen": "[::]:18080",
"upstream": "webapp.domain:8080",
"enabled": true
},
{
"name": "web_dev_mysql_1",
"listen": "[::]:13306",
"upstream": "database.domain:3306",
"enabled": true
}
]
```

Use ports outside the ephemeral port range to avoid random port conflicts.
It's `32,768` to `61,000` on Linux by default, see
`/proc/sys/net/ipv4/ip_local_port_range`.
Expand Down

0 comments on commit cfe8289

Please sign in to comment.