MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / startBridge

Function startBridge

internal/cmd/run.go:123–137  ·  view source on GitHub ↗

startBridge starts the C2 bridge if configured and enabled.

(cfg *config.Config)

Source from the content-addressed store, hash-verified

121
122// startBridge starts the C2 bridge if configured and enabled.
123func startBridge(cfg *config.Config) {
124 if cfg.C2Bridge == nil || !cfg.C2Bridge.Enable {
125 return
126 }
127 b, err := bridge.NewBridge(cfg.C2Bridge)
128 if err != nil {
129 log.Errorf("[bridge] failed to create bridge: %v", err)
130 return
131 }
132 go func() {
133 if err := b.Start(context.Background()); err != nil {
134 log.Errorf("[bridge] bridge exited: %v", err)
135 }
136 }()
137}
138
139// WaitForCloudDeploy waits indefinitely for shutdown signals in cloud deploy mode
140// when no configuration file is available.

Callers 1

Calls 2

StartMethod · 0.95
NewBridgeFunction · 0.92

Tested by

no test coverage detected