chore: ignore verify server key (#398)

This commit is contained in:
hstyi
2025-03-27 11:52:36 +08:00
committed by GitHub
parent d8ec7b6d4a
commit 9b84fb4ec8
4 changed files with 1 additions and 27 deletions

View File

@@ -336,30 +336,7 @@ private class MyDialogServerKeyVerifier(private val owner: Window) : ServerKeyVe
remoteAddress: SocketAddress,
serverKey: PublicKey
): Boolean {
if (SshClients.isMiddleware(clientSession)) {
return true
}
val result = AtomicBoolean(false)
SwingUtilities.invokeAndWait {
result.set(
OptionPane.showConfirmDialog(
parentComponent = owner,
message = I18n.getString(
"termora.host.verify-server-key",
remoteAddress.toString().replace("/", StringUtils.EMPTY),
KeyUtils.getKeyType(serverKey),
KeyUtils.getFingerPrint(serverKey)
),
optionType = JOptionPane.OK_CANCEL_OPTION,
messageType = JOptionPane.WARNING_MESSAGE,
) == JOptionPane.OK_OPTION
)
}
return result.get()
return true
}
override fun acceptModifiedServerKey(

View File

@@ -39,7 +39,6 @@ termora.doorman.mnemonic.incorrect=Incorrect mnemonic
# Hosts
termora.host.verify-server-key=Host [{0}] key has been changed<br/><br/>{1} key fingerprint is {2}<br/><br/>Are you sure you want to continue connecting?
termora.host.modified-server-key=HOST [{0}] IDENTIFICATION HAS CHANGED<br/><br/>Expected: {1} key fingerprint is {2}<br/><br/>Actual: {3} key fingerprint is {4}<br/><br/>Are you sure you want to continue connecting?

View File

@@ -37,7 +37,6 @@ termora.doorman.mnemonic.incorrect=助记词错误
# Hosts
termora.host.verify-server-key=主机 [{0}] 密钥已经改变<br/><br/>{1} 的指纹 {2}<br/><br/>你确定要继续连接吗?
termora.host.modified-server-key=主机 [{0}] 身份已发生变化<br/><br/>期待: {1} 的指纹 {2}<br/><br/>实际: {3} 的指纹 {4}<br/><br/>你确定要继续连接吗?

View File

@@ -38,7 +38,6 @@ termora.doorman.mnemonic.incorrect=助記詞錯誤
# Hosts
termora.host.verify-server-key=主機 [{0}] 金鑰已經改變<br/><br/>{1} 的指紋 {2}<br/><br/>你確定要繼續連線嗎?
termora.host.modified-server-key=主機 [{0}] 身分已變更<br/><br/>期待: {1} 的指紋 {2}<br/><br/>實際: {3} 的指紋 {4}<br/><br/>你確定要繼續連線嗎?