pick IP family by local address in freedom

This commit is contained in:
Darien Raymond
2018-11-19 21:36:46 +01:00
parent 9a83561504
commit 8a82a3664c
6 changed files with 67 additions and 31 deletions
+8
View File
@@ -114,6 +114,14 @@ func (h *Handler) Dispatch(ctx context.Context, link *transport.Link) {
}
}
// Address implements internet.Dialer.
func (h *Handler) Address() net.Address {
if h.senderSettings == nil || h.senderSettings.Via == nil {
return nil
}
return h.senderSettings.Via.AsAddress()
}
// Dial implements internet.Dialer.
func (h *Handler) Dial(ctx context.Context, dest net.Destination) (internet.Connection, error) {
if h.senderSettings != nil {