Skip to content

feat: Add support for connecting via a hostname instead of IP #3441

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

Merged
merged 15 commits into from
May 15, 2025

Conversation

ShadauxCat
Copy link
Collaborator

Add support for connecting via a hostname instead of IP when using supported versions of unity and unity transport.

Changelog

  • Added: When using UnityTransport >=2.4 and Unity >= 6000.1.0a1, SetConnectionData will accept a fully qualified hostname instead of an IP as a connect address on the client side.

Testing and Documentation

  • No tests have been added. (Manual tests were performed. The CI environment doesn't have "localhost" consistently defined to be able to run automated tests.)
  • Includes edits to existing public API documentation.

Backport

Backport: #3440

…pported versions of unity and unity transport.
Adding FQDN validation and updating log errors provided to users.
Adding back the invalid address tests to handle newer and older versions of UTP.
removing comment.
Forgot to update for one of the newer error messages when using an invalid address.
Fixing an issue with `ClientDisconnectMultipleClients` beginning to disconnect clients before they were connected.
Added `UnityTransportTestHelpers.WaitForMultipleNetworkEvents` helper method to wait for a specific number of events of a specified type.
Added a `UnityTransportTestHelpers.VerboseDebug` helper method.
renaming the verbose debug flag to VerboseDebug
removing VerboseDebug check on a VerboseLog call.
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few updates to testing, testing helpers, and updated error message when using a bad IP and/or FQDN.

NoelStephensUnity added a commit that referenced this pull request May 8, 2025
Bringing  the updates from #3441 to the v1.x.x branch.
increasing disconnect timeout for 1st client  during the ClientDisconnectMultipleClients to account for a slower than expected system.
Working around PVP issue.
Re-arranging parameters between both methods.
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) May 8, 2025 20:24
@NoelStephensUnity NoelStephensUnity disabled auto-merge May 8, 2025 20:25
Refactoring the end point parsing within ConnectionAddressData.
@NoelStephensUnity NoelStephensUnity merged commit 48a045a into develop-2.0.0 May 15, 2025
42 checks passed
@NoelStephensUnity NoelStephensUnity deleted the feat/connect_using_hostname_2.0.2 branch May 15, 2025 16:55
NoelStephensUnity added a commit that referenced this pull request May 16, 2025
] (#3440)

Add support for connecting via a hostname instead of IP when using
supported versions of unity and unity transport.

## Changelog

- Added: When using UnityTransport >=2.4 and Unity >= 6000.1.0a1,
`SetConnectionData` will accept a fully qualified hostname instead of an
IP as a connect address on the client side.

## Testing and Documentation

- No tests have been added. (Manual tests were performed. The CI
environment doesn't have "localhost" consistently defined to be able to
run automated tests.)
- Includes edits to existing public API documentation.

## Backport

Backport of
#3441

---------

Co-authored-by: NoelStephensUnity <noel.stephens@unity3d.com>
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.

3 participants