-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to specify bind address when connecting #146
Conversation
Eagerly awaiting acceptance of this into upstream. |
It seems to me this would work with ssl? It looks like you're copying the secure stuff in to |
I believe that fixes it so the other options get passed through to |
Sup, need anything else done? |
Can you update this so it merges cleanly, and then we can revisit it? |
#241 possible with Webirc |
creds = {}; | ||
if (typeof self.opt.secure == 'object') { | ||
// copy "secure" opts to options passed to connect() | ||
for (var f in self.opt.secure) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll want to add a hasOwnProperty
guard here:
for (var f in creds) {
if (creds.hasOwnProperty(f)) {
connectionOpts[f] = creds[f]
}
}
Looks pretty good to me! add that guard and a rebase and we'll get this merged. |
Okay, standby |
@@ -39,6 +40,9 @@ Client | |||
If you set `selfSigned` to true SSL accepts certificates from a non trusted CA. | |||
If you set `certExpired` to true, the bot connects even if the ssl cert has expired. | |||
|
|||
`localAddress` is the address to bind to when connecting. Not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you got this working with the secure option. Probably should update this doc.
Actually, this is based against the wrong branch now. I think you may need to re-open this PR against the |
Commit 5c02ec4 makes rebasing highly problematic |
Yeah, this is why I think it will probably be easier to just open a new PR against the 0.3.x branch and add the changes there. Rebasing against that will be a huge pain. |
I like this PR a lot. |
+1. I have a box with a bunch of IPs so I can test this pretty easily. Will look at doing that today and will merge assuming all goes well. |
Add option to specify bind address when connecting
For machines with multiple IPs or people who want to use IPv6