MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / new_channel

Function new_channel

sshuttle/server.py:354–365  ·  view source on GitHub ↗
(channel, data)

Source from the content-addressed store, hash-verified

352 mux.got_host_req = got_host_req
353
354 def new_channel(channel, data):
355 (family, dstip, dstport) = data.decode("ASCII").split(',', 2)
356 family = int(family)
357 # AF_INET is the same constant on Linux and BSD but AF_INET6
358 # is different. As the client and server can be running on
359 # different platforms we can not just set the socket family
360 # to what comes in the wire.
361 if family != socket.AF_INET:
362 family = socket.AF_INET6
363 dstport = int(dstport)
364 outwrap = ssnet.connect_dst(family, dstip, dstport)
365 handlers.append(Proxy(MuxWrapper(mux, channel), outwrap))
366 mux.new_channel = new_channel
367
368 dnshandlers = {}

Callers

nothing calls this directly

Calls 2

ProxyClass · 0.90
MuxWrapperClass · 0.90

Tested by

no test coverage detected