This commit is contained in:
GoEdgeLab
2024-07-27 15:42:50 +08:00
parent d511145bc5
commit c19be78e0d
524 changed files with 1817 additions and 1346 deletions

View File

@@ -1,6 +1,8 @@
package utils
import (
"strconv"
"github.com/TeaOSLab/EdgeCommon/pkg/iplibrary"
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
"github.com/TeaOSLab/EdgeNode/internal/utils/agents"
@@ -12,7 +14,6 @@ import (
"github.com/cespare/xxhash/v2"
"github.com/iwind/TeaGo/types"
stringutil "github.com/iwind/TeaGo/utils/string"
"strconv"
)
var SharedCache = ttlcache.NewCache[int8]()

View File

@@ -1,10 +1,6 @@
package utils_test
import (
"github.com/TeaOSLab/EdgeNode/internal/utils/re"
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
"github.com/TeaOSLab/EdgeNode/internal/waf/utils"
"github.com/iwind/TeaGo/rands"
"net/http"
"regexp"
"runtime"
@@ -12,6 +8,11 @@ import (
"strings"
"testing"
"time"
"github.com/TeaOSLab/EdgeNode/internal/utils/re"
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
"github.com/TeaOSLab/EdgeNode/internal/waf/utils"
"github.com/iwind/TeaGo/rands"
)
func TestMatchStringCache(t *testing.T) {