Remove remnants of global transport (#3792)

* Remove remenants

* Generate pb.go

* Remove function
This commit is contained in:
Kobe Arthur Scofield 2024-09-12 02:06:11 +08:00 committed by GitHub
parent 297a9ae7bd
commit 7496413e5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 62 additions and 298 deletions

View file

@ -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
}