Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Restia-Ashbell committed Sep 16, 2024
1 parent eb633dc commit b126b65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 6 additions & 5 deletions libcore/geoip.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package libcore

import (
"github.com/oschwald/maxminddb-golang"
"github.com/sagernet/sing-box/common/srs"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"log"
"net"
"os"
"strings"

"github.com/oschwald/maxminddb-golang"
"github.com/sagernet/sing-box/common/srs"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)

type Geoip struct {
Expand Down Expand Up @@ -66,7 +67,7 @@ func (g *Geoip) ConvertGeoip(countryCode, outputPath string) {
}

outputFile, err := os.Create(outputPath)
err = srs.Write(outputFile, plainRuleSet.Upgrade())
err = srs.Write(outputFile, plainRuleSet.Upgrade(), false)
if err != nil {
log.Println("failed to write geosite file:", err)
return
Expand Down
5 changes: 3 additions & 2 deletions libcore/geosite.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package libcore

import (
"os"

"github.com/sagernet/sing-box/common/geosite"
"github.com/sagernet/sing-box/common/srs"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"os"

"log"
)
Expand Down Expand Up @@ -58,7 +59,7 @@ func (g *Geosite) ConvertGeosite(code string, outputPath string) {
}

outputFile, err := os.Create(outputPath)
err = srs.Write(outputFile, plainRuleSet.Upgrade())
err = srs.Write(outputFile, plainRuleSet.Upgrade(), false)
if err != nil {
log.Println("failed to write geosite file:", err)
return
Expand Down

0 comments on commit b126b65

Please sign in to comment.