예제 #1
0
 def func(onion,cookie,client):
     onion += '.onion'
     while True:
         self.dbg('tc connect to '+onion+' cookie='+cookie)
         sock,err = util.tor_connect(onion,11009)
         if sock is not None:
             onion = onion.replace('.onion','')
             self.dbg('tc got outcon to '+onion)
             self.onions[onion] = out_handler(cookie,onion,sock,self,client)
             client.outcon = self.onions[onion]
             client.outcon.send_pong(cookie)
             client.outcon.send_status()
             break
         self.dbg('tc connect error='+err)
예제 #2
0
파일: s2s.py 프로젝트: nandub/nameless-ircd
 def tor_link(self,host,port=6660):
     self._link(lambda : util.tor_connect(host,int(port)),str(host))