Commits

Thijs Alkemade committed 5d64539

Okay, maybe this needs to be done manually instead.

  • Participants
  • Parent commits 9e38d95

Comments (0)

Files changed (1)

File mod_onions.lua

 local bit = require "bit32";
 local st = require "util.stanza";
 local portmanager = require "core.portmanager";
-local s2sout = module:require("s2sout");
+local initialize_filters = require "util.filters".initialize;
 
 -- Configuration, todo: actual configuration
 local proxy_ip = "127.0.0.1";
 		session.socks5_handler = nil;
 		session.socks5_buffer = nil;
 
-		s2sout.initiate_connection(hosts[conn.from_host].s2sout[conn.to_host]);
+		initialize_filters(session);
+
+		session.openstream = function ()
+			session.sends2s(st.stanza("stream:stream", {
+				xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback',
+				["xmlns:stream"]='http://etherx.jabber.org/streams',
+				from=from, to=to, version='1.0', ["xml:lang"]='en'}):top_tag());
+		end
 		
 		listener.onconnect(conn);
 	end