Skip to content

IP is leaked by CLM_EMPTY_MESSAGE sent by the Directory to all Servers in its list #3882

Description

@dingodoppelt

Alternatively we could simply ask any directory to not leak our IP. If that means we miss out on a few servers, so be it.
We could have a setting to enable it in the GUI which clearly explains the security implications of enabling the feature. It should be on by default though. Unless you have already blocked some IPs the pings will still reveal your IP so it is only useful if you have taken counter measures (of which there are none at the moment)

Originally posted by @dingodoppelt in #3545 (reply in thread)

Activity

  1. dingodoppelt commented on Aug 9, 2026

    @dingodoppelt
    MemberAuthor

    My proposal is to create a new protocol message which requests the server list from the Directory but tells it to not send a CLM_EMTPY_MESSAGE to all servers so the user's IP stays hidden.
    That will probably make a few servers unreachable so this option must be disabled by default. We could make it an advanced setting in the GUI or CLI argument. Servers reachable by --connect should still be visible in the list. It needs to be tested how many actually disappear.

  2. mcfnord commented on Aug 9, 2026

    @mcfnord
    Contributor

    About 35% need the punch.

    You'd lose the ping durations that drive coloring and sorting, but this could be replaced with geolocation distance between client and each server. Slow to collect at first but cache would work. Maybe each server should reveal its lat-lon somehow.

  3. dingodoppelt commented on Aug 10, 2026

    @dingodoppelt
    MemberAuthor

    About 35% need the punch.

    Would be interesting to know if those are mostly servers on residential ISPs or in data centers.

    You'd lose the ping durations that drive coloring and sorting, but this could be replaced with geolocation distance between client and each server. Slow to collect at first but cache would work. Maybe each server should reveal its lat-lon somehow.

    I think with the current implementation the servers just wouldn't appear at all (except for --showallservers). We don't care because there would be no way to reach those servers anyway.

  4. added
    feature request
    needs documentation
    on Aug 10, 2026
  5. self-assigned this
    on Aug 10, 2026
  6. mcfnord commented on Aug 10, 2026

    @mcfnord
    Contributor

    🤖 AI: Of the 34 Any Genre 1 servers needing punch: 18 are hosting/cloud (AWS, OCI, DigitalOcean, Linode, Hetzner, Vultr, Timeweb) and 16 are residential (Verizon, Spectrum, Shaw, Deutsche Telekom, Mega Cable) — roughly even.

  7. dingodoppelt commented on Aug 10, 2026

    @dingodoppelt
    MemberAuthor

    I'm still thinking about not leaking the IP by default. The documentation should explain that ports need to be open in order for the server to be reachable, alternatively -e localhost and enabling hole-punching should do the trick at least for private servers.
    Besides "KISS" and "Do one thing and do it well" we might want to add "Datensparsamkeit" (PbD) to our design principles as this gets more important every day.

  8. dcorson-ticino-com commented on Aug 10, 2026

    @dcorson-ticino-com
    Contributor

    -- this could be replaced with geolocation distance between client and each server.

    Please note that geolocation distance is pretty useless as a ping replacement.
    I see a factor of about 2 between the best and worst servers from here to NYC.
    That is, from useful to useless.

  9. mcfnord commented on Aug 10, 2026

    @mcfnord
    Contributor

    The documentation should explain that ports need to be open in order for the server to be reachable...

    I agree.

  10. dingodoppelt commented on Aug 10, 2026

    @dingodoppelt
    MemberAuthor

    Maybe the ping isn't as important as the server being shown on the list. On a connection attempt we could query the Directory to only provide hole punching assistance with that particular server the user wants to connect to. I'm still not a friend of the server list being designed "ping first" and therefore not sortable. If users could see all servers and sort them by location they could find their preferred server more easily.

  11. mcfnord commented on Aug 10, 2026

    @mcfnord
    Contributor

    🤖 AI: I infer identity to provide geolocation at the state / province / region level — seems about 70% accurate, and kept that coarse on purpose. But any joker can run the same correlation, pin someone far more precisely, and harass them — which is exactly what the Privacy Statement's "not ... available to third parties" denies. The honest wording was already written and closed without merging in jamuluswebsite#1092: one edit, no protocol change. Honesty in the privacy statement has to come first — no charades.

    Then the real fix, in two steps. Step one: separate identity inference from the IP, so a leaked address ties to no name — the direction of #3550. Step two: stop leaking client IP:PORTs to every server on the directory. The punch message is part of that — the directory hands your IP to every listed server whether you ping it or not. --connect should punch for parity — people expect it to "just work" like the dialog's connect — but that's convenience, not privacy: a punch followed by a join correlates as well as the dialog's ping-stop. A new flag, --connect-pingless, could take on the existing behavior of --connect.

  12. mcfnord commented on Aug 10, 2026

    @mcfnord
    Contributor

    Please note that geolocation distance is pretty useless as a ping replacement.
    I see a factor of about 2 between the best and worst servers from here to NYC.
    That is, from useful to useless.

    So it's partly useful? I really like the idea of a server publishing its own lat-lon, because I think a lot of the geolocation failure is due to IPs changing their geolocation recently. But if servers self-identified locaiton (collaborating with the operator and a service, presumably), that'd limit the error opportunity to the client, and there the user could again confirm or modify the claimed lat-lon.

  13. dingodoppelt commented on Aug 10, 2026

    @dingodoppelt
    MemberAuthor

    --connect should punch for parity — people expect it to "just work" like the dialog's connect

    Nonetheless we should introduce a new protocol message for that. This message would only assist in hole-punching for that particular server and not every server in the list.
    Down the road we could have the connect dialogue do something similar if we can figure out how to display servers that can't be pinged without hole-punching.

    Edit: something like --connect [DirectoryAddr:]<IP>[:<Port>]

  14. softins commented on Aug 10, 2026

    @softins
    Member

    Down the road we could have the connect dialogue do something similar if we can figure out how to display servers that can't be pinged without hole-punching.

    This is already done if the client was started with --showallservers. Maybe that control should be a checkbox in the connect dialog so that users can turn it on or off?

    For what it's worth, it doesn't bother me in the slightest having my IP sent to all the servers in the list when I display a directory in the connect dialog. I must admit I struggle a bit to understand why it bothers some people so much.

  15. dingodoppelt commented on Aug 10, 2026

    @dingodoppelt
    MemberAuthor

    This is already done if the client was started with --showallservers. Maybe that control should be a checkbox in the connect dialog so that users can turn it on or off?

    Yes, --showallservers can do some of the things we would need, but sorting is kind of broken and it doesn't look as nice as the regular server list.
    A checkbox would be nice because you'd see the changes immediately.

    For what it's worth, it doesn't bother me in the slightest having my IP sent to all the servers in the list when I display a directory in the connect dialog. I must admit I struggle a bit to understand why it bothers some people so much.

    I can understand that but we can't control which servers register with the directory with whatever intent and potential changes to the source code. Every user in the world pings every server in the world while they just want to connect to a single server. This is a privacy nightmare for some users and we all live in different parts of the world with different legislation and some lucky users have the right to protect their data and we should enable them to do so as best as we can.

  16. pljones commented on Aug 11, 2026

    @pljones
    Collaborator

    I can understand that but we can't control which servers register with the directory with whatever intent and potential changes to the source code.

    There are two methods in Jamulus already: whitelist by IP and by version. You can set up a Directory and say which Servers you want to register. If a Client could specify they want to use that Directory as their trusted Directory, in favour of the Public Directories, then the Client user and Directory provider would have control.

  17. mcfnord commented on Aug 12, 2026

    @mcfnord
    Contributor

    whitelist by IP and by version

    What's the parameter for by-version? I looked but couldn't find it. If it's based on version string, and anyone can specify their version string, that won't help here, because this is based on dishonest actors rather than honest ones. Sometimes I think about a cryptographically authenticated server binary, but this gets impossibly complicated when I consider variability among different platforms (ARM/x86) and built types (GUI/headless). Even without that complexity I guess it would still rely on a server reporting its provenance truthfully. Perhaps the viable architecture is a secret token produced after a sign-up through an identity provider like Google, but ain't nobody got time for that.

  18. dingodoppelt commented on Aug 13, 2026

    @dingodoppelt
    MemberAuthor

    There are two methods in Jamulus already: whitelist by IP and by version. You can set up a Directory and say which Servers you want to register. If a Client could specify they want to use that Directory as their trusted Directory, in favour of the Public Directories, then the Client user and Directory provider would have control.

    My concern is with the official Directories, not private ones. If a client could mark Servers "trusted" in the connect dialogue that whitelist could be passed to the Directory and we'd see pings and we could connect to those Servers in question. That mechanism could be reused for --connect [directory:]<ip>[:<port>]

  19. pljones commented on Aug 13, 2026

    @pljones
    Collaborator

    The Directory isn't there to be controlled by a single Client. It exists to service Servers.

  20. dingodoppelt commented on Aug 13, 2026

    @dingodoppelt
    MemberAuthor

    The Directory isn't there to be controlled by a single Client. It exists to service Servers.

    Sorry, I don't really understand what you're getting at here

  21. pljones commented on Aug 13, 2026

    @pljones
    Collaborator

    The Directory isn't there to be controlled by a single Client. It exists to service Servers.

    Sorry, I don't really understand what you're getting at here

    You asked for a feature by which some random Client can control how a Directory behaves. That's outside the scope of both Client and Directory.

    Or maybe you could have phrased the feature request differently.

    A Favourite Servers feature where the Client knows the name, IP address and port of some Servers, along with the last known Directory with which they were registered. To Quick Connect, it asks the Directory for the server list, triggering the hole punch, confirms the stored Server details and connects.

    However, this still has the broadcast of the Client IP.

    The alternative could be to ask the Directory to pre-filter the server list for the desired name, address and port, thus limiting the punch. An empty list response would mean the server was not known. A match would mean a connection attempt should succeed.

    Effectively an extended req server list with filter.

  22. dingodoppelt commented on Aug 13, 2026

    @dingodoppelt
    MemberAuthor

    The Directory isn't there to be controlled by a single Client. It exists to service Servers.

    Sorry, I don't really understand what you're getting at here

    You asked for a feature by which some random Client can control how a Directory behaves. That's outside the scope of both Client and Directory.

    That was not my intention. The client would simply request the server list, just as before. The Directory just wouldn't send CLM_EMPTY_MESSAGE. I don't see where there is control over the Directory involved. I'll try to explain it in code

    Or maybe you could have phrased the feature request differently.

    A Favourite Servers feature where the Client knows the name, IP address and port of some Servers, along with the last known Directory with which they were registered. To Quick Connect, it asks the Directory for the server list, triggering the hole punch, confirms the stored Server details and connects.

    That's a different feature request actually. For a start I'd just like to be able to request the server list without hole punching as in acf4d68
    Maybe a second, more granular approach could follow to selectively send the empty message
    (--connect [directoryAddr:]<ip>[:port] reusable in GUI as well)

    However, this still has the broadcast of the Client IP.

    Hence this issue.

    The alternative could be to ask the Directory to pre-filter the server list for the desired name, address and port, thus limiting the punch. An empty list response would mean the server was not known. A match would mean a connection attempt should succeed.

    Effectively an extended req server list with filter.

    Actually a reduced server list because unreachable servers wouldn't be shown. (Which I'm fine with, as long as I don't need to connect to them)

  23. mcfnord commented on Aug 14, 2026

    @mcfnord
    Contributor

    🤖 AI: @dingodoppelt's punch-for-one is the solution. But no new param needed, just fix the currently-broken --connect with punch-for-one.

    The Directory punches so Servers are reachable. Today it punches every Server on every list request — nearly all for Clients that will never connect. Punch-for-one delivers the same punch at the moment it is used. That is not a Client controlling the Directory; it is the same service, aimed. The only Server that learns your IP:PORT is the one you are already connecting to.

    And it needs no new message. CLM_REQ_SERVER_LIST (1007) is sent with an empty body, and the Directory never reads that body — the dispatcher does not even pass it. So:

    • Body = target IPv4 + port (the same 6 bytes CLM_SEND_EMPTY_MESSAGE already carries): the Directory punches that one Server, and skips both the fan-out and the list.
    • Body empty: unchanged.
    • Older Directory: ignores the body and does today's global punch, so no version negotiation is needed.

    A Client can then hole-punch for a single connection instead of requesting the whole server list. --connect already carries the address, so it needs no new client parameter.

  24. dingodoppelt commented on Aug 14, 2026

    @dingodoppelt
    MemberAuthor

    And it needs no new message. CLM_REQ_SERVER_LIST (1007) is sent with an empty body, and the Directory never reads that body — the dispatcher does not even pass it.

    Good catch. I refactored my changes in acf4d68

    Edit: This is not yet working on --connect, only the Directory part has changed so far

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

Metadata

Metadata

Assignees

Labels

feature requestneeds documentation

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions