mysteriumnetwork / node

Mysterium Network Node - official implementation of distributed VPN network (dVPN) protocol
https://mysterium.network
GNU General Public License v3.0
1.11k stars 311 forks source link

Node should adapt into always changing IP and location settings #3966

Closed chompomonim closed 2 years ago

chompomonim commented 3 years ago

Now, when we have easy to use windows/macOS installer, we may have people installing myst node into their laptops and be traveling together with them. Same node today can be in Poland and tomorrow in Sweden.

Lets take node 0x1a351ba3a8c328ee955bcf6879237a097d3f584d as example. It used to be connected into Swedish network in Friday, and now it is already in Lithuania but he is still reporting being in Sweden.

Most probably we should detect node's IP address change and adapt service proposals to that.

Snawoot commented 3 years ago
[02:05:51] dt1:~> nats sub --server=nats://testnet3-broker.mysterium.network:4222 "*.proposal-ping.v3" | fgrep -v Received | jq '. | select(.proposal.provider_id=="0x1a351ba3a8c328ee955bcf6879237a097d3f584d")'
02:05:59 Subscribing on *.proposal-ping.v3
{
  "proposal": {
    "id": 0,
    "format": "service-proposal/v3",
    "compatibility": 1,
    "provider_id": "0x1a351ba3a8c328ee955bcf6879237a097d3f584d",
    "service_type": "wireguard",
    "location": {
      "continent": "EU",
      "country": "SE",
      "city": "Unknown",
      "asn": 1257,
      "isp": "Tele2 Latvia",
      "ip_type": "cellular"
    },
    "contacts": [
      {
        "type": "nats/p2p/v1",
        "definition": {
          "broker_addresses": [
            "nats://testnet3-broker.mysterium.network:4222",
            "nats://testnet3-broker.mysterium.network:4222",
            "nats://167.233.11.60:4222"
          ]
        }
      }
    ],
    "quality": {
      "quality": 0,
      "latency": 0,
      "bandwidth": 0
    }
  }
}

node seem to push old location data even after it was moved, most likely not checking with location oracle in between proposal announces.

Donatas-MN commented 2 years ago

@Snawoot this one is fixed, right?

Snawoot commented 2 years ago

@Donatas-MN No, it's not fixed as it is described here. But I recall Dmitry made changes to monitoring agent to exclude nodes which country doesn't match observed for current exit IP.

soffokl commented 2 years ago

This is done: https://github.com/mysteriumnetwork/node/pull/4403