MCPcopy Create free account
hub / github.com/apenwarr/sshuttle / start

Method start

client.py:152–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

150 raise Fatal('%r returned %d' % (self.argv, rv))
151
152 def start(self):
153 self.pfile.write('ROUTES\n')
154 for (ip,width) in self.subnets_include+self.auto_nets:
155 self.pfile.write('%d,0,%s\n' % (width, ip))
156 for (ip,width) in self.subnets_exclude:
157 self.pfile.write('%d,1,%s\n' % (width, ip))
158 self.pfile.write('GO\n')
159 self.pfile.flush()
160 line = self.pfile.readline()
161 self.check()
162 if line != 'STARTED\n':
163 raise Fatal('%r expected STARTED, got %r' % (self.argv, line))
164
165 def sethostip(self, hostname, ip):
166 assert(not re.search(r'[^-\w]', hostname))

Callers 2

onroutesFunction · 0.80
_communicateMethod · 0.80

Calls 4

checkMethod · 0.95
FatalClass · 0.85
flushMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected