mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +00:00
Config: Remove legacy config fields again (#3782)
* Remove more lecacy fields * Patch missing bracket * Fix tests * Fix missing comma * Fix buried test bomb * Cleanup test after removed legacy test content
This commit is contained in:
parent
c90affe7db
commit
6b1bf312d7
4 changed files with 55 additions and 152 deletions
|
@ -361,11 +361,6 @@ func (c *StatsConfig) Build() (*stats.Config, error) {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
// Port of this Point server.
|
||||
// Deprecated: Port exists for historical compatibility
|
||||
// and should not be used.
|
||||
Port uint16 `json:"port"`
|
||||
|
||||
// Deprecated: Global transport config is no longer used
|
||||
// left for returning error
|
||||
Transport map[string]json.RawMessage `json:"transport"`
|
||||
|
@ -597,14 +592,6 @@ func (c *Config) Build() (*core.Config, error) {
|
|||
inbounds = append(inbounds, c.InboundConfigs...)
|
||||
}
|
||||
|
||||
// Backward compatibility.
|
||||
if len(inbounds) > 0 && inbounds[0].PortList == nil && c.Port > 0 {
|
||||
inbounds[0].PortList = &PortList{[]PortRange{{
|
||||
From: uint32(c.Port),
|
||||
To: uint32(c.Port),
|
||||
}}}
|
||||
}
|
||||
|
||||
if len(c.Transport) > 0 {
|
||||
return nil, errors.New("Global transport config is deprecated")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue