Skip to content

Onlynet=ipv4 disables Tor advertisements #25336

@kroese

Description

@kroese

I want my node to accept inbound IPv4 and Tor connections, but not make any outbound Tor connections. So I set:

listen=1
server=1
onlynet=ipv4
onion=x.x.x.x:9050
externalip=x.x.x.x
externalip=xxx.onion

I expect that onlynet will limit the outgoing connections to IPv4 only, and onion combined with externalip allow for Tor incoming connections.

Actual behavior

Tor gets completely disabled:

    {
      "name": "onion",
      "limited": true,
      "reachable": false,
      "proxy": "x.x.x.x:9050"
    }

Limited is true and reachable is false. Also it does not advertise the onion address, just the IPv4:

  "localaddresses": [
    {
      "address": "x.x.x.x",
      "port": 8333,
      "score": 270
    }
    ]

As soon as I remove the onlynet flag, Tor starts working and the address gets advertised.

It seems this behaviour is conflicting with the documentation (which state that onlynet affects outbound only).

So is this a bug and if not, how can I reach my goal of limiting outbound to non-tor addresses?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions