mirror of
https://github.com/bestnite/sub2sing-box.git
synced 2025-10-27 17:31:17 +00:00
feat: Upgrade Sing-box dependencies and add Anytls support
This commit is contained in:
21
test/hysteria_parser_test.go
Normal file
21
test/hysteria_parser_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/sagernet/sing/common/byteformats"
|
||||
)
|
||||
|
||||
func TestUnmarshalNetworkBytesCompact(t *testing.T) {
|
||||
up := &byteformats.NetworkBytesCompat{}
|
||||
upmbps := "100 Mbps"
|
||||
err := json.Unmarshal(fmt.Appendf(nil, `"%s"`, upmbps), up)
|
||||
if err != nil {
|
||||
log.Fatalf("error: %v", err)
|
||||
return
|
||||
}
|
||||
log.Printf("%+v", up)
|
||||
}
|
||||
Reference in New Issue
Block a user