Skip to content
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 support for running as a directly node required module #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willscott
Copy link
Member

Address #7

With this change to make alternate checks if freedom isn't around, you can run in node directly:

var PortControl = require('freedom-port-control');
var controller = new PortControl();
controller.probeProtocolSupport().then(function(result) {
  console.log(result);
});

This change is Reviewable

@agallant
Copy link

agallant commented Jun 3, 2016

If this works, it'd be good to get it in and cut a new release - been trying to get simple-socks and zork working in node and dug deep enough to hit this issue.

@kennysong
Copy link
Member

Thanks for doing this, Will! In addition to the socket wrappers, I think the URL object and the XMLHttpRequest lines might also need to be modified to work in node.

@willscott
Copy link
Member Author

it'll take me a bit to get back to this. I remember when i looked at this
in march i was able to run it with reasonable output, but don't have the
diversity of nat types to test against, so don't know if functionality is
complete at this point. What i remember is that with this change is can be
required and doesn't throw errors, so this might be an acceptable merge
with a subsequent ticket to clean up those behaviors.

On Fri, Jun 3, 2016 at 3:09 PM, Kenny Song [email protected] wrote:

Thanks for doing this, Will! In addition to the socket wrappers, I think
the URL object
https://github.com/freedomjs/freedom-port-control/blob/willscott-node/src/upnp.js#L60
and the XMLHttpRequest
https://github.com/freedomjs/freedom-port-control/blob/willscott-node/src/upnp.js#L295
lines might also need to be modified to work in node.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#9 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAaIp3oVXc6uA4z2ejZUvFaR1YFDyQ_xks5qIKYkgaJpZM4H3mve
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants