socks5: factor out compute_domain
socks5: factor out compute_domain

Ziemin/telepathy-gabble,Ziemin/telepathy-gabble,Ziemin/telepathy-gabble,mlundblad/telepathy-gabble,mlundblad/telepathy-gabble,community-ssu/telepathy-gabble,community-ssu/telepathy-gabble,jku/telepathy-gabble,jku/telepathy-gabble,mlundblad/telepathy-gabble,community-ssu/telepathy-gabble,Ziemin/telepathy-gabble,community-ssu/telepathy-gabble,jku/telepathy-gabble