mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00

This is how sing-box tries to handle downloading geoip.db file Senari 1 if the geoip.db file path exists then it tries to open the file and parse it. if file is empty or has invalid content it return error invalid MaxMind DB otherwise it parse the file successfully Senari 2 if the geoip.db file path does not exist first it creates the geoip.db file but with empty content and then it tries to download the geoip.db file.if file downloaded successfully it copy the response to the to the geoip.db file but if download gets an error it return error and the geoip.db file remains with empty content and zero size so in the next run we have Senari 1 because the file path exists but we get an error because the file is empty. Solution so i change the order of create file to fix that problem the file created only after the file successfully downloaded. Signed-off-by: johnthecoderpro <149151524+johnthecoderpro@users.noreply.github.com>
sing-box
The universal proxy platform.
Documentation
Support
https://community.sagernet.org/c/sing-box/
License
Copyright (C) 2022 by nekohasekai <contact-sagernet@sekai.icu>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association
with this application without prior consent.
Description
Languages
Go
96.3%
Shell
3.2%
Makefile
0.4%