nyxnor/onionjuggler

[QUESTION] Which use case needs two (or more) virtual ports on the same onion address?

Closed this issue · 2 comments

My doubt is / How can I:

Which use case needs two (or more) virtual ports on the same onion address and how was this practically implemented?

The question is relevant because not supporting two or more virtual ports would simplify programming.

How is it pratically implemented?

The server allows some specific ports
https://github.com/nyxnor/onioncomms/blob/19ee1256f6c6efc18f8e7a0051e1d7c76c5d723f/xmpp/prosody/virtualhost.cfg.lua#L24-L27

The XMPP clients expect http to be on port 5280 and https to be on port 5281, as well as bosh to be on another port.

The client knows the protocol and it uses the same domain but with a different port, user doesnt need to manually edit the ports on their client, only if it is non default one not specified by the protocol.

Lets take for example an http website, http protocol specifies port 80.
HTTP servers (nginx) start listening on port 80.
HTTP clients (browser) send GET to port 80.

For solely websites, I don't see reasons to use different ports, I think I would stick with port 80 and then if some change is needed, use a differt subfolder or subdomain.