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

Fix SERVER_SRS_HOST_AUTO #676

Merged
merged 1 commit into from
Oct 21, 2023
Merged

Fix SERVER_SRS_HOST_AUTO #676

merged 1 commit into from
Oct 21, 2023

Conversation

Camble
Copy link
Contributor

@Camble Camble commented Sep 30, 2023

This fixes the SERVER_SRS_HOST_AUTO by making use of net.get_server_host() on the client-side.

I've updated the auto-connect message to only send the port if SERVER_SRS_HOST_AUTO is enabled, otherwise it uses the original message with SERVER_SRS_HOST and SERVER_SRS_PORT.

I've removed the isAutoConnectMessage function in favour of regex matching. We try to get the port from the message, if this fails, fallback to matching on IP and Port.

@ciribob
Copy link
Owner

ciribob commented Sep 30, 2023

Thats a really interesting idea! I like this a lot as it reduces the message size as well.

Only comment would be to leave AUTO_HOST false by default (as thats the current behaviour) but otherwise very happy to merge.

Thanks!

@Camble
Copy link
Contributor Author

Camble commented Sep 30, 2023

Ah, sorry about that. I was under the impression the default was true prior to issues obtaining the IP address. I'll change it back.

…ect message

The receiver can then use net.get_server_host() to include the IP address of the server
@ciribob
Copy link
Owner

ciribob commented Oct 1, 2023

Gotcha! No worries. The Auto IP was always opt in as a surprising number of servers actually ran the SRS server on a different server (or at least public IP) to their actual DCS Server

I'll add this to the next release and do a bit of backwards compatibility testing as well. Thanks for the contribution!

@ciribob ciribob merged commit e33f95e into ciribob:master Oct 21, 2023
@ciribob
Copy link
Owner

ciribob commented Oct 23, 2023

Ah sorry need to revert for now

the Port is optional on the autoconnect GameGUI (try Hoggit GAW) so it wont match that example

image

@ciribob
Copy link
Owner

ciribob commented Oct 23, 2023 via email

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

Successfully merging this pull request may close these issues.

2 participants