Skip to content
This repository

Add localPort parameter on net.connect() #7092

Closed
50ndr33 opened this Issue · 4 comments

3 participants

50ndr33 Timothy J Fontaine Fedor Indutny
50ndr33

Being able to decide which local port should be used when opening a TCP socket is essential to do for example TCP hole punching. Please add this feature.

Timothy J Fontaine
Owner

I was going to add this myself, but if you can get a PR done before me that'd be great

50ndr33

I have very little experience in C. If you know the API better, you should do it, as it requires a bit editing.

Timothy J Fontaine tjfontaine referenced this issue from a commit in tjfontaine/node
Timothy J Fontaine tjfontaine net: add localPort to connect options
Expose localPort for binding to a specific port for outbound
connections.

If localAddress is not specified '0.0.0.0' is used for ip4 and '::'
for ip6 connections.

Fixes #7092
3fef87c
Timothy J Fontaine tjfontaine referenced this issue from a commit in tjfontaine/node
Timothy J Fontaine tjfontaine net: add localPort to connect options
Expose localPort for binding to a specific port for outbound
connections.

If localAddress is not specified '0.0.0.0' is used for ip4 and '::'
for ip6 connections.

Fixes #7092
0f4fa5f
Timothy J Fontaine tjfontaine closed this issue from a commit
Timothy J Fontaine tjfontaine net: add localPort to connect options
Expose localPort for binding to a specific port for outbound
connections.

If localAddress is not specified '0.0.0.0' is used for ip4 and '::'
for ip6 connections.

Fixes #7092
59baab2
50ndr33

@tjfontaine did you just update it?

Fedor Indutny
Collaborator

@50ndr33 I guess it is resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.