Commits

Thijs Alkemade committed e173f92

Fix setting the filter.

Comments (0)

Files changed (1)

 local bit = require "bit32";
 local st = require "util.stanza";
 local portmanager = require "core.portmanager";
-local initialize_filters = require "util.filters".initialize;
 
 -- Configuration, todo: actual configuration
 local proxy_ip = "127.0.0.1";
 
 		module:log("debug", "SOCKS5 done, handing over listening to "..tostring(listener));
 
-		conn.setlistener(conn, listener);
-
-		listener.register_outgoing(conn, session);
-
 		session.socks5_handler = nil;
 		session.socks5_buffer = nil;
 
-		initialize_filters(session);
-
 		local w, log = conn.send, session.log;
 
 		local filter = initialize_filters(session);
 		session.bounce_sendq = function ()
 			log("debug", "Should bounce our send queue... do we even have one?");
 		end
-
+		
 		session.open_stream = function ()
 			session.sends2s(st.stanza("stream:stream", {
 				xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback',
 				["xmlns:stream"]='http://etherx.jabber.org/streams',
 				from=session.from_host, to=session.to_host, version='1.0', ["xml:lang"]='en'}):top_tag());
 		end
-		
+	
+        conn.setlistener(conn, listener);
+
+		listener.register_outgoing(conn, session);
+
+
 		listener.onconnect(conn);
 	end
 end
 	return false;
 end
 
+module:log("debug", "Onions ready and loaded");
+
 function module.add_host(module)
 	module:hook("route/remote", route_to_onion, 200);
-end
+end