Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: error opening database: invalid MaxMind DB file (sing-box) #449

Open
xJuniorProgrammer opened this issue Jan 13, 2024 · 1 comment
Labels
awaiting enhancement New feature or request

Comments

@xJuniorProgrammer
Copy link

xJuniorProgrammer commented Jan 13, 2024

描述您遇到的bug

Hello, as you know, the single-box GeoIP and Geosite structures have been deprecated, and they have introduced a new structure called Rule Sets. When I download geoip.srs and geosite.srs files and replace them in the sing-box directory, Passwall2 can't start the service, and the below error appears when calling cat /var/etc/passwall2/global.log .

FATAL[0000] start service: open geoip database: error opening database: invalid MaxMind DB file

As I checked in the passwall2 global.json file, the sing-box structure is old and it's incompatible with srs GeoIP and Geosite files.

复现此Bug的步骤

one example of old strucure in global.json

  "route": {
    "geosite": {
      "path": "\/usr\/share\/singbox\/geosite-ir.srs",
      "download_url": "https:\/\/raw.githubusercontent.com\/Chocolate4U\/Iran-sing-box-rules\/rule-set\/geosite-ir.srs"
    },

and new sing-box structure geosite.srs described as below

{
  "route": {
    "rules": [
      {
        "ip_is_private": true,
        "outbound": "direct"
      },
      {
        "rule_set": "geoip-cn",
        "outbound": "direct"
      },
      {
        "rule_set": "geoip-us",
        "rule_set_ipcidr_match_source": true,
        "outbound": "block"
      }
    ],
    "rule_set": [
      {
        "tag": "geoip-cn",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
        "download_detour": "proxy"
      },
      {
        "tag": "geoip-us",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-us.srs",
        "download_detour": "proxy"
      }
    ]
  },
  "experimental": {
    "cache_file": {
      "enabled": true // required to save Rule Set cache
    }
  }
} 

These links are related to sing-box new structures:

https://sing-box.sagernet.org/configuration/rule-set/
https://sing-box.sagernet.org/migration/

Please fix this bug, thank you.

您想要实现的目的

/

日志信息

/

截图

2024-01-13_185449

系统相关信息

/

其他信息

No response

@xJuniorProgrammer xJuniorProgrammer added the bug Something isn't working label Jan 13, 2024
@xiaorouji
Copy link
Owner

Please continue to use the old rules set.
When it was not officially removed, it would not follow up for the time being.

@xiaorouji xiaorouji added enhancement New feature or request awaiting and removed bug Something isn't working labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants