Aussie living in the San Francisco Bay Area.
Coding since 1998.
.NET Foundation member. C# fan
https://d.sb/
Mastodon: @dan@d.sb

  • 0 Posts
  • 48 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle

  • it makes connecting to localhost as easy as http://0:8080/ (for port 8080, but omit for port 80).

    The thing is that it’s not supposed to work, so it’s essentially relying on undefined behaviour. Typing [::1]:8080 is nearly as easy.

    skimming through these PRs, at least for WebKit, I don’t see tests for shorthand IPs like 0 (and no Apple device to test with). What are the chances they missed those…?

    I haven’t seen the PRs, but IP comparison should really be using the binary form of the IPv4 address (a 32-bit number), not the human-friendly form.


  • From that RFC:

    0.0.0.0/8 - Addresses in this block refer to source hosts on "this"
    network.  Address 0.0.0.0/32 may be used as a source address for this
    host on this network; other addresses within 0.0.0.0/8 may be used to
    refer to specified hosts on this network ([RFC1122], Section
    3.2.1.3).
    

    (note that it only says “source address”)

    which was based on RFC 1122, which states:

    We now summarize the important special cases for Class A, B,
    and C IP addresses, using the following notation for an IP
    address:
    
        { <Network-number>, <Host-number> }
    
    or
        { <Network-number>, <Subnet-number>, <Host-number> }
    
    ...
    
    (a)  { 0, 0 }
    
    This host on this network.  MUST NOT be sent, except as
    a source address as part of an initialization procedure
    by which the host learns its own IP address.
    
    See also Section 3.3.6 for a non-standard use of {0,0}.
    

    (section 3.3.6 just talks about it being a legacy IP for broadcasts - I don’t think that even works any more)


  • Seems like a TCP/IP stack issue rather than a browser issue… 0.0.0.0 is not supposed to be a valid address (in fact, no IPv4 address with 0 as the first octet is a valid destination IP). The network stack should be dropping those packets.

    0.0.0.0 is only valid in a few use cases. When listening for connections, it means “listen on all IPs”. This is a placeholder that the OS handles - it doesn’t literally use that IP. Also, it’s used as the source address for packets where the system doesn’t have an IP yet (eg for DHCP). That’s it.








  • Just tried out that playbook to set up a staging server, and it works pretty well.

    I feel like it’s a bit too magical though. I like knowing how all the software I’m using is installed and configured, and introducing another layer of abstraction makes that harder. I have particular ways things like my web server (Nginx), database servers, Let’s Encrypt (certbot), etc are configured and want to keep things that way. I think I’ll just use the Ansible playbook for the staging server, and set up the real server using the Docker containers directly, based on documentation from the upstream projects (Synapse, etc)

    It looks like they have both Docker containers and Debian packages avaliable, so I’ll have to see if it’s worth using the Debian packages instead.




  • most people are on discord

    There’s a lot of people on Discord (around 200 million monthly active users) but it’s still the smallest out of all the major messaging services that support group chats. For example, Telegram has over double the number of users, and WhatsApp has 10x the users.

    For open source projects in particular, something that integrates with Github and Gitlab login (like Gitter which is now powered by Matrix) is a better choice, as developers are practically guaranteed to have one of those accounts.




  • In order to make it into a Discord or Zoom competitor you would need to solve far higher bandwidth things like HD video and low latency audio, and both of thouse are fundamentally very different things for a server to handle as compared to high latency short text messages.

    A large number of Discord servers just use text.

    For video, maybe integrate into something that already exists, like Jitsi? Instead of trying to build one single app that handles everything, maybe it would be nice to have a suite of apps that all work together and can all use the same login.

    A lot of video conferencing systems are already mostly peer-to-peer, at least for enterprise apps. Skype was originally peer-to-peer too. NAT traversal is usually provided by STUN servers. There’s some issues like that (for example it reveals the user’s IP addresses) but you could proxy everything through a TURN server to solve that.

    Peer to peer is the best way to implement end-to-end encrypted communication.

    Having said that, very large groups can benefit from a client-server model, like what Zoom does.