mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
* Implements automatic loopback handling for standalone regions.
* This /should/ make OpenSim behave properly when hosting behind a NAT router and utilizing port forwarding (but the router doesn't support Loopback)
This commit is contained in:
@@ -279,11 +279,17 @@ namespace OpenSim.Framework.Communications.Services
|
||||
|
||||
if (m_serversInfo.HttpUsesSSL)
|
||||
{
|
||||
seedcap = "https://" + m_serversInfo.HttpSSLCN + ":" + regionInfo.HttpPort + capsSeedPath;
|
||||
// For NAT
|
||||
string host = NetworkUtil.GetHostFor(remoteClient.Address, m_serversInfo.HttpSSLCN);
|
||||
|
||||
seedcap = "https://" + host + ":" + m_serversInfo.httpSSLPort + capsSeedPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
seedcap = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + capsSeedPath;
|
||||
// For NAT
|
||||
string host = NetworkUtil.GetHostFor(remoteClient.Address, regionInfo.ExternalHostName);
|
||||
|
||||
seedcap = "http://" + host + ":" + m_serversInfo.HttpListenerPort + capsSeedPath;
|
||||
}
|
||||
|
||||
response.SeedCapability = seedcap;
|
||||
|
||||
Reference in New Issue
Block a user