mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-26 01:43:29 +01:00
a2ea5ab455
This tries to discover local hostnames and prints them to stdout. Will be used by the server for auto-hostname tracking.
26 lines
329 B
Python
26 lines
329 B
Python
import sys, os
|
|
|
|
logprefix = ''
|
|
verbose = 0
|
|
|
|
def log(s):
|
|
sys.stdout.flush()
|
|
sys.stderr.write(logprefix + s)
|
|
sys.stderr.flush()
|
|
|
|
def debug1(s):
|
|
if verbose >= 1:
|
|
log(s)
|
|
|
|
def debug2(s):
|
|
if verbose >= 2:
|
|
log(s)
|
|
|
|
def debug3(s):
|
|
if verbose >= 3:
|
|
log(s)
|
|
|
|
|
|
class Fatal(Exception):
|
|
pass
|