mirror of
https://github.com/Ylianst/MeshCentralRouter
synced 2025-12-06 00:13:33 +00:00
Merge pull request #57 from fornax-a/master
Better handle missing system proxy/credentials
This commit is contained in:
@@ -289,12 +289,11 @@ namespace MeshCentralRouter
|
||||
// Send proxy connection request
|
||||
wsrawstream = wsclient.GetStream();
|
||||
|
||||
string userCreds = proxyUri.UserInfo;
|
||||
string basicAuth = "";
|
||||
if (userCreds.Length > 0)
|
||||
if (proxyUri?.UserInfo != null)
|
||||
{
|
||||
// Base64 encode for basic authentication
|
||||
userCreds = System.Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(userCreds));
|
||||
string userCreds = System.Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(proxyUri.UserInfo));
|
||||
basicAuth = "\r\nProxy-Authorization: Basic " + userCreds;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user