Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Add listen address option, useful for IPv6 #37

merged 1 commit into from

2 participants


I have a need for Bouncy to listen on both IPv4 and IPv6, but didn't find an option to specify that when using the bouncy executable, so I have implemented it as an optional third option, which lets me specify :: as the listen address making Bouncy listen on all IPv4 and IPv6 addresses available.
If no listen address is specified, is used which has the same effect as without this patch.

@substack substack merged commit 8bffe3b into substack:master
@Tenzer Tenzer deleted the unknown repository branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +3 −0  README.markdown
  2. +2 −1  bin/bouncy.js
3  README.markdown
@@ -56,6 +56,9 @@ Use a colon-separated string to specify a host and port in a route.
Use `""` for the host as a default route.
+You can optionally specify a listen address as the third parameter, it defaults
+to ``. Specify `::` to listen on both IPv4 and IPv6 addresses.
bouncy(opts={}, cb)
3  bin/bouncy.js
@@ -1,6 +1,7 @@
#!/usr/bin/env node
var configFile = process.argv[2];
var port = parseInt(process.argv[3], 10);
+var address = process.argv[4] || '';
if (!configFile || !port) {
console.error('Usage: bouncy [routes.json] [port]');
@@ -45,4 +46,4 @@ bouncy(function (req, bounce) {
res.write('no such host');
+}).listen(port, address);
Something went wrong with that request. Please try again.