add run many core at the same time

This commit is contained in:
Yuzuki616
2023-06-09 21:20:41 +08:00
parent 9827d442d5
commit f07629d438
9 changed files with 142 additions and 9 deletions

View File

@@ -53,6 +53,7 @@ func parseConnectionConfig(c *conf.ConnectionConfig) (policy *coreConf.Policy) {
}
func getCore(c *conf.XrayConfig) *core.Instance {
os.Setenv("XRAY_LOCATION_ASSET", c.AssetPath)
// Log Config
coreLogConfig := &coreConf.LogConfig{}
coreLogConfig.LogLevel = c.LogConfig.Level
@@ -183,3 +184,11 @@ func (c *Core) Close() error {
}
return nil
}
func (c *Core) Protocols() []string {
return []string{
"v2ray",
"shadowsocks",
"trojan",
}
}