Skip to content

Bind on multiple addresses for the same dumbproxy instance #187

Open

Description

@0x192

Hello,

Have you considered allowing this setup?

bind-address 192.168.0.1:4443,127.0.0.1:4443

I can workaround this by using bind-reuseport and having 2 dumbproxy instances but it would be nice to have a single instance.

I know of 0.0.0.0 but I prefer only binding on specific interfaces even if I can block the access with the firewall.

Activity

  1. self-assigned this
    on Feb 1, 2026
  2. Snawoot commented on Feb 1, 2026

    @Snawoot
    Member

    Hello!

    bind-reuseport is not really needed to bind two instances on the same port on different addresses. It's needed to balance load between two instances on exactly the same address-port. It's was needed for graceful handover between instance restarts on really busy installations.

    I considered listening multiple sockets, but didn't convince myself it adds more value than creates complications. My doubts were like:

    • How far we want to go with customization? What if addresses need different bind options? Different listener wrappers (e.g. TLS enabled on external, but it doesn't make sense on localhost)? What if user wants one instance and one socks port and one HTTP port?
    • How would we handle situation when one address was bound (maybe got first connection in conn backlog), but another one failed to bind? Probably it would be right to shutdown immediately, which makes server more fragile than a single port server.

    I do recognize value in what you're asking for, and it's common to see that implemented in servers. However, it seems that proper implementation would require to redefine how listeners are defined in configuration and their options specified, most likely in backwards incompatible way. And it's mostly fruitless: even in your case you can get away with just single 192.168.0.1 bind and use it on local machine instead of 127.0.0.1.

    I'll leave this issue open, maybe more people requesting this feature will emerge or maybe even someone will be able to contribute and implement new sound design for listeners configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions