Expose external ports to application configuration.

Fixes #200.
Perhaps `frozenset()` would make a better default for `ports`?