generated from kedaya_haitao/template
fix 修复FindProcessMode为空的bug
This commit is contained in:
parent
5b102469a2
commit
65b1b0c329
3
main.go
3
main.go
@ -14,6 +14,7 @@ import (
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/middleware/cors"
|
||||
"github.com/gofiber/fiber/v3/middleware/recover"
|
||||
"github.com/metacubex/mihomo/component/process"
|
||||
clash_config "github.com/metacubex/mihomo/config"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
@ -57,7 +58,7 @@ func main() {
|
||||
r.Use(cors.New(), recover.New())
|
||||
r.Get("/clash/config", func(ctx fiber.Ctx) error {
|
||||
mappings := structs.ProxiesList.Mapping()
|
||||
rawConfig := clash_config.RawConfig{Proxy: mappings}
|
||||
rawConfig := clash_config.RawConfig{Proxy: mappings, FindProcessMode: process.FindProcessAlways}
|
||||
return yaml.NewEncoder(ctx.Response().BodyWriter()).Encode(&rawConfig)
|
||||
})
|
||||
_ = r.Listen(":"+config.Config.Port, fiber.ListenConfig{
|
||||
|
Loading…
Reference in New Issue
Block a user