def tncc_start(self):
# tncc is the host checker app. It can check different
# security policies of the host and report back. We have
# to send it a preauth key (from the DSPREAUTH cookie)
# and it sends back a new cookie value we submit.
# After logging in, we send back another cookie to tncc.
# Subsequently, it contacts https://<vpn_host:443 every
# 10 minutes.
if not self.tncc_jar:
self.tncc_init()
self.tncc_socket, sock = socket.socketpair(socket.AF_UNIX, socket.SOCK_SEQPACKET)
null = open(os.devnull, 'w')
self.tncc_process = subprocess.Popen(['java',
'-classpath', self.tncc_jar + ':' + self.plugin_jar,
self.class_name,
'log_level', '3',
'postRetries', '6',
'ivehost', self.vpn_host,
'home_dir', os.path.expanduser('~'),
'Parameter0', '',
'user_agent', self.user_agent,
], env={'LD_PRELOAD': self.tncc_preload}, stdin=sock, stdout=null)
评论列表
文章目录