-
Notifications
You must be signed in to change notification settings - Fork 42
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
bind to specific interface for tcp listener #567
Comments
I haven't tried this but it seems to be useful, so I'm OK to merge the PR. One question here: will bind_interface conflict with bind address? |
Yes. But of course besides the interface there are other socket options that are not conflicting.
as map would be something like:
where Dunno what you think about that or how you see it. |
Looks good. Only one suggestion for the map format: bind:
interface: <ifname> # only parse as interface name
address: <addr str> # this is already existed and parsed as socket address string
.. opther options |
What to do if both interface and address are defined? Error? Or one over another? |
I think they can be set separately. There may be some cases that one want to listen on an interface but also with one fixed port, such as listen on eth0 and port 80. I'm not sure whether this is possible, can you do some test? |
Correct me if I'm wrong, but currently it does not seem to be possible to bind a tcp listener (server), e.g. as used by a sni or http proxy, to a specific (network) interface. With escapers this is possible via
bind_interface
. Given you already have all the socks support under the hoodit should be trivial to add, but I would like to know your input on this and whether or not I am missing something here.Alternatives options:
0.0.0.0
or[::]
one could bind to the address within the network interfaceThe text was updated successfully, but these errors were encountered: