0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-14 20:39:36 +03:00

Support loading config from different formats (#228)

This commit is contained in:
Monsoon
2021-02-12 22:12:58 +08:00
committed by GitHub
parent 96d7156eba
commit 1b87264c53
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
}