From fca22e5b308cbd76b9873f9a58e96f020ecd5d47 Mon Sep 17 00:00:00 2001 From: mmmray <142015632+mmmray@users.noreply.github.com> Date: Fri, 6 Sep 2024 18:05:53 -0500 Subject: [PATCH] actually, lets delete it all --- infra/conf/xray.go | 47 ---------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/infra/conf/xray.go b/infra/conf/xray.go index d480de431481..cce7c3bf6c37 100644 --- a/infra/conf/xray.go +++ b/infra/conf/xray.go @@ -389,22 +389,6 @@ type Config struct { // and should not be used. Port uint16 `json:"port"` - // Deprecated: InboundConfig exists for historical compatibility - // left for returning error - InboundConfig *json.RawMessage `json:"inbound"` - - // Deprecated: OutboundConfig exists for historical compatibility - // left for returning error - OutboundConfig *json.RawMessage `json:"outbound"` - - // Deprecated: InboundDetours exists for historical compatibility - // left for returning error - InboundDetours []json.RawMessage `json:"inboundDetour"` - - // Deprecated: OutboundDetours exists for historical compatibility - // left for returning error - OutboundDetours []json.RawMessage `json:"outboundDetour"` - // Deprecated: Global transport config is no longer used // left for returning error Transport map[string]json.RawMessage `json:"transport"` @@ -490,21 +474,6 @@ func (c *Config) Override(o *Config, fn string) { c.BurstObservatory = o.BurstObservatory } - // deprecated attrs... keep them for now - if o.InboundConfig != nil { - c.InboundConfig = o.InboundConfig - } - if o.OutboundConfig != nil { - c.OutboundConfig = o.OutboundConfig - } - if o.InboundDetours != nil { - c.InboundDetours = o.InboundDetours - } - if o.OutboundDetours != nil { - c.OutboundDetours = o.OutboundDetours - } - // deprecated attrs - // update the Inbound in slice if the only one in override config has same tag if len(o.InboundConfigs) > 0 { for i := range o.InboundConfigs { @@ -647,14 +616,6 @@ func (c *Config) Build() (*core.Config, error) { var inbounds []InboundDetourConfig - if c.InboundConfig != nil { - return nil, errors.New("Global inbound config is deprecated") - } - - if len(c.InboundDetours) > 0 { - return nil, errors.New("inboundDetours is deprecated") - } - if len(c.InboundConfigs) > 0 { inbounds = append(inbounds, c.InboundConfigs...) } @@ -681,14 +642,6 @@ func (c *Config) Build() (*core.Config, error) { var outbounds []OutboundDetourConfig - if c.OutboundConfig != nil { - return nil, errors.New("Global outbound config is deprecated") - } - - if len(c.OutboundDetours) > 0 { - return nil, errors.New("OutboundDetours is deprecated") - } - if len(c.OutboundConfigs) > 0 { outbounds = append(outbounds, c.OutboundConfigs...) }