Modify code to use proxy aware NetAddresses.

This paves the way for support with proxied connections.