go 1.24 & fix

This commit is contained in:
armv9 2025-02-26 18:11:24 +09:00
parent 1d5c8e8ff5
commit 5ff4eb011c
6 changed files with 4 additions and 5 deletions

View File

@ -33,7 +33,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.23.6" go-version: ^1.24
- name: Native Build - name: Native Build
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib core run: ./run lib core

View File

@ -124,7 +124,7 @@ object DataStore : OnPreferenceDataStoreChangeListener {
get() = getLocalPort(Key.MIXED_PORT, 2080) get() = getLocalPort(Key.MIXED_PORT, 2080)
set(value) = saveLocalPort(Key.MIXED_PORT, value) set(value) = saveLocalPort(Key.MIXED_PORT, value)
fun initGlobal() { fun initGlobal() {
if (configurationStore.getString(Key.MIXED_PORT) == null) { if (configurationStore.getString(Key.MIXED_PORT) == null) {
mixedPort = mixedPort mixedPort = mixedPort
} }

View File

@ -37,7 +37,6 @@ import io.nekohasekai.sagernet.group.GroupUpdater
import io.nekohasekai.sagernet.ktx.* import io.nekohasekai.sagernet.ktx.*
import io.nekohasekai.sagernet.widget.ListHolderListener import io.nekohasekai.sagernet.widget.ListHolderListener
import moe.matsuri.nb4a.utils.Util import moe.matsuri.nb4a.utils.Util
import java.util.*
class MainActivity : ThemedActivity(), class MainActivity : ThemedActivity(),
SagerConnection.Callback, SagerConnection.Callback,

View File

@ -64,6 +64,7 @@ func init() {
if err := g.Open(filepath.Join(externalAssetsPath, "geoip.db")); err != nil { if err := g.Open(filepath.Join(externalAssetsPath, "geoip.db")); err != nil {
return nil, err return nil, err
} }
defer g.geoipReader.Close()
return g.Rules(name) return g.Rules(name)
} }
} }

View File

@ -20,8 +20,6 @@ import (
//go:linkname resourcePaths github.com/sagernet/sing-box/constant.resourcePaths //go:linkname resourcePaths github.com/sagernet/sing-box/constant.resourcePaths
var resourcePaths []string var resourcePaths []string
var isBgProcess bool
func NekoLogPrintln(s string) { func NekoLogPrintln(s string) {
log.Println(s) log.Println(s)
} }

View File

@ -4,6 +4,7 @@ var intfBox BoxPlatformInterface
var intfNB4A NB4AInterface var intfNB4A NB4AInterface
var useProcfs bool var useProcfs bool
var isBgProcess bool
type NB4AInterface interface { type NB4AInterface interface {
UseOfficialAssets() bool UseOfficialAssets() bool