diff --git a/constant/proxy.go b/constant/proxy.go index 1e9baee298..327d076820 100644 --- a/constant/proxy.go +++ b/constant/proxy.go @@ -23,6 +23,7 @@ const ( TypeVLESS = "vless" TypeTUIC = "tuic" TypeHysteria2 = "hysteria2" + TypeCustom = "custom" ) const ( diff --git a/option/outbound.go b/option/outbound.go index d2e98ce5c7..5b95cc7bfa 100644 --- a/option/outbound.go +++ b/option/outbound.go @@ -27,6 +27,7 @@ type _Outbound struct { Hysteria2Options Hysteria2OutboundOptions `json:"-"` SelectorOptions SelectorOutboundOptions `json:"-"` URLTestOptions URLTestOutboundOptions `json:"-"` + CustomOptions map[string]interface{} `json:"-"` } type Outbound _Outbound @@ -70,6 +71,8 @@ func (h *Outbound) RawOptions() (any, error) { rawOptionsPtr = &h.SelectorOptions case C.TypeURLTest: rawOptionsPtr = &h.URLTestOptions + case C.TypeCustom: + rawOptionsPtr = &h.CustomOptions case "": return nil, E.New("missing outbound type") default: