Skip to content

Commit

Permalink
Remove remnants of global transport (#3792)
Browse files Browse the repository at this point in the history
* Remove remenants

* Generate pb.go

* Remove function
  • Loading branch information
KobeArthurScofield committed Sep 11, 2024
1 parent 297a9ae commit 7496413
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 298 deletions.
137 changes: 57 additions & 80 deletions core/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions core/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ option java_package = "com.xray.core";
option java_multiple_files = true;

import "common/serial/typed_message.proto";
import "transport/global/config.proto";

// Config is the master config of Xray. Xray takes this config as input and
// functions accordingly.
Expand All @@ -26,15 +25,15 @@ message Config {
// through common.RegisterConfig.
repeated xray.common.serial.TypedMessage app = 4;

// Transport settings.
// Deprecated. Each inbound and outbound should choose their own transport
// config. Date to remove: 2020-01-13
xray.transport.Config transport = 5 [deprecated = true];

// Configuration for extensions. The config may not work if corresponding
// extension is not loaded into Xray. Xray will ignore such config during
// initialization.
repeated xray.common.serial.TypedMessage extension = 6;

// Transport settings.
// Deprecated. Each inbound and outbound should choose their own transport
// config. Date to remove: 2020-01-13
// xray.transport.Config transport = 5 [deprecated = true];
}

// InboundHandlerConfig is the configuration for inbound handler.
Expand Down
7 changes: 0 additions & 7 deletions core/xray.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,6 @@ func initInstanceWithConfig(config *Config, server *Instance) (bool, error) {
server.ctx = context.WithValue(server.ctx, "cone",
platform.NewEnvFlag(platform.UseCone).GetValue(func() string { return "" }) != "true")

if config.Transport != nil {
features.PrintDeprecatedFeatureWarning("global transport settings")
}
if err := config.Transport.Apply(); err != nil {
return true, err
}

for _, appSettings := range config.App {
settings, err := appSettings.GetInstance()
if err != nil {
Expand Down
13 changes: 0 additions & 13 deletions transport/global/config.go

This file was deleted.

Loading

0 comments on commit 7496413

Please sign in to comment.