Skip to content

Commit 231f5bf

Browse files
authored
Add missing deprecation notice to deprecated code (#437)
1 parent 9c1f251 commit 231f5bf

File tree

6 files changed

+119
-96
lines changed

6 files changed

+119
-96
lines changed

features/inbound/inbound.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Handler interface {
1616
// The tag of this handler.
1717
Tag() string
1818

19-
// Deprecated. Do not use in new code.
19+
// Deprecated: Do not use in new code.
2020
GetRandomInboundProxy() (interface{}, net.Port, int)
2121
}
2222

infra/conf/v2ray.go

+21-5
Original file line numberDiff line numberDiff line change
@@ -329,16 +329,32 @@ func (c *StatsConfig) Build() (*stats.Config, error) {
329329
}
330330

331331
type Config struct {
332-
Port uint16 `json:"port"` // Port of this Point server. Deprecated.
332+
// Port of this Point server.
333+
// Deprecated: Port exists for historical compatibility
334+
// and should not be used.
335+
Port uint16 `json:"port"`
336+
337+
// Deprecated: InboundConfig exists for historical compatibility
338+
// and should not be used.
339+
InboundConfig *InboundDetourConfig `json:"inbound"`
340+
341+
// Deprecated: OutboundConfig exists for historical compatibility
342+
// and should not be used.
343+
OutboundConfig *OutboundDetourConfig `json:"outbound"`
344+
345+
// Deprecated: InboundDetours exists for historical compatibility
346+
// and should not be used.
347+
InboundDetours []InboundDetourConfig `json:"inboundDetour"`
348+
349+
// Deprecated: OutboundDetours exists for historical compatibility
350+
// and should not be used.
351+
OutboundDetours []OutboundDetourConfig `json:"outboundDetour"`
352+
333353
LogConfig *LogConfig `json:"log"`
334354
RouterConfig *RouterConfig `json:"routing"`
335355
DNSConfig *DNSConfig `json:"dns"`
336356
InboundConfigs []InboundDetourConfig `json:"inbounds"`
337357
OutboundConfigs []OutboundDetourConfig `json:"outbounds"`
338-
InboundConfig *InboundDetourConfig `json:"inbound"` // Deprecated.
339-
OutboundConfig *OutboundDetourConfig `json:"outbound"` // Deprecated.
340-
InboundDetours []InboundDetourConfig `json:"inboundDetour"` // Deprecated.
341-
OutboundDetours []OutboundDetourConfig `json:"outboundDetour"` // Deprecated.
342358
Transport *TransportConfig `json:"transport"`
343359
Policy *PolicyConfig `json:"policy"`
344360
API *APIConfig `json:"api"`

transport/config.pb.go

+10-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

transport/config.proto

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ import "transport/internet/config.proto";
1111
// Global transport settings. This affects all type of connections that go
1212
// through V2Ray. Deprecated. Use each settings in StreamConfig.
1313
message Config {
14+
option deprecated = true;
1415
repeated v2ray.core.transport.internet.TransportConfig transport_settings = 1;
1516
}

0 commit comments

Comments
 (0)