Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using a server link without a port #125

Open
FaserF opened this issue Jul 21, 2021 · 6 comments
Open

Allow using a server link without a port #125

FaserF opened this issue Jul 21, 2021 · 6 comments

Comments

@FaserF
Copy link

FaserF commented Jul 21, 2021

Thank you for your work. Please allow in the clients the usage without a server port.

Background. I have a subdomain switch.mydomain.com with a Proxy behind it. The proxy sends the web page to my docker switch lan play server to the correct port (11451).

So I would like to tell the client to use switch.mydomain.com as my server url, but it fails and stops with an error that the IP couldn't be parsed.

@spacemeowx2
Copy link
Owner

switch lan play uses both TCP and UDP on the same port number. (TCP/HTTP for query infomation, UDP for gaming data, the client only uses UDP). And UDP is not a part of web page you mentioned. Not sure what exactly you want.

@spacemeowx2
Copy link
Owner

I think you might want the user to omit the port part :11451. So when no colon is detected switch lan play will connect to the default port 11451. This is a good suggestion.

@FaserF
Copy link
Author

FaserF commented Jul 21, 2021

My LAN-Play Server runs within my network. I have enabled port forwarding for 11451 on UDP and TCP on my router. for my subdomain switch.mydomain.com I have set up a proxy redirection, means that when I access switch.smartlife.tk it automatically gets redirected to my local IP 192.168.1.2 and the port 11451.
I can successfully access the LAN Page Info page with switch.smartlife.tk/info

But I am unable to tell the lan play client to just use this domain, it forces me to enter a port number.
On Windows the Client just force closes when entering no port, on linux (raspberrypi) i can see the following:

[ERROR]: Failed to parse and get ip address. --relay-server-addr: switch.smartlife.tk

If it is technically not possible because of your first explanation, then its fine, I just thought that this should be doable.

@drizuid
Copy link
Contributor

drizuid commented Aug 28, 2021

@FaserF it could be because you also have ipv6, dns prefers ipv6 over ipv4, so when you use the fqdn, it's trying to connect to the ipv6 which the client doesn't support. Since there's 0 support for v6 at this time, there's no method to specify using the ipv4 ip. The only other potential option would be to put ONLY the ipv4 in your /etc/hosts (or windows hosts) and it will stop looking up the ipv6

@FaserF
Copy link
Author

FaserF commented Aug 28, 2021

I‘ve got an ipv4 Adress (only) unfortunately :/
So this should not be the issue

@drizuid
Copy link
Contributor

drizuid commented Aug 30, 2021

I‘ve got an ipv4 Adress (only) unfortunately :/
So this should not be the issue

not according to the DNS lookup.

Non-authoritative answer:
Name:    switch.smartlife.tk
Addresses:  2606:4700:3030::6815:5def
          2606:4700:3031::ac43:d8b3
          104.21.93.239
          172.67.216.179

based on the above, it is likely precisely what i stated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants