self.env = {}
self.env["LISTEN_PORT"] = str(SOCKS_PORT)
self.env.update(extra_env)
- self.devnull = open("/dev/null", "w")
+ self.log_output = open("out.log", "a")
def __enter__(self):
self.process = subprocess.Popen(
args=["./socks5server"],
- stdout=self.devnull,
- stderr=self.devnull,
+ stdout=self.log_output,
+ stderr=self.log_output,
env=self.env,
)
return self
def __exit__(self, exc_type, exc_val, exc_tb):
- self.devnull.close()
+ self.log_output.close()
self.process.terminate()
self.process.wait()