On Wed, Mar 26, 2014 at 5:33 PM, Jiibii Bii <jiibii...@gmail.com> wrote:
>
> Le mardi 25 mars 2014 19:39:26 UTC+1, Waqas a écrit :
>>
>> On Tue, Mar 25, 2014 at 1:35 PM, Jiibii Bii <jiib...@gmail.com> wrote:
>> > Hello
>> >
>> > I need to modifiy Prosody in ordre to:
>> > - listen on 2 other ports than 5222
>> > - filter or modify stanza (up and down)  for sessions on these new ports
>> > (
>> > session on 5222 are not filtered)
>> >
>> > I think, the filtering can be done in a 'module' ( maybe there are
>> > already
>> > modules for do that)
>> >
>> > But can I use a module to make Prosody listen on several ports?
>> > or do I need to modify the core of Prosody ( ie xmppclient_listener.lua
>> > or
>> > session_manager.lua ? )
>> >
>> > If someone has an idea where I can start, it would be nice to help me.
>> >
>> > Thanks a lot.
>> >
>>
>> This should all be doable with a custom plugin/module and some config
>> change. You wouldn't need to modify Prosody's core.
>>
>> Set the client ports you need in your Prosody config: c2s_ports = {
>> 5222, 6222, 7222 };
>>
> I don't see  c2s_ports in the code.
>

If you'd like to see the code, see the end of mod_c2s, where it
registers a port handler:
http://hg.prosody.im/0.9/file/1b5ca55bf895/plugins/mod_c2s.lua
And portmanager which uses mod_c2s's provided data to look up settings
in the config: 
http://hg.prosody.im/0.9/file/1b5ca55bf895/core/portmanager.lua#l85

Docs here: https://prosody.im/doc/configure#port_and_network_settings

--
Waqas Hussain

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to