-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Currently, serenity use github.com/Dreamacro/clash as ProxyConfig Parser.
https://github.com/SagerNet/serenity/blob/dev/subscription/parser/clash.go#L29
import (
....
"github.com/Dreamacro/clash/adapter"
clash_outbound "github.com/Dreamacro/clash/adapter/outbound"
"github.com/Dreamacro/clash/common/structure"
"github.com/Dreamacro/clash/config"
"github.com/Dreamacro/clash/constant"
)
...
func ParseClashSubscription(_ context.Context, content string) ([]option.Outbound, error) {
config, err := config.UnmarshalRawConfig([]byte(content))
if err != nil {
return nil, E.Cause(err, "parse clash config")
}
decoder := structure.NewDecoder(structure.Option{TagName: "proxy", WeaklyTypedInput: true})
var outbounds []option.Outbound
for i, proxyMapping := range config.Proxy {
proxy, err := adapter.ParseProxy(proxyMapping) <--- // Unspported Proxy Type Exception
if err != nil {
return nil, E.Cause(err, "parse proxy ", i)
}
It will be better to move to github.com/metacubex/mihomo , which supports a lot more modern proxy protocols like: snell, vless, mieru, etc.
Metadata
Metadata
Assignees
Labels
No labels