1
0
Fork 0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-07 11:58:41 +00:00

Support loading config from different formats ()

This commit is contained in:
Monsoon 2021-02-12 22:12:58 +08:00 committed by GitHub
parent 96d7156eba
commit 1b87264c53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 112 additions and 30 deletions

View file

@ -25,7 +25,7 @@ func CreateObject(v *Instance, config interface{}) (interface{}, error) {
//
// xray:api:stable
func StartInstance(configFormat string, configBytes []byte) (*Instance, error) {
config, err := LoadConfig(configFormat, "", bytes.NewReader(configBytes))
config, err := LoadConfig(configFormat, bytes.NewReader(configBytes))
if err != nil {
return nil, err
}