this.socks = false;
}
+ // Net. interface this connection should be made through
+ this.outgoing_interface = false;
+
// Options sent by the IRCd
this.options = Object.create(null);
this.cap = {requested: [], enabled: []};
var outgoing;
// Decide which net. interface to make the connection through
- if (global.config.outgoing_address) {
+ if (that.outgoing_interface) {
+ // An specific interface has been given for this connection
+ outgoing = this.outgoing_interface;
+
+ } else if (global.config.outgoing_address) {
+ // Pick an interface from the config
if ((family === 'IPv6') && (global.config.outgoing_address.IPv6)) {
outgoing = global.config.outgoing_address.IPv6;
} else {