Skip to content

Commit

Permalink
fix: xray core start multiinstance, add use xray core only
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Aug 6, 2024
1 parent 3862808 commit b389963
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions config/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func ParseConfig(path string, debug bool) ([]byte, error) {
return ParseConfigContent(string(content), debug, nil, false)
}
func ParseConfigContent(contentstr string, debug bool, configOpt *ConfigOptions, fullConfig bool) ([]byte, error) {
if configOpt == nil {
configOpt = DefaultConfigOptions()
}
content := []byte(contentstr)
var jsonObj map[string]interface{} = make(map[string]interface{})

Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ require (
gopkg.in/yaml.v3 v3.0.1
)

require github.com/akavel/rsrc v0.10.2 // indirect

require (
berty.tech/go-libtor v1.0.385 // indirect
github.com/ajg/form v1.5.1 // indirect
Expand Down Expand Up @@ -120,7 +118,7 @@ require (
lukechampine.com/blake3 v1.3.0 // indirect
)

replace github.com/sagernet/sing-box => github.com/hiddify/hiddify-sing-box v1.8.9-0.20240806124804-ee348999b0bd
replace github.com/sagernet/sing-box => github.com/hiddify/hiddify-sing-box v1.8.9-0.20240806200952-27c0edc27161

replace github.com/xtls/xray-core => github.com/hiddify/xray-core v0.0.0-20240729110224-c3df022f042a

Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJS
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0/go.mod h1:FVGavL/QEBQDcBpr3fAojoK17xX5k9bicBphrOpP7uM=
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
github.com/akavel/rsrc v0.10.2 h1:Zxm8V5eI1hW4gGaYsJQUhxpjkENuG91ki8B4zCrvEsw=
github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
Expand Down Expand Up @@ -102,8 +100,8 @@ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:Fecb
github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/hiddify/hiddify-sing-box v1.8.9-0.20240806124804-ee348999b0bd h1:k27QSXPpQbBxfQ4NWdOB3ckTX8p9L4sg4zvmcGB+nVY=
github.com/hiddify/hiddify-sing-box v1.8.9-0.20240806124804-ee348999b0bd/go.mod h1:2wBDpGJbCEPXFy8jHkFbD2TAwxxUjKoMLXF2HTzhHfU=
github.com/hiddify/hiddify-sing-box v1.8.9-0.20240806200952-27c0edc27161 h1:lcvHQm4fGWTb/LU9IGE/FeXjFPT0MAxwBnIz/T4QUCs=
github.com/hiddify/hiddify-sing-box v1.8.9-0.20240806200952-27c0edc27161/go.mod h1:2wBDpGJbCEPXFy8jHkFbD2TAwxxUjKoMLXF2HTzhHfU=
github.com/hiddify/ray2sing v0.0.0-20240806191321-60866735d9ec h1:pcmZoNGZBwsWEhPmstTunTSahm2O6yVj4cdOmorBkLk=
github.com/hiddify/ray2sing v0.0.0-20240806191321-60866735d9ec/go.mod h1:Qp3mFdKsJZ5TwBYLREgWp8n2O6dgmNt3aAoX+xpvnsM=
github.com/hiddify/warp-plus v0.0.0-20240717223357-4f3122e0d11d h1:vRGKh9ou+/vQGfVYa8MczhbIVjHxlP52OWwrDWO77RA=
Expand Down
2 changes: 1 addition & 1 deletion v2/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func Parse(in *pb.ParseRequest) (*pb.ParseResponse, error) {

}

config, err := config.ParseConfigContent(content, true, nil, false)
config, err := config.ParseConfigContent(content, true, configOptions, false)
if err != nil {
return &pb.ParseResponse{
ResponseCode: pb.ResponseCode_FAILED,
Expand Down

0 comments on commit b389963

Please sign in to comment.