1
0
mirror of https://github.com/nitezs/sub2clash.git synced 2024-12-24 23:14:42 -05:00
sub2clash/test/parser_test.go

23 lines
429 B
Go
Raw Normal View History

2024-04-20 12:23:29 -04:00
package test
import (
"sub2clash/parser"
"testing"
"gopkg.in/yaml.v3"
)
func TestHy2Parser(t *testing.T) {
2024-04-23 01:36:33 -04:00
res, err := parser.ParseTrojan("trojan://Abse64hhjewrs@test.com:8443?type=ws&path=%2Fx&host=test.com&security=tls&fp=&alpn=http%2F1.1&sni=test.com#test")
2024-04-20 12:23:29 -04:00
if err != nil {
t.Log(err.Error())
t.Fail()
}
bytes, err := yaml.Marshal(res)
if err != nil {
t.Log(err.Error())
t.Fail()
}
t.Log(string(bytes))
}