Skip to content

make tox use loopback device on linux when UDP and local lan is turned on #2749

Closed
@zoff99

Description

now tox is not using lo: (loopback) 127.0.0.1 to connect to devices on the same host. even when UDP and local lan is turned on.
now tox will only listen on the eth0: device (or whatever your LAN device is called)
loopback can get much higher transfer speeds than LAN.

this shows a hackish PoC how to enable 127.0.0.1
https://gist.github.com/zoff99/f8d605514a89d995c526bd6577a49051
(but this ONLY uses 127.0.0.1 and no other network device)

we should add an enhancement to detect local loopback device and make tox also listen on that for connections.
and probably the same for the other direction (trying to connect to a node on local loopback)

Activity

added
enhancementNew feature for the user, not a new feature for build script
on Apr 5, 2024
iacore

iacore commented on Jul 10, 2024

@iacore

I traced the problem back to LAN_discovery.c:186 in lldb.

        if (ip->ip.v4.uint32 == 0) {
            continue; // this line gets run
        }

Basically, lo has no broadcast address. It should be handled differently here.

added this to the v0.2.x milestone on Nov 15, 2024
modified the milestones: v0.2.x, v0.2.21 on Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature for the user, not a new feature for build script

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      make tox use loopback device on linux when UDP and local lan is turned on · Issue #2749 · TokTok/c-toxcore