[feature] UI option to set custom server port (#403)
Unknown opened 5 years ago

Would it be possible to add a customizable server port option to "Add account" and/or "Change account settings" dialogs to facilitate connections to servers running on non-standard ports?

The tigase-swift library already supports it, but there just is no UI setting for it. I tried to add such setting a few years ago when I decided to use tigase-messenger/siskin-im, but ultimately I ended up on hard-coding tigase-swift to lookup and set correct port for my server.

Unknown commented 5 years ago

Why you do not use DNS SRV records? That would solve your issue. I'm reluctant to add this feature as we try to make the UX as simple as possible and those additional fields are not helping with achieving that goal.

Unknown commented 5 years ago

Why you do not use DNS SRV records? That would solve your issue.

This is both a good question and a good tip, I will check it out, thanks!

I'm reluctant to add this feature as we try to make the UX as simple as possible and those additional fields are not helping with achieving that goal.

I can understand your point of view and reluctance to add more options, and, it is totally Ok design goal to make.

However, for completeness sake and as a thought experiment, the DNS SRV workaround cannot be applied to simple IP addresses or to (most?) dynamic DNS records. For these special and minority cases, would you think if it was feasible (without breaking the internal parts) to add port number to Tigase-Swift/jid/BareJID implementation? I am not familiar enough with ios/swift programming, and I just quickly see the sources that it was used in quite many places so I worry too many things will break if it is modified.

I was thinking this would involve "only" the following tasks, but perhaps you can do better approximation on what it would actually require:

  1. The user could type in their XMPP ID as usual (e.g. "jid@xmpp.example.org:12345")
  2. which is firstly splitted from the colon character, where the left part is used as it is now, while the right part is stored into the port number variable
  3. If port number was not specified, leave it null
  4. If port number was not null, append and use it on various cases such as connections, database serialization/deserialization, and settings dialogs...

Anyway, thank you for your time, and keep up the good work with the program! I think it is always nice to see and use an open source solution over the so many proprietary ones out there.

Unknown commented 5 years ago

However, for completeness sake and as a thought experiment, the DNS SRV workaround

This is not a "workaround" - it's intended and most recommended way to configure your XMPP server. One could argue, that anything else is a workaround. See https://wiki.xmpp.org/web/SRV_Records

cannot be applied to simple IP addresses

You shouldn't use an IP address to identify your server.

or to (most?) dynamic DNS records.

This one may be correct, but why not get the cheapest of the domains and point it's SRV addresses to your dynamic DNS records? That is.

  • You get somecheap.domain.xyz
  • You have myprivate.dynamicdomain.com

You add SRV records to the first one and point to the second:

_xmpp-client._tcp.somecheap.domain.xyz. 86400 IN SRV 5 0 12345 myprivate.dynamicdomain.com.
_xmpp-server._tcp.somecheap.domain.xyz. 86400 IN SRV 5 0 3456 myprivate.dynamicdomain.com.

Setting port manually is really prone to errors and mistakes, and server operator has no control or way to inform it's users if there is a need to change the port. If you use SRV entries then you simply update DNS.

Unknown commented 5 years ago

@woj-tek Many thanks for your explanation and examples, very informative.

In light of your recent comments, I believe this issue can be considered a non-issue, and can therefore be closed.

issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/siskin-im#403
Please wait...
Page is in error, reload to recover