This commit is contained in:
snltty
2024-08-13 10:57:27 +08:00
parent 5d198c4751
commit 6bdb649eaa
2 changed files with 4 additions and 4 deletions

View File

@@ -194,7 +194,7 @@ namespace linker.libs
public string Password { get; set; }
public AesCrypto(in string password)
public AesCrypto(string password)
{
Password = password;
using Aes aes = Aes.Create();
@@ -226,7 +226,7 @@ namespace linker.libs
decryptoTransform.Dispose();
}
private (byte[] Key, byte[] IV) GenerateKeyAndIV(in string password)
private (byte[] Key, byte[] IV) GenerateKeyAndIV(string password)
{
byte[] key = new byte[32];
byte[] iv = new byte[16];

View File

@@ -132,8 +132,8 @@ namespace linker.tunnel
foreach (TunnelTransportItemInfo transportItem in tunnelAdapter.GetTunnelTransports().OrderBy(c=>c.Order).Where(c => c.Disabled == false))
{
ITunnelTransport transport = transports.FirstOrDefault(c => c.Name == transportItem.Name);
//找不到这个打洞协议
if (transport == null)
//找不到这个打洞协议,或者是不支持的协议
if (transport == null || (transport.ProtocolType & denyProtocols) == transport.ProtocolType)
{
continue;
}