Many popular irc clients support selecting the IP onto which to bind outgoing connectiongs. This is mostly popular on servers with multiple IP addresses, and is not necessarily too useful for a desktop client. I'm, however, looking into telepathy as a base of a multi-protocol-notifier/information bot, and choosing the IP would be really beneficial. This might serve also people who use VPN to a company internal network (although in these cases it should work automatically, but just in case). The point is to do a bind() for the socket (with 0 port) before connect()ing.
Created attachment 28699 [details] [review] Simple patch that adds the functionality in question This is a simple patch that adds the "local-ip-address" for connections and uses it for bind()ing before connect()ing. It uses the IdleDnsResolver already present (disabling the port != 0 sanity check) as it is no longer valid). It isn't perfect, the local-ip-address should also enforce usage of IPv6 if applicable, but it's a start. Changing the family-selection-heuristic would make the patch conciderably more complex.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-idle/issues/10.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.