refactor to compatible with sing-box 1.11

This commit is contained in:
2025-01-20 15:08:49 +08:00
parent 22ae18120a
commit 0a6fe9da0c
13 changed files with 340 additions and 169 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/nitezs/sub2sing-box/constant"
"github.com/nitezs/sub2sing-box/model"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/json/badoption"
)
@@ -147,11 +148,11 @@ func ParseTrojan(proxy string) (model.Outbound, error) {
}
}
result := model.Outbound{Outbound: option.Outbound{
result := model.Outbound{
Type: "trojan",
Tag: remarks,
Options: outboundOptions,
}}
}
return result, nil
}