mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-07 11:58:41 +00:00
Support loading config from different formats (#228)
This commit is contained in:
parent
96d7156eba
commit
1b87264c53
4 changed files with 112 additions and 30 deletions
core
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue