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

#942 filter out link local address broadcasting #141

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

Conversation

zarmin
Copy link

@zarmin zarmin commented Oct 1, 2019

Copy link
Contributor

@knight9999 knight9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Please don't use hard coded IP address (i.e. ' var LINK_LOCAL_ADDRESS_PREFIX = '169.254.';').
Instead of this, please use CONFIG_FILE defined in

var CONFIG_FILE = path.join(USER_CORDOVA, 'monaca_config.json');

Please get the filtering IP address from CONFIG_FILE and use it if the address is defined.
The config file is simple json file named monaca_config.json in /YourHome/.cordova/monaca_config.json.
For example, monaca_config.json should be like

{
 "http_proxy": "",
 "update_check_time": "1519962109517"
 "ignore_broadcast": ["111.222.333.444", "123.456.789.012" ]
}

@zarmin
Copy link
Author

zarmin commented Nov 7, 2019

It is an implementation scoped thing, rather than a configuration one.

The link-local address range is listed in an official RFC, https://tools.ietf.org/html/rfc3927 .
On newer MacOS (last few years) versions broadcasting is forbidden on link-local networks for unprivileged applications (even if the network interface has a BROADCAST flag on always).
So it's quite pointless to allow the user to configure it freely.

I can make it more generic, but it might be better to put it in the src/config.json.

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.

2 participants