Allow configuration of IP addresses to use for outgoing connections

Fixes #285