sorry prime but it's 7pm here (start improvement on LNL punchthrough section, will complete later) |
m i have no idea what this nerd stuff means but i fixed capitalization issues! |
||
Line 1: | Line 1: | ||
<!--T:1-->Resonite is a feature rich engine that is connected both to other users and the Resonite | <!--T:1-->Resonite is a feature rich engine that is connected both to other users and the Resonite cloud services. If you're concerned or have a firewall you'd like to configure then read on to find out more. | ||
== HTTP & WebSocket Traffic == <!--T:2--> | == HTTP & WebSocket Traffic == <!--T:2--> | ||
Line 9: | Line 9: | ||
* Most HTTPS Traffic is from <code>api.resonite.com</code> | * Most HTTPS Traffic is from <code>api.resonite.com</code> | ||
* SignalR ( | * SignalR (real time updates) makes a WebSocket connection to the Microsoft managed service also at <code>api.resonite.com</code> | ||
* Assets ( | * Assets (avatars, meshes, textures etc.) and other blobs (large files) come from a variety of hosts: | ||
** Asset variants are stored at <code>variants.resonite.com</code> and <code>skyfrost-archive.resonite.com/variants</code> | ** Asset variants are stored at <code>variants.resonite.com</code> and <code>skyfrost-archive.resonite.com/variants</code> | ||
** Assets are stored at <code>assets.resonite.com</code> and <code>skyfrost-archive.resonite.com/assets</code> | ** Assets are stored at <code>assets.resonite.com</code> and <code>skyfrost-archive.resonite.com/assets</code> | ||
Line 59: | Line 59: | ||
<code>lnl://seven.example.com:12100/</code>: DNS direct connection | <code>lnl://seven.example.com:12100/</code>: DNS direct connection | ||
=== UDP | === UDP Hole Punching (LNL NAT Punchthrough) === <!--T:40--> | ||
<!--T:54--> | <!--T:54--> | ||
UDP | UDP hole punching is used by LNL in Resonite in order to establish a bidirectional connection between you and a session host where Network Address Translation (NAT) is in play on one or both sides of a connection. | ||
This is facilitated by one of Resonite's LNL | This is facilitated by one of Resonite's LNL punchthrough servers (the same hosts that can be seen in [[#LNL Relay]]), where both you and the host establish a connection in order to establish a peer to peer connection between you and the host that should be indistinguishable from directly connecting. | ||
<!--T:55--> | <!--T:55--> | ||
If you encounter NAT | If you encounter NAT punchthrough issues, you may be behind a strict, or type 3 NAT; see https://portforward.com/nat-types/ To check this, try one of the following: | ||
To check this, try one of the following: | |||
* If you have Windows 10/11 with | * If you have Windows 10/11 with | ||
** Xbox Console Companion - Settings > Network and click Check Again at least once to ensure it runs a proper check on your NAT type | ** Xbox Console Companion - Settings > Network and click Check Again at least once to ensure it runs a proper check on your NAT type | ||
Line 75: | Line 74: | ||
** Network > Test Internet Connection > NAT Type is Type 3 | ** Network > Test Internet Connection > NAT Type is Type 3 | ||
* If you have a Nintendo Switch | * If you have a Nintendo Switch | ||
** Settings > Internet Settings > Test Connection | ** Settings > Internet Settings > Test Connection Type > … Something. <small>Thanks Nintendo</small> | ||
If you are behind a type 3, there are two paths you can take to move out of it | If you are behind a type 3, there are two paths you can take to move out of it | ||
* Your router has a strict NAT | * Your router has a strict NAT | ||
Line 93: | Line 92: | ||
*** If the two addresses do not match | *** If the two addresses do not match | ||
**** check with your ISP if they can move you from behind a NAT | **** check with your ISP if they can move you from behind a NAT | ||
*** If the two addresses match | *** If the two addresses match: | ||
**** Check the router config | **** Check the router config following the [[Networking Information#Recommended Router Configuration|guidelines outlined here]]. | ||
<!--T:56--> | <!--T:56-->=== Possible Bugs === | ||
<!--T:57--> | * One current issue seems to be that the NAT punchthrough server occasionally does not respond very quickly, and the client does not always wait for a response and tries the next protocol on it’s internal list to attempt.<!--T:57--> | ||
* The punchthrough server does not support IPv6, instead only supporting IPv4. Some ISPs in some parts of the world, such as Japan, use exclusively IPv6. Users in these networks may not be able to use NAT punchthrough (this gets very complicated very quickly, results will vary). | |||
=== LNL Relay === <!--T:50--> | === LNL Relay === <!--T:50--> | ||
<!--T:58--> | <!--T:58--> | ||
This | This comes with performance implications. The relay acts as a third point between both clients, and all traffic is routed through it. Ping will likely be worse here (but not always). If the relay has issues or is overloaded, you may also get service issues. | ||
* We have the following LNL Relays | * We have the following LNL Relays | ||
Line 117: | Line 116: | ||
<!--T:59--> | <!--T:59--> | ||
To better support direct connection conditions it is suggested server hosts try to promote direct IP connections and IPv6 support. | To better support direct connection conditions it is suggested server hosts try to promote direct IP connections and IPv6 support. | ||
Line 133: | Line 133: | ||
<!--T:11--> | <!--T:11--> | ||
Many consumer routers are configured by default to provide optimal connectivity for Resonite by routing traffic in such a way which permits the ability for users to directly establish a connection to other users on the Internet. However, some advanced routers employ a type of NAT (Network Address Translation) where port numbers are not preserved when communicating with other hosts on the | Many consumer routers are configured by default to provide optimal connectivity for Resonite by routing traffic in such a way which permits the ability for users to directly establish a connection to other users on the Internet. However, some advanced routers employ a type of NAT (Network Address Translation) where port numbers are not preserved when communicating with other hosts on the internet. This type of NAT is often referred to as strict, or “Type-3”. As the name implies, the strict nature of this type of NAT does not permit the ability to establish connections with other users. | ||
<!--T:12--> | <!--T:12--> | ||
For the best Resonite experience, it is recommended to configure your router in such a way to permit a | For the best Resonite experience, it is recommended to configure your router in such a way to permit a moderate or Type-2 NAT from the computer running Resonite. Each manufacturer implements this configuration differently and the terminology is not often the same between brands. Please refer to the documentation for your particular router or ask for assistance in the #questions-help forum in the Resonite [https://discord.gg/resonite Discord] server. | ||
=== LNL Relay Support for Strict NAT === <!--T:13--> | === LNL Relay Support for Strict NAT === <!--T:13--> | ||
Resonite provides a method for users who are using a router with | Resonite provides a method for users who are using a router with strict NAT to connect to other users by using an intermediary server known as the Resonite LNL Relay. Although this solution will work for occasional use, it may not provide the best performance depending on geographic location and network load/congestion. | ||
<!--T:14--> | <!--T:14--> | ||
Line 145: | Line 145: | ||
<!--T:15--> | <!--T:15--> | ||
The presence of the “LNL Relay” text typically indicates that either you, the host user, or both users may be behind a | The presence of the “LNL Relay” text typically indicates that either you, the host user, or both users may be behind a strict / Type-3 NAT. If you see this message each time you connect to a world, there is a good chance that you are behind a router that is configured for strict / Type-3 NAT. | ||
<!--T:16--> | <!--T:16--> | ||
It is recommended to use a | It is recommended to use a moderate or Type-2 NAT to avoid the dependency on using the LNL Relay. See the [[Networking Information#Recommended Router Configuration|Router Configuration]] section above for more information. | ||
=== uPNP/NAT-PMP and Port Forwarding === <!--T:17--> | === uPNP/NAT-PMP and Port Forwarding === <!--T:17--> |
Revision as of 07:17, 16 January 2024
Resonite is a feature rich engine that is connected both to other users and the Resonite cloud services. If you're concerned or have a firewall you'd like to configure then read on to find out more.
HTTP & WebSocket Traffic
Things like messages, profile information and items in your inventory are all stored within the Resonite cloud. Your copy of Resonite will use HTTP(S) or WebSockets to retrieve this information.
Here is a list of places you might see connections to:
- Most HTTPS Traffic is from
api.resonite.com
- SignalR (real time updates) makes a WebSocket connection to the Microsoft managed service also at
api.resonite.com
- Assets (avatars, meshes, textures etc.) and other blobs (large files) come from a variety of hosts:
- Asset variants are stored at
variants.resonite.com
andskyfrost-archive.resonite.com/variants
- Assets are stored at
assets.resonite.com
andskyfrost-archive.resonite.com/assets
- Thumbnails are stored at
thumbnails.resonite.com
andskyfrost-archive.resonite.com/thumbnails
- Asset variants are stored at
Session Traffic
When you connect to a Resonite session, you're starting a connection to the session's host. This is usually another user's computer but sometimes can be a headless session which could be hosted in a number of places - two of the most common ones being on someone's spare computer or on a computer rented in a data center.
Depending on your settings and the settings of the session host you'll connect with either one of the following protocols:
- LNL (LiteNetLib)
- Steam Sockets. Sometimes called "Steam Networking Sockets", "Steam Network", "SNS" etc.
LNL
- LNL uses UDP to connect.
- Ports will vary and can be any port depending on the host as it lets the host pick a free port
- In other cases a relay will be used.
- LNL relay is the same as above but port 12600.
- After punch through or relay, the actual connection to the user can be any IP or port.
Steam Sockets
Steam Sockets is a Valve created networking protocol. You can find information on it here
Establishing Connections
Direct IP
In general, direct IP is best. You’re connecting directly with the remote server and are telling Resonite exactly where to go and how to get there (you are connecting with a direct IP address or domain name).
To use direct IP
- Use an OpenWorld ProtoFlux node and add a Uri (purple input second from top) with the IP address and port like this:
lnl://<IPv4 address>:<Port>/
- For IPv6, wrap the address in brackets
lnl://[<IPv6 address>]:<port>/
- You can also use a DNS record for this -
lnl://<domain>:<port>/
- For IPv6, wrap the address in brackets
- A port is currently required as part of the URL
- This is mostly applicable to headless sessions where the session has a static IP address and port. Keep an eye out for session owners providing items that include direct links for their worlds as that will be the most reliable and expedient way to connect to said world.
As an example for a session hosted with the IPv4 address 203.0.113.7
, IPv6 address 2001:db8::7
, the DNS record seven.example.com
on port 12100
:
lnl:///203.0.113.7:12100/
: IPv4 direct connection
lnl://[2001:db8::7]:12100/
: IPv6 direct connection
lnl://seven.example.com:12100/
: DNS direct connection
UDP Hole Punching (LNL NAT Punchthrough)
UDP hole punching is used by LNL in Resonite in order to establish a bidirectional connection between you and a session host where Network Address Translation (NAT) is in play on one or both sides of a connection.
This is facilitated by one of Resonite's LNL punchthrough servers (the same hosts that can be seen in #LNL Relay), where both you and the host establish a connection in order to establish a peer to peer connection between you and the host that should be indistinguishable from directly connecting.
If you encounter NAT punchthrough issues, you may be behind a strict, or type 3 NAT; see https://portforward.com/nat-types/ To check this, try one of the following:
- If you have Windows 10/11 with
- Xbox Console Companion - Settings > Network and click Check Again at least once to ensure it runs a proper check on your NAT type
- Xbox Networking - Click Check Again at least once to ensure it runs a proper check on your NAT type
- If you have a PlayStation 3 or 4
- Network > Test Internet Connection > NAT Type is Type 3
- If you have a Nintendo Switch
- Settings > Internet Settings > Test Connection Type > … Something. Thanks Nintendo
If you are behind a type 3, there are two paths you can take to move out of it
- Your router has a strict NAT
- Update your router's config to not be a strict NAT, this may be called:
- Moderate type 2
- Open
- Strict Port
- Full Cone
- Something else, check your router manual
- Your ISP has put you behind a strict NAT
- To check this ensure the IP address provided to you by the service provider is the same as your public IP.
- To get your public address:
- To get your router address you will need to log into the router, this will be specific to the router.
- If the two addresses do not match
- check with your ISP if they can move you from behind a NAT
- If the two addresses match:
- Check the router config following the guidelines outlined here.
Possible Bugs
- One current issue seems to be that the NAT punchthrough server occasionally does not respond very quickly, and the client does not always wait for a response and tries the next protocol on it’s internal list to attempt.
- The punchthrough server does not support IPv6, instead only supporting IPv4. Some ISPs in some parts of the world, such as Japan, use exclusively IPv6. Users in these networks may not be able to use NAT punchthrough (this gets very complicated very quickly, results will vary).
LNL Relay
This comes with performance implications. The relay acts as a third point between both clients, and all traffic is routed through it. Ping will likely be worse here (but not always). If the relay has issues or is overloaded, you may also get service issues.
- We have the following LNL Relays
- uswest1.resonite.com - US West (Hillsboro, OR)
- au1.resonite.com - Oceania (Sydney, Australia)
- japan1.resonite.com - Asia Pacific (Tokyo, Japan)
- europe.resonite.com - Europe (Helsinki, Finland)
Recommendations for Headless Servers
To better support direct connection conditions it is suggested server hosts try to promote direct IP connections and IPv6 support.
If you have a public IPv4 address that you can use, you can port forward the session's port. To do this, set the forcePort
option for the world in your headless config file & forward the port through your router. You can find out how to do this by searching "<Router Model> port forward" - for most routers, you'll be able to find an example somewhere on the internet.
If you have IPv6 support, use it when possible by setting forcePort
as in the IPv4 example, allowing the session's port through your firewall & direct connecting (See #Direct IP for how to directly connect to a session)
You may not be to port forward in all situations, such as if you're using a router that doesn't let you port forward or if you're behind CGNAT.
If you are behind CGNAT (Carrier Grade NAT), see if you can get off it - depending on your ISP and the type of your internet connection, you may get varying results. Some will take you off CGNAT if you ask, some will get you to pay for a static IP address and some may not allow you to get off CGNAT at all.
If you're having users with issues connecting via LNL punchthrough, direct them to directly connecting to your session. Making an object that connects them - such as a button that they can press and just connect makes doing this quite easy.
Recommended Router Configuration
Many consumer routers are configured by default to provide optimal connectivity for Resonite by routing traffic in such a way which permits the ability for users to directly establish a connection to other users on the Internet. However, some advanced routers employ a type of NAT (Network Address Translation) where port numbers are not preserved when communicating with other hosts on the internet. This type of NAT is often referred to as strict, or “Type-3”. As the name implies, the strict nature of this type of NAT does not permit the ability to establish connections with other users.
For the best Resonite experience, it is recommended to configure your router in such a way to permit a moderate or Type-2 NAT from the computer running Resonite. Each manufacturer implements this configuration differently and the terminology is not often the same between brands. Please refer to the documentation for your particular router or ask for assistance in the #questions-help forum in the Resonite Discord server.
LNL Relay Support for Strict NAT
Resonite provides a method for users who are using a router with strict NAT to connect to other users by using an intermediary server known as the Resonite LNL Relay. Although this solution will work for occasional use, it may not provide the best performance depending on geographic location and network load/congestion.
You can determine if you are connecting through an LNL Relay by the presence of the “LNL Relay” text appearing under the “Loading…” message while joining a world. The presence of the “LNL Relay” text when joining a world means that Resonite was unable to connect to the host user directly and the Resonite LNL Relay server was used.
The presence of the “LNL Relay” text typically indicates that either you, the host user, or both users may be behind a strict / Type-3 NAT. If you see this message each time you connect to a world, there is a good chance that you are behind a router that is configured for strict / Type-3 NAT.
It is recommended to use a moderate or Type-2 NAT to avoid the dependency on using the LNL Relay. See the Router Configuration section above for more information.
uPNP/NAT-PMP and Port Forwarding
Resonite does not currently offer support for port forwarding or uPNP/NAT-PMP.