mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 21:46:52 +01:00
Makes MakeLocalConnection() used
This commit is contained in:
@@ -149,12 +149,12 @@ namespace TGCommandLine
|
||||
if (res != null)
|
||||
{
|
||||
Console.WriteLine("Unable to connect: " + res);
|
||||
Server.SetRemoteLoginInformation(null, 0, null, null);
|
||||
Server.MakeLocalConnection();
|
||||
}
|
||||
else if (!Server.Authenticate())
|
||||
{
|
||||
Console.WriteLine("Authentication error: Username/password/windows identity is not authorized! Returning to local mode...");
|
||||
Server.SetRemoteLoginInformation(null, 0, null, null);
|
||||
Server.MakeLocalConnection();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -163,7 +163,7 @@ namespace TGCommandLine
|
||||
}
|
||||
break;
|
||||
case "disconnect":
|
||||
Server.SetRemoteLoginInformation(null, 0, null, null);
|
||||
Server.MakeLocalConnection();
|
||||
Console.WriteLine("Switch to local mode");
|
||||
break;
|
||||
case "quit":
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace TGControlPanel
|
||||
|
||||
private void LocalLoginButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Server.SetRemoteLoginInformation(null, 0, null, null);
|
||||
Server.MakeLocalConnection();
|
||||
VerifyAndConnect();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace TGServiceInterface
|
||||
public static void MakeLocalConnection()
|
||||
{
|
||||
HTTPSURL = null;
|
||||
}
|
||||
HTTPSPassword = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the interface to look for services on a remote computer
|
||||
@@ -56,7 +57,7 @@ namespace TGServiceInterface
|
||||
HTTPSPort = port;
|
||||
HTTPSUsername = username;
|
||||
HTTPSPassword = password;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the requested server component interface. This does not guarantee a successful connection
|
||||
@@ -91,12 +92,12 @@ namespace TGServiceInterface
|
||||
{
|
||||
outChannel.Credentials.UserName.UserName = HTTPSUsername;
|
||||
outChannel.Credentials.UserName.Password = HTTPSPassword;
|
||||
}
|
||||
}
|
||||
#if DEBUG
|
||||
//allow self signed certs in debug mode
|
||||
ServicePointManager.ServerCertificateValidationCallback = (sender, cert, chain, error) => true;
|
||||
//allow self signed certs in debug mode
|
||||
ServicePointManager.ServerCertificateValidationCallback = (sender, cert, chain, error) => true;
|
||||
#endif
|
||||
return outChannel.CreateChannel();
|
||||
return outChannel.CreateChannel();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user