Giter VIP home page Giter VIP logo

Comments (9)

unixfox avatar unixfox commented on August 17, 2024

Now Hetzner network is being classified as US country even tho the server is in Finland.

The IPv6 address of searx.fmac.xyz is recognized as originating from the US even tho it is from Finland.

Affected searx instances: searx.prvcy.eu, searx.xyz, suche.uferwerk.org, search.snopyta.org, searx.7m.ee, recherche.catmargue.org and more.

from searx-space.

dalf avatar dalf commented on August 17, 2024

With 631d7d1
searx.space uses ip2location.

Moreover, this commit 62bb962 fixes an issue that was (?) blocking some updates.

At least the results are on the right continent.

Also it is possible a hard-coded ; @unixfox , do you think it can useful?

from searx-space.

unixfox avatar unixfox commented on August 17, 2024

Well, the issue is that hard-coding a country is not a good idea with the huge amount of Searx instances in the list. Multiple Searx instance could change their location within a month, and we would have to track that and manually update to the new country every month.

I think at least ip2location give more accurate results. It is still considering that my IPv6 address for searx.be is in the USA, but at least for the IPv4 it's the correct location. And it's the now the correct location for all the instances hosted at Hetzner.

I'll let this issue open in case I find a better IP geolocation provider, but you already did a good job with ip2location. Thank you.

from searx-space.

unixfox avatar unixfox commented on August 17, 2024

I just found a better geolocation database than ip2location, it's DB-IP a free downloadable lite database which is available here: https://db-ip.com/db/download/ip-to-country-lite

They are the only one that offer very accurate country geolocation, at least it detects that my IPv6 address is in the Netherlands instead of in the USA:

[emilien@pcryzen]: ~>$ mmdblookup -f dbip-country-lite-2021-06.mmdb -i 2603:c022:c002:3500::dead:beef

  {
    "continent": 
      {
        "code": 
          "EU" <utf8_string>
        "geoname_id": 
          6255148 <uint32>
        "names": 
          {
            "de": 
              "Europa" <utf8_string>
            "en": 
              "Europe" <utf8_string>
            "es": 
              "Europa" <utf8_string>
            "fa": 
              " اروپا" <utf8_string>
            "fr": 
              "Europe" <utf8_string>
            "ja": 
              "ヨーロッパ大陸" <utf8_string>
            "ko": 
              "유럽" <utf8_string>
            "pt-BR": 
              "Europa" <utf8_string>
            "ru": 
              "Европа" <utf8_string>
            "zh-CN": 
              "欧洲" <utf8_string>
          }
      }
    "country": 
      {
        "geoname_id": 
          2750405 <uint32>
        "is_in_european_union": 
          true <boolean>
        "iso_code": 
          "NL" <utf8_string>
        "names": 
          {
            "de": 
              "Niederlande" <utf8_string>
            "en": 
              "Netherlands" <utf8_string>
            "es": 
              "Países Bajos (los)" <utf8_string>
            "fa": 
              "هلند" <utf8_string>
            "fr": 
              "Pays-Bas" <utf8_string>
            "ja": 
              "オランダ" <utf8_string>
            "ko": 
              "네덜란드" <utf8_string>
            "pt-BR": 
              "Holanda" <utf8_string>
            "ru": 
              "Нидерланды" <utf8_string>
            "zh-CN": 
              "荷兰" <utf8_string>
          }
      }
  }

It also recognizes the correct location of the IPv6 address for some Searx instances that are hosted at Hetzner. For instance currently the IPv6 address of searx.prvcy.eu is displayed on searx.space as being in Germany but it is in fact in Finland:

[emilien@pcryzen]: ~>$ mmdblookup -f dbip-country-lite-2021-06.mmdb -i 2a01:4f9:c010:1edb::1
  {
    "continent": 
      {
        "code": 
          "EU" <utf8_string>
        "geoname_id": 
          6255148 <uint32>
        "names": 
          {
            "de": 
              "Europa" <utf8_string>
            "en": 
              "Europe" <utf8_string>
            "es": 
              "Europa" <utf8_string>
            "fa": 
              " اروپا" <utf8_string>
            "fr": 
              "Europe" <utf8_string>
            "ja": 
              "ヨーロッパ大陸" <utf8_string>
            "ko": 
              "유럽" <utf8_string>
            "pt-BR": 
              "Europa" <utf8_string>
            "ru": 
              "Европа" <utf8_string>
            "zh-CN": 
              "欧洲" <utf8_string>
          }
      }
    "country": 
      {
        "geoname_id": 
          660013 <uint32>
        "is_in_european_union": 
          true <boolean>
        "iso_code": 
          "FI" <utf8_string>
        "names": 
          {
            "de": 
              "Finnland" <utf8_string>
            "en": 
              "Finland" <utf8_string>
            "es": 
              "Finlandia" <utf8_string>
            "fa": 
              "فنلاند" <utf8_string>
            "fr": 
              "Finlande" <utf8_string>
            "ja": 
              "フィンランド" <utf8_string>
            "ko": 
              "핀란드" <utf8_string>
            "pt-BR": 
              "Finlândia" <utf8_string>
            "ru": 
              "Финляндия" <utf8_string>
            "zh-CN": 
              "芬兰" <utf8_string>
          }
      }
  }

from searx-space.

dalf avatar dalf commented on August 17, 2024
  • implemented in b376666
  • searx.space should be updated in few hours.

from searx-space.

unixfox avatar unixfox commented on August 17, 2024

image

It seems like I can again reproduce this issue, not sure what changed that reverted the fix of this issue.

from searx-space.

dalf avatar dalf commented on August 17, 2024

Fixed. The mmdb file was erased from the cache.

from searx-space.

unixfox avatar unixfox commented on August 17, 2024

image

Is the mmdb out of date? It seems like it's reporting the wrong country ^^.

from searx-space.

dalf avatar dalf commented on August 17, 2024

Is the mmdb out of date?

Yes.
It is updated now.

from searx-space.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.