NAT detect

Adds in some methods that determine if you are behind a NAT when connecting to a remote peer. Also prevents connection to loopback addresses
Please do! I meant it to be :D

—
Sent from Mailbox

On Sun, Nov 2, 2014 at 5:19 PM, Jeromy Johnson <notifications@github.com>
wrote:

>> @@ -99,5 +106,33 @@ func Handshake3(ctx context.Context, c Conn) error {
>>  		return err
>>  	}
>>  
>> +	nat, err := CheckNAT(remoteH.GetObservedAddr())
>> +	if err != nil {
>> +		log.Errorf("Error in NAT detection: %s", err)
>> +	}
>> +	if nat {
>> +		log.Warning("We are probably behind a NAT!")
> im gonna keep the baby steps gif in there. 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/jbenet/go-ipfs/pull/253/files#r19717064