mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-06-26 21:29:58 +00:00
Adjust default build set to remove pprof from default distribution
This commit is contained in:
parent
44a28de6f8
commit
c5dcf1be03
@ -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.
|
||||
|
@ -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)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user