19 lines
543 B
Go
19 lines
543 B
Go
package render
|
|
|
|
import (
|
|
"github.com/peterqiu0516/sub-store/internal/model"
|
|
)
|
|
|
|
// RenderSurfboardProxies renders proxies as Surfboard text lines.
|
|
// Surfboard only supports ss/vmess/trojan/http/socks5 — delegates to surge.
|
|
func RenderSurfboardProxies(proxies []model.ProxyNode) (string, error) {
|
|
return RenderTextProxyList(proxies, model.TargetSurfboard, func(p model.ProxyNode) string {
|
|
ptype := getString(p, "type")
|
|
switch ptype {
|
|
case "ss", "vmess", "trojan", "http", "socks5":
|
|
return ToSurgeProxyLine(p)
|
|
}
|
|
return ""
|
|
})
|
|
}
|