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

Randomize ports #95

Draft
wants to merge 1 commit into
base: upgrade-node-wrapper
Choose a base branch
from
Draft

Randomize ports #95

wants to merge 1 commit into from

Conversation

desyncr
Copy link
Collaborator

@desyncr desyncr commented Aug 14, 2021

This PR includes changes to randomize fproxy.port and fcp.port configs at first run.

Closes #77

@desyncr desyncr self-assigned this Aug 14, 2021
@desyncr desyncr changed the base branch from master to upgrade-node-wrapper August 14, 2021 19:46
@desyncr
Copy link
Collaborator Author

desyncr commented Aug 15, 2021

The bootstrap page will need to determine the fproxy port. It can be handled as a query string.

}

// instantiate connector with given port
Connector connector = new Connector("127.0.0.1", prefs.getInt("fcp.port", 9481));
Copy link

Choose a reason for hiding this comment

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

no randomized IP? 127.x.y.z should be possible.

// store in shared preferences
SharedPreferences.Editor editor = prefs.edit();
editor.putInt("fproxy.port", new Random().nextInt(TOP_RANGE - BOTTOM_RANGE) + BOTTOM_RANGE);
editor.putInt("fcp.port", new Random().nextInt(TOP_RANGE - BOTTOM_RANGE) + BOTTOM_RANGE);
Copy link

Choose a reason for hiding this comment

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

also change the bindTo IP address?

@ArneBab
Copy link

ArneBab commented May 5, 2022

@desyncr Did you see the reviews here?

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.

Randomize IP binding and Port
2 participants