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

Select multiple listen IP addresses #674

Open
patschi opened this issue Jul 7, 2024 · 3 comments
Open

Select multiple listen IP addresses #674

patschi opened this issue Jul 7, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@patschi
Copy link

patschi commented Jul 7, 2024

Is your feature request related to a problem? Please describe.
I have multiple IPs on the server, but would like to have HFS only listen to two IPs:

  1. The IP 127.0.0.1 for local management via browser
  2. The IP 192.168.0.x for accessing the file server

Describe the solution you'd like
Allow the Listen interface to select multiple, specific IP addresses

P.S. Found your HFS2 implementation just a few months ago and has been brilliant ever since. Glad to see HFS3 on active development!

@rejetto
Copy link
Owner

rejetto commented Jul 8, 2024

hey!
are the other IPs v4 or v6?

@rejetto rejetto added the enhancement New feature or request label Jul 9, 2024
@patschi
Copy link
Author

patschi commented Jul 27, 2024

Somehow managed to miss the GitHub notification, sorry. The other IPs are IPv4.

@rejetto
Copy link
Owner

rejetto commented Aug 16, 2024

i've not been home lately.
i asked because if other ips were v6, you could could have used "any IPv4", but that's not the case.
the changes necessary for this feature are not trivial, and i don't plan to do it anytime soon.
anyway, if I were you, i would try something like this server_code to block unwanted connections

exports.middleware = ctx => {
    if (! /127\.0\.0\.1|192\.168\.0\./.test(ctx.socket.localAddress))
        ctx.socket.destroy()
}

(not tested)

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

No branches or pull requests

2 participants