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 preferredPort (default 13331) to core opts #101

Merged
merged 2 commits into from
Jan 12, 2021
Merged

add preferredPort (default 13331) to core opts #101

merged 2 commits into from
Jan 12, 2021

Conversation

cblgh
Copy link
Member

@cblgh cblgh commented Jan 11, 2021

add a preferredPort to listen for hyperswarm connections on. the
preferredPort is smart enough that if it is blocked, hyperswarm will try
preferredPort+1, preferredPort+2 before giving up. see the hyperswarm code:
https://github.com/hyperswarm/network/blob/ad41b0c2ac19dbf92865e481282ba6ac6e513d57/index.js#L150-L162

this allows people with highly configured firewalls to port forward a
single port for cabal, which they can themselves configure in their
clients.

fix #98

add a preferredPort to listen for hyperswarm connections on. the
preferredPort is smart enough that if it is blocked, hyperswarm will try
preferredPort+1, preferredPort+2 before giving up. see the hyperswarm code:
https://github.com/hyperswarm/network/blob/ad41b0c2ac19dbf92865e481282ba6ac6e513d57/index.js#L150-L162

this allows people with highly configured firewalls to port forward a
single port for cabal, which they can themselves configure in their
clients.

fix #98
@cblgh
Copy link
Member Author

cblgh commented Jan 11, 2021

this is what the hyperswarm object looks like when i link this PR to cabal-cli and use it, so i think it works
image

@Miskerest
Copy link

Thanks @cblgh! This makes it a lot easier for people with server space to support the project. I'll test out when I have some free time!

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.

Specify a default listening port
2 participants