johnthecoderpro 0cfb14a18b
Fix geoip download bug
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>
2023-11-05 15:30:20 +08:00
2023-10-30 12:40:52 +08:00
2023-10-30 12:41:23 +08:00
2023-11-05 13:01:55 +08:00
2023-06-07 20:45:25 +08:00
2023-07-09 12:24:43 +08:00
2023-09-12 13:26:19 +08:00
2023-03-31 14:31:35 +08:00
2023-11-05 15:30:20 +08:00
2023-03-18 20:27:38 +08:00
2023-02-18 14:55:47 +08:00
2023-10-26 14:02:19 +08:00
2023-09-12 13:26:19 +08:00
2023-09-20 14:15:00 +08:00
2023-09-20 22:01:58 +08:00
2023-09-20 14:15:00 +08:00
2023-06-07 20:45:25 +08:00
2023-06-07 20:45:25 +08:00
2023-09-12 13:26:19 +08:00
2023-03-27 08:20:51 +08:00
2023-11-04 08:04:18 +08:00
2023-04-16 16:28:41 +08:00

sing-box

The universal proxy platform.

Packaging status

Documentation

https://sing-box.sagernet.org

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
The universal proxy platform
Readme 37 MiB
Languages
Go 96.3%
Shell 3.2%
Makefile 0.4%