mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Add environment variable XRAY_CONE_DISABLED option
This commit is contained in:
parent
8ca8a7126b
commit
d170416219
3 changed files with 8 additions and 3 deletions
|
@ -2,6 +2,7 @@ package core
|
|||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"reflect"
|
||||
"sync"
|
||||
|
||||
|
@ -179,7 +180,7 @@ func NewWithContext(ctx context.Context, config *Config) (*Instance, error) {
|
|||
}
|
||||
|
||||
func initInstanceWithConfig(config *Config, server *Instance) (bool, error) {
|
||||
server.ctx = context.WithValue(server.ctx, "cone", true)
|
||||
server.ctx = context.WithValue(server.ctx, "cone", os.Getenv("XRAY_CONE_DISABLED") != "true")
|
||||
|
||||
if config.Transport != nil {
|
||||
features.PrintDeprecatedFeatureWarning("global transport settings")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue