Re: [JDEV] Jabber server hostname and JIDs
On Mon, Mar 04, 2002 at 07:55:31AM +, DJ Adams wrote: On Mon, Mar 04, 2002 at 06:07:01PM +1100, Robert Norris wrote: 3. Hack JID rewriting stuff into the JSM, so that any to/from attributes get rewritten to what I want them to be. It already does this, in the pthcsock element in the c2s config just add: alias to=server.name/ It's ugly, but it does all the magic to/from replacing so that things work just like you want :) The above is the default one, you can also have multiple alias to=real.serverwhat.client.uses/alias in there. That's interesting to know. It's pretty disgusting (as most hacks of this type are), and it still has the problem that the client thinks its JID is one thing while the rest of the network knows it as something Yes. This is the problem with alias/ - it wasn't very well known early on in the stages of client development, so it wasn't implemented (AFAIK) as widely as one would have liked. (I am just as guilty - sjabber was written before I knew much about the full server config options). This is exactly the implementation that I independently figured out last week (independently because I hadn't been keeping up on JDEV email); we've got our server name set to example.com and an alias to to put in the real.name.example.com which is the full A name of the server. Gabber is set to connect to login to real.name.example.com and JIDs now can be specified as [EMAIL PROTECTED] Using an SRV record to locate the real name would be better, but this really isn't too bad, and we haven't noticed any confusion in the client. Incidentally, we've also got an alias to to localhost so people can do SSH port forwarding to the jabber server; they forward port 5223 on the server to localhost port 5223 and specify localhost as their server. - Dave Dykstra ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
Re[2]: [JDEV] Jabber server hostname and JIDs
On Mon, Mar 04, 2002 at 06:07:01PM +1100, Robert Norris wrote: 3. Hack JID rewriting stuff into the JSM, so that any to/from attributes get rewritten to what I want them to be. It already does this, in the pthcsock element in the c2s config just add: alias to=server.name/ It's ugly, but it does all the magic to/from replacing so that things work just like you want :) The above is the default one, you can also have multiple alias to=real.serverwhat.client.uses/alias in there. That's interesting to know. It's pretty disgusting (as most hacks of this type are), and it still has the problem that the client thinks its JID is one thing while the rest of the network knows it as something Yes. This is the problem with alias/ - it wasn't very well known early on in the stages of client development, so it wasn't implemented (AFAIK) as widely as one would have liked. (I am just as guilty - sjabber was written before I knew much about the full server config options). dj If a client connects to a server through an address which is different from the servers name and it has an alias set up for that address is there any way for the client to determine the servers actual name? The solution I have in my client right now is to let the user enter their full JID in the username box if it differs from username@server. Thomas Parslow (PatRat) E-Mail/Jabber: [EMAIL PROTECTED] ICQ: 26359483 ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
Re: [JDEV] Jabber server hostname and JIDs
On Sat, Mar 09, 2002 at 12:29:43PM +, Thomas Parslow (PatRat) wrote: On Mon, Mar 04, 2002 at 06:07:01PM +1100, Robert Norris wrote: .. snip .. If a client connects to a server through an address which is different from the servers name and it has an alias set up for that address is there any way for the client to determine the servers actual name? Yes, when you initialize the stream:stream with the 'to' attribute (having the alias as value), the server should respond with a corresponding stream:stream with a 'from' attribute having it's real name as value. -- Greetz, Ralphm ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
[JDEV] Jabber server hostname and JIDs
I've been setting up a new server, and have noticed a problem in the way clients and servers seem to communicate. My Jabber server resides on a machine, fornost.cataclysm.cx. However, I want the machine to respond to packets sent to @cataclysm.cx. For s2s, this is easy - SRV records are already in place. However, for clients it's a little more difficult, it seems. I use Gabber most of the time, but I don't think this is specific to that client. When I connect, it asks for a username and server. It combines these to form the user's JID. So, I need to enter user 'rob' and server 'cataclysm.cx' to get the correct JID. However, the A record in the DNS for cataclysm.cx points to a different machine, so it doesn't work. Entering 'fornost.cataclysm.cx' as the server works, but it builds the wrong JID. I can think of the following solutions: 1. Set up a redirector on the other machine that forwards cataclysm.cx:5222 to fornost.cataclysm.cx:5222 2. Point the A record for cataclysm.cx to fornost.cataclysm.cx, and set up redirectors for the other services. 3. Hack JID rewriting stuff into the JSM, so that any to/from attributes get rewritten to what I want them to be. 4. Get clients to use SRV records for the client connection. 5. Get clients to treat the JID and the server as different entities. Option 1 is a pain, but is probably the best short-term solution for me. Option 2 is similar, but is even more painful, and not really good. Option 3 is problematic, because the server and the client have a different idea of who they are - if the client puts its JID into the packet somewhere other than in the to/from attributes, the server has no way to know to rewrite it. Option 4 is definently the correct way to solve this, but requires client support. Option 5 should accompany option 4. This isn't too much of an issue for me - I'm the only one who uses my server. However, I can see this becoming a major issue in any large installation - things like load-balancing and farming are going to exhibit this problem on a much grander scale. What do others think? Has anyone else come across this problem and come up with an elegant solution to it? Rob. -- Robert Norris [EMAIL PROTECTED] GPG: 1024D/FC18E6C2 msg04667/pgp0.pgp Description: PGP signature
Re: [JDEV] Jabber server hostname and JIDs
3. Hack JID rewriting stuff into the JSM, so that any to/from attributes get rewritten to what I want them to be. It already does this, in the pthcsock element in the c2s config just add: alias to=server.name/ It's ugly, but it does all the magic to/from replacing so that things work just like you want :) The above is the default one, you can also have multiple alias to=real.serverwhat.client.uses/alias in there. 4. Get clients to use SRV records for the client connection. This should definately be a goal, but it's still very hard to do SRV lookups in most environments. Hopefully that will change, or some simple portable SRV lookup libraries will happen. Although it's probably not right in some way, I'm a fan of using a fallback method (if you can't do SRV) of just a normal A lookup on the same SRV formatted record: _jabber._tcp.jabber.org. SRV gives you port assignment and weighted and load balanced farms, which is all very nice, but if you just can't hack it then at least having an alternative IP is still very useful. 5. Get clients to treat the JID and the server as different entities. Yes, it should probably have been clearer at some point that it would be useful in clients to have an advanced option for a proxy or server entry box, that is used only for resolving the server, much like email clients and pop/imap. Jer ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
Re: [JDEV] Jabber server hostname and JIDs
3. Hack JID rewriting stuff into the JSM, so that any to/from attributes get rewritten to what I want them to be. It already does this, in the pthcsock element in the c2s config just add: alias to=server.name/ It's ugly, but it does all the magic to/from replacing so that things work just like you want :) The above is the default one, you can also have multiple alias to=real.serverwhat.client.uses/alias in there. That's interesting to know. It's pretty disgusting (as most hacks of this type are), and it still has the problem that the client thinks its JID is one thing while the rest of the network knows it as something else. But for most things, this should work well enough. 4. Get clients to use SRV records for the client connection. This should definately be a goal, but it's still very hard to do SRV lookups in most environments. Hopefully that will change, or some simple portable SRV lookup libraries will happen. A bit of quick googling finds this: http://www.cs.columbia.edu/sip/srv/ Which is small enough to be pulled into just about anything, by the looks of it. Also, someone mentioned this last week, which looks promising (though it hasn't been touched for a while): http://ruli.sf.net/ Although it's probably not right in some way, I'm a fan of using a fallback method (if you can't do SRV) of just a normal A lookup on the same SRV formatted record: _jabber._tcp.jabber.org. SRV gives you port assignment and weighted and load balanced farms, which is all very nice, but if you just can't hack it then at least having an alternative IP is still very useful. Agreed. It's good in small deployments. Also, this is what SMTP does with MX records - if it can't find one, it falls back to an A record. 5. Get clients to treat the JID and the server as different entities. Yes, it should probably have been clearer at some point that it would be useful in clients to have an advanced option for a proxy or server entry box, that is used only for resolving the server, much like email clients and pop/imap. A plea to client developers - do this. It shouldn't be too hard, and is a good interim solution. Rob. -- Robert Norris GPG: 1024D/FC18E6C2 Email+Jabber: [EMAIL PROTECTED]Web: http://cataclysm.cx/ msg04670/pgp0.pgp Description: PGP signature
Re: [JDEV] Jabber server hostname and JIDs
On Mon, Mar 04, 2002 at 06:07:01PM +1100, Robert Norris wrote: 3. Hack JID rewriting stuff into the JSM, so that any to/from attributes get rewritten to what I want them to be. It already does this, in the pthcsock element in the c2s config just add: alias to=server.name/ It's ugly, but it does all the magic to/from replacing so that things work just like you want :) The above is the default one, you can also have multiple alias to=real.serverwhat.client.uses/alias in there. That's interesting to know. It's pretty disgusting (as most hacks of this type are), and it still has the problem that the client thinks its JID is one thing while the rest of the network knows it as something Yes. This is the problem with alias/ - it wasn't very well known early on in the stages of client development, so it wasn't implemented (AFAIK) as widely as one would have liked. (I am just as guilty - sjabber was written before I knew much about the full server config options). dj ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev