Adjust default build set to remove pprof from default distribution

This commit is contained in:
Shelikhoo 2024-09-06 15:11:56 +01:00 committed by Xiaokang Wang (Shelikhoo)
parent 44a28de6f8
commit c5dcf1be03
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,6 @@ import (
// Developer preview features
_ "github.com/v2fly/v2ray-core/v5/app/instman"
_ "github.com/v2fly/v2ray-core/v5/app/observatory"
_ "github.com/v2fly/v2ray-core/v5/app/restfulapi"
_ "github.com/v2fly/v2ray-core/v5/app/tun"
// Inbound and outbound proxies.

View File

@ -1,13 +1,14 @@
package plugins
package plugin_pprof
import (
"github.com/v2fly/v2ray-core/v5/main/plugins"
"net/http"
"net/http/pprof"
"github.com/v2fly/v2ray-core/v5/main/commands/base"
)
var pprofPlugin Plugin = func(cmd *base.Command) func() error {
var pprofPlugin plugins.Plugin = func(cmd *base.Command) func() error {
addr := cmd.Flag.String("pprof", "", "")
return func() error {
if *addr != "" {
@ -24,5 +25,5 @@ var pprofPlugin Plugin = func(cmd *base.Command) func() error {
}
func init() {
RegisterPlugin(pprofPlugin)
plugins.RegisterPlugin(pprofPlugin)
}