Update gci format

This commit is contained in:
世界
2022-07-06 15:01:09 +08:00
parent 46f28a9de9
commit 3696e81eb4
55 changed files with 194 additions and 124 deletions

View File

@@ -3,8 +3,9 @@ package badjson
import (
"bytes"
"github.com/goccy/go-json"
E "github.com/sagernet/sing/common/exceptions"
"github.com/goccy/go-json"
)
type JSONArray[T any] []T

View File

@@ -1,8 +1,9 @@
package badjson
import (
"github.com/goccy/go-json"
E "github.com/sagernet/sing/common/exceptions"
"github.com/goccy/go-json"
)
func decodeJSON(decoder *json.Decoder) (any, error) {

View File

@@ -4,9 +4,10 @@ import (
"bytes"
"strings"
"github.com/goccy/go-json"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/x/linkedhashmap"
"github.com/goccy/go-json"
)
type JSONObject struct {

View File

@@ -3,9 +3,10 @@ package geoip
import (
"net/netip"
"github.com/oschwald/maxminddb-golang"
E "github.com/sagernet/sing/common/exceptions"
N "github.com/sagernet/sing/common/network"
"github.com/oschwald/maxminddb-golang"
)
type Reader struct {

View File

@@ -7,11 +7,13 @@ import (
"os"
"time"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/buf"
"github.com/sagernet/sing/common/task"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"golang.org/x/net/dns/dnsmessage"
)

View File

@@ -5,9 +5,10 @@ import (
"context"
"io"
"github.com/sagernet/sing/protocol/http"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing/protocol/http"
)
func HTTPHost(ctx context.Context, reader io.Reader) (*adapter.InboundContext, error) {

View File

@@ -12,6 +12,7 @@ import (
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/sniff/internal/qtls"
C "github.com/sagernet/sing-box/constant"
"golang.org/x/crypto/hkdf"
)

View File

@@ -5,9 +5,10 @@ import (
"crypto/tls"
"io"
"github.com/sagernet/sing/common/bufio"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing/common/bufio"
)
func TLSClientHello(ctx context.Context, reader io.Reader) (*adapter.InboundContext, error) {