mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Remove remnants of global transport
(#3792)
* Remove remenants * Generate pb.go * Remove function
This commit is contained in:
parent
297a9ae7bd
commit
7496413e5c
7 changed files with 62 additions and 298 deletions
|
@ -3,14 +3,12 @@ package internet
|
|||
import (
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
"github.com/xtls/xray-core/common/serial"
|
||||
"github.com/xtls/xray-core/features"
|
||||
)
|
||||
|
||||
type ConfigCreator func() interface{}
|
||||
|
||||
var (
|
||||
globalTransportConfigCreatorCache = make(map[string]ConfigCreator)
|
||||
globalTransportSettings []*TransportConfig
|
||||
)
|
||||
|
||||
var strategy = [][]byte{
|
||||
|
@ -105,12 +103,6 @@ func (c *StreamConfig) GetTransportSettingsFor(protocol string) (interface{}, er
|
|||
}
|
||||
}
|
||||
|
||||
for _, settings := range globalTransportSettings {
|
||||
if settings.GetUnifiedProtocolName() == protocol {
|
||||
return settings.GetTypedSettings()
|
||||
}
|
||||
}
|
||||
|
||||
return CreateTransportConfig(protocol)
|
||||
}
|
||||
|
||||
|
@ -127,12 +119,6 @@ func (c *StreamConfig) HasSecuritySettings() bool {
|
|||
return len(c.SecurityType) > 0
|
||||
}
|
||||
|
||||
func ApplyGlobalTransportSettings(settings []*TransportConfig) error {
|
||||
features.PrintDeprecatedFeatureWarning("global transport settings")
|
||||
globalTransportSettings = settings
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *ProxyConfig) HasTag() bool {
|
||||
return c != nil && len(c.Tag) > 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue