MCPcopy
hub / github.com/windtf/wireproxy / SpawnRoutine

Method SpawnRoutine

routine.go:283–290  ·  view source on GitHub ↗

SpawnRoutine connects to the specified target and plumbs it to STDIN / STDOUT

(vt *VirtualTun)

Source from the content-addressed store, hash-verified

281
282// SpawnRoutine connects to the specified target and plumbs it to STDIN / STDOUT
283func (conf *STDIOTunnelConfig) SpawnRoutine(vt *VirtualTun) {
284 raddr, err := parseAddressPort(conf.Target)
285 if err != nil {
286 log.Fatal(err)
287 }
288
289 go STDIOTcpForward(vt, raddr, conf.Input, conf.Output)
290}
291
292// tcpServerForward starts a new connection locally and forward traffic from `conn`
293func tcpServerForward(vt *VirtualTun, raddr *addressPort, conn net.Conn) {

Callers

nothing calls this directly

Calls 2

parseAddressPortFunction · 0.85
STDIOTcpForwardFunction · 0.85

Tested by

no test coverage detected