mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
Compare commits
1 Commits
2.0.0-beta
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
124acb2d7d |
@@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
kotlin = "2.2.21"
|
||||
kotlin = "2.2.20"
|
||||
slf4j = "2.0.17"
|
||||
pty4j = "0.13.10"
|
||||
tinylog = "2.7.0"
|
||||
@@ -16,7 +16,7 @@ commons-vfs2 = "2.10.0"
|
||||
swingx = "1.6.5-1"
|
||||
jgoodies-forms = "1.9.0"
|
||||
jfa = "1.2.0"
|
||||
oshi = "6.9.1"
|
||||
oshi = "6.9.0"
|
||||
versioncompare = "1.4.1"
|
||||
jna = "5.18.1"
|
||||
jSystemThemeDetector = "3.9.1"
|
||||
@@ -28,21 +28,21 @@ okhttp = "5.2.1"
|
||||
sshj = "0.39.0"
|
||||
sshd-core = "2.15.0"
|
||||
jgit = "7.4.0.202509020913-r"
|
||||
commonmark = "0.27.0"
|
||||
commonmark = "0.26.0"
|
||||
jnafilechooser = "1.1.2"
|
||||
xodus = "2.0.1"
|
||||
bip39 = "1.0.9"
|
||||
colorpicker = "2.0.1"
|
||||
rhino = "1.8.0"
|
||||
delight-rhino-sandbox = "0.2.1"
|
||||
testcontainers = "2.0.1"
|
||||
mixpanel = "1.5.4"
|
||||
delight-rhino-sandbox = "0.0.17"
|
||||
testcontainers = "2.0.0"
|
||||
mixpanel = "1.5.3"
|
||||
jSerialComm = "2.11.2"
|
||||
ini4j = "0.5.5-2"
|
||||
restart4j = "0.0.1"
|
||||
eddsa = "0.3.0"
|
||||
exposed = "1.0.0-rc-2"
|
||||
h2 = "2.3.232"
|
||||
h2 = "2.4.240"
|
||||
sqlite = "3.50.3.0"
|
||||
jug = "5.1.1"
|
||||
semver4j = "6.0.0"
|
||||
@@ -70,7 +70,7 @@ flatlafextras = { group = "com.formdev", name = "flatlaf-extras", version.ref =
|
||||
flatlafswingx = { module = "com.formdev:flatlaf-swingx", version.ref = "flatlaf" }
|
||||
testcontainers-bom = { module = "org.testcontainers:testcontainers-bom", version.ref = "testcontainers" }
|
||||
testcontainers = { module = "org.testcontainers:testcontainers" }
|
||||
testcontainers-junit-jupiter = { module = "org.testcontainers:testcontainers-junit-jupiter" }
|
||||
testcontainers-junit-jupiter = { module = "org.testcontainers:junit-jupiter" }
|
||||
swingx = { module = "org.swinglabs.swingx:swingx-all", version.ref = "swingx" }
|
||||
jgoodies-forms = { module = "com.jgoodies:jgoodies-forms", version.ref = "jgoodies-forms" }
|
||||
jna = { module = "net.java.dev.jna:jna", version.ref = "jna" }
|
||||
|
||||
@@ -2,7 +2,7 @@ plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
}
|
||||
|
||||
project.version = "0.0.4"
|
||||
project.version = "0.0.3"
|
||||
|
||||
dependencies {
|
||||
testImplementation(kotlin("test"))
|
||||
|
||||
@@ -42,7 +42,6 @@ class SMBHostOptionsPane : OptionsPane() {
|
||||
sftpDefaultDirectory = sftpOption.defaultDirectoryField.text,
|
||||
extras = mutableMapOf(
|
||||
"smb.share" to generalOption.shareTextField.text,
|
||||
"smb.domain" to generalOption.domainTextField.text,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -67,7 +66,6 @@ class SMBHostOptionsPane : OptionsPane() {
|
||||
generalOption.remarkTextArea.text = host.remark
|
||||
generalOption.passwordTextField.text = host.authentication.password
|
||||
generalOption.shareTextField.text = host.options.extras["smb.share"] ?: StringUtils.EMPTY
|
||||
generalOption.domainTextField.text = host.options.extras["smb.domain"] ?: StringUtils.EMPTY
|
||||
|
||||
sftpOption.defaultDirectoryField.text = host.options.sftpDefaultDirectory
|
||||
}
|
||||
@@ -116,7 +114,6 @@ class SMBHostOptionsPane : OptionsPane() {
|
||||
val nameTextField = OutlineTextField(128)
|
||||
val shareTextField = OutlineTextField(256)
|
||||
val usernameTextField = OutlineComboBox<String>()
|
||||
val domainTextField = OutlineTextField(128)
|
||||
val hostTextField = OutlineTextField(255)
|
||||
val passwordTextField = OutlinePasswordField(255)
|
||||
val remarkTextArea = FixedLengthTextArea(512)
|
||||
@@ -191,9 +188,7 @@ class SMBHostOptionsPane : OptionsPane() {
|
||||
.add(portTextField).xy(7, rows).apply { rows += step }
|
||||
|
||||
.add("${I18n.getString("termora.new-host.general.username")}:").xy(1, rows)
|
||||
.add(usernameTextField).xy(3, rows)
|
||||
.add("${SMBI18n.getString("termora.plugins.smb.domain")}:").xy(5, rows)
|
||||
.add(domainTextField).xy(7, rows).apply { rows += step }
|
||||
.add(usernameTextField).xyw(3, rows, 5).apply { rows += step }
|
||||
|
||||
.add("${I18n.getString("termora.new-host.general.password")}:").xy(1, rows)
|
||||
.add(passwordTextField).xyw(3, rows, 5).apply { rows += step }
|
||||
|
||||
@@ -30,7 +30,6 @@ class SMBProtocolProvider private constructor() : TransferProtocolProvider {
|
||||
val client = SMBClient()
|
||||
val host = requester.host
|
||||
val connection = client.connect(host.host, host.port)
|
||||
val domain = host.options.extras["smb.domain"] ?: StringUtils.EMPTY
|
||||
val session = when (host.username) {
|
||||
"Guest" -> connection.authenticate(AuthenticationContext.guest())
|
||||
"Anonymous" -> connection.authenticate(AuthenticationContext.anonymous())
|
||||
@@ -38,7 +37,7 @@ class SMBProtocolProvider private constructor() : TransferProtocolProvider {
|
||||
AuthenticationContext(
|
||||
host.username,
|
||||
host.authentication.password.toCharArray(),
|
||||
domain.ifBlank { null }
|
||||
null
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
termora.plugins.smb.share=Share name
|
||||
termora.plugins.smb.domain=Domain
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
termora.plugins.smb.share=共享名称
|
||||
termora.plugins.smb.domain=域名
|
||||
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
termora.plugins.smb.share=共享名稱
|
||||
termora.plugins.smb.domain=網域
|
||||
|
||||
|
||||
@@ -10,11 +10,15 @@ import com.formdev.flatlaf.extras.FlatInspector
|
||||
import com.formdev.flatlaf.ui.FlatTableCellBorder
|
||||
import com.formdev.flatlaf.util.SystemInfo
|
||||
import com.jthemedetecor.OsThemeDetector
|
||||
import com.mixpanel.mixpanelapi.ClientDelivery
|
||||
import com.mixpanel.mixpanelapi.MessageBuilder
|
||||
import com.mixpanel.mixpanelapi.MixpanelAPI
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import org.apache.commons.io.FileUtils
|
||||
import org.apache.commons.lang3.LocaleUtils
|
||||
import org.apache.commons.lang3.SystemUtils
|
||||
import org.json.JSONObject
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.awt.*
|
||||
import java.awt.desktop.AppReopenedEvent
|
||||
@@ -365,8 +369,61 @@ class ApplicationRunner {
|
||||
if (Application.isUnknownVersion()) {
|
||||
return
|
||||
}
|
||||
MixpanelService.getInstance().push("launch")
|
||||
|
||||
swingCoroutineScope.launch(Dispatchers.IO) {
|
||||
try {
|
||||
val properties = JSONObject()
|
||||
properties.put("os", SystemUtils.OS_NAME)
|
||||
if (SystemInfo.isLinux) {
|
||||
properties.put("platform", "Linux")
|
||||
} else if (SystemInfo.isWindows) {
|
||||
properties.put("platform", "Windows")
|
||||
} else if (SystemInfo.isMacOS) {
|
||||
properties.put("platform", "macOS")
|
||||
}
|
||||
properties.put("version", Application.getVersion())
|
||||
properties.put("language", Locale.getDefault().toString())
|
||||
val message = MessageBuilder("0871335f59ee6d0eb246b008a20f9d1c")
|
||||
.event(getAnalyticsUserID(), "launch", properties)
|
||||
val delivery = ClientDelivery()
|
||||
delivery.addMessage(message)
|
||||
val endpoints = listOf(
|
||||
"https://api-eu.mixpanel.com",
|
||||
"https://api-in.mixpanel.com",
|
||||
"https://api.mixpanel.com",
|
||||
"http://api.mixpanel.com",
|
||||
)
|
||||
for (endpoint in endpoints) {
|
||||
try {
|
||||
MixpanelAPI(
|
||||
"$endpoint/track",
|
||||
"$endpoint/engage",
|
||||
"$endpoint/groups"
|
||||
).deliver(delivery, true)
|
||||
break
|
||||
} catch (e: Exception) {
|
||||
if (log.isErrorEnabled) {
|
||||
log.error(e.message, e)
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
if (log.isErrorEnabled) {
|
||||
log.error(e.message, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getAnalyticsUserID(): String {
|
||||
val properties = DatabaseManager.getInstance().properties
|
||||
var id = properties.getString("AnalyticsUserID")
|
||||
if (id.isNullOrBlank()) {
|
||||
id = randomUUID()
|
||||
properties.putString("AnalyticsUserID", id)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
package app.termora
|
||||
|
||||
import app.termora.database.DatabaseManager
|
||||
import com.formdev.flatlaf.util.SystemInfo
|
||||
import com.mixpanel.mixpanelapi.ClientDelivery
|
||||
import com.mixpanel.mixpanelapi.MessageBuilder
|
||||
import com.mixpanel.mixpanelapi.MixpanelAPI
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import org.apache.commons.lang3.SystemUtils
|
||||
import org.json.JSONObject
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.util.*
|
||||
|
||||
internal class MixpanelService private constructor() {
|
||||
companion object {
|
||||
private val log = LoggerFactory.getLogger(MixpanelService::class.java)
|
||||
|
||||
fun getInstance(): MixpanelService {
|
||||
return ApplicationScope.forApplicationScope().getOrCreate(MixpanelService::class) { MixpanelService() }
|
||||
}
|
||||
}
|
||||
|
||||
fun push(event: String, extras: Map<String, String> = emptyMap()) {
|
||||
swingCoroutineScope.launch(Dispatchers.IO) {
|
||||
try {
|
||||
val properties = JSONObject()
|
||||
for (entry in extras) {
|
||||
properties.put(entry.key, entry.value)
|
||||
}
|
||||
properties.put("os", SystemUtils.OS_NAME)
|
||||
if (SystemInfo.isLinux) {
|
||||
properties.put("platform", "Linux")
|
||||
} else if (SystemInfo.isWindows) {
|
||||
properties.put("platform", "Windows")
|
||||
} else if (SystemInfo.isMacOS) {
|
||||
properties.put("platform", "macOS")
|
||||
}
|
||||
properties.put("version", Application.getVersion())
|
||||
properties.put("language", Locale.getDefault().toString())
|
||||
val message = MessageBuilder("0871335f59ee6d0eb246b008a20f9d1c")
|
||||
.event(getAnalyticsUserID(), event, properties)
|
||||
val delivery = ClientDelivery()
|
||||
delivery.addMessage(message)
|
||||
val endpoints = listOf(
|
||||
"https://api-eu.mixpanel.com",
|
||||
"https://api-in.mixpanel.com",
|
||||
"https://api.mixpanel.com",
|
||||
"http://api.mixpanel.com",
|
||||
)
|
||||
for (endpoint in endpoints) {
|
||||
try {
|
||||
MixpanelAPI(
|
||||
"$endpoint/track",
|
||||
"$endpoint/engage",
|
||||
"$endpoint/groups"
|
||||
).deliver(delivery, true)
|
||||
break
|
||||
} catch (e: Exception) {
|
||||
if (log.isErrorEnabled) {
|
||||
log.error(e.message, e)
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
if (log.isErrorEnabled) {
|
||||
log.error(e.message, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun getAnalyticsUserID(): String {
|
||||
val properties = DatabaseManager.getInstance().properties
|
||||
var id = properties.getString("AnalyticsUserID")
|
||||
if (id.isNullOrBlank()) {
|
||||
id = randomUUID()
|
||||
properties.putString("AnalyticsUserID", id)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,10 +29,8 @@ class KeymapPanel : JPanel(BorderLayout()) {
|
||||
private val copyBtn = JButton(Icons.copy)
|
||||
private val renameBtn = JButton(Icons.edit)
|
||||
private val deleteBtn = JButton(Icons.delete)
|
||||
private val infoBtn = JButton(Icons.questionMark)
|
||||
private val database get() = DatabaseManager.getInstance()
|
||||
private val allowKeyCodes = mutableSetOf<Int>()
|
||||
private val owner get() = SwingUtilities.getWindowAncestor(this)
|
||||
|
||||
init {
|
||||
initView()
|
||||
@@ -91,8 +89,8 @@ class KeymapPanel : JPanel(BorderLayout()) {
|
||||
box.add(copyBtn)
|
||||
box.add(renameBtn)
|
||||
box.add(deleteBtn)
|
||||
box.add(infoBtn)
|
||||
box.add(Box.createHorizontalGlue())
|
||||
box.border = BorderFactory.createEmptyBorder(0, 0, 6, 0)
|
||||
|
||||
add(box, BorderLayout.NORTH)
|
||||
add(scrollPane, BorderLayout.CENTER)
|
||||
@@ -107,12 +105,6 @@ class KeymapPanel : JPanel(BorderLayout()) {
|
||||
}
|
||||
})
|
||||
|
||||
infoBtn.addActionListener {
|
||||
val color = UIManager.getColor("TextField.placeholderForeground")
|
||||
val msg = I18n.getString("termora.settings.keymap.question", color.red, color.green, color.blue)
|
||||
OptionPane.showMessageDialog(owner, msg)
|
||||
}
|
||||
|
||||
copyBtn.addActionListener {
|
||||
val keymap = getCurrentKeymap()
|
||||
if (keymap != null) {
|
||||
|
||||
@@ -185,13 +185,6 @@ class PluginPanel(val descriptor: PluginPluginDescriptor) : JPanel(), Disposable
|
||||
}
|
||||
}
|
||||
|
||||
MixpanelService.getInstance().push(
|
||||
"uninstall-plugin", mapOf(
|
||||
"pluginName" to descriptor.plugin.getName(),
|
||||
"pluginVersion" to descriptor.version.toString(),
|
||||
)
|
||||
)
|
||||
|
||||
// 询问是否重启
|
||||
TermoraRestarter.getInstance().scheduleRestart(owner)
|
||||
} else {
|
||||
@@ -234,13 +227,6 @@ class PluginPanel(val descriptor: PluginPluginDescriptor) : JPanel(), Disposable
|
||||
}
|
||||
}, button == updateButton)
|
||||
|
||||
MixpanelService.getInstance().push(
|
||||
"${if (button == installButton) "install" else "update"}-plugin", mapOf(
|
||||
"pluginName" to descriptor.plugin.getName(),
|
||||
"pluginVersion" to descriptor.version.toString(),
|
||||
)
|
||||
)
|
||||
|
||||
withContext(Dispatchers.Swing) {
|
||||
installed.add(descriptor.id)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.termora.transfer
|
||||
|
||||
import app.termora.WindowScope
|
||||
import app.termora.plugin.Extension
|
||||
import java.awt.Window
|
||||
import java.nio.file.FileSystem
|
||||
import java.nio.file.Path
|
||||
import javax.swing.JMenuItem
|
||||
@@ -14,7 +14,7 @@ internal interface TransportContextMenuExtension : Extension {
|
||||
* @param fileSystem 为 null 表示可能已经断线,处于不可用状态
|
||||
*/
|
||||
fun createJMenuItem(
|
||||
window: Window,
|
||||
windowScope: WindowScope,
|
||||
fileSystem: FileSystem?,
|
||||
popupMenu: TransportPopupMenu,
|
||||
files: List<Pair<Path, TransportTableModel.Attributes>>
|
||||
|
||||
@@ -108,7 +108,7 @@ internal class TransportPopupMenu(
|
||||
for (extension in extensionManager.getExtensions(TransportContextMenuExtension::class.java)) {
|
||||
try {
|
||||
val menu = extension.createJMenuItem(
|
||||
owner,
|
||||
ApplicationScope.forWindowScope(owner),
|
||||
fileSystem,
|
||||
this,
|
||||
files
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.termora.transfer.internal.sftp
|
||||
|
||||
import app.termora.I18n
|
||||
import app.termora.WindowScope
|
||||
import app.termora.actions.AnAction
|
||||
import app.termora.actions.AnActionEvent
|
||||
import app.termora.randomUUID
|
||||
@@ -8,7 +9,6 @@ import app.termora.transfer.*
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import org.apache.sshd.common.file.util.MockPath
|
||||
import org.apache.sshd.sftp.client.fs.SftpFileSystem
|
||||
import java.awt.Window
|
||||
import java.nio.file.FileSystem
|
||||
import java.nio.file.Path
|
||||
import javax.swing.JMenu
|
||||
@@ -23,7 +23,7 @@ internal class CompressTransportContextMenuExtension private constructor() : Tra
|
||||
}
|
||||
|
||||
override fun createJMenuItem(
|
||||
window: Window,
|
||||
windowScope: WindowScope,
|
||||
fileSystem: FileSystem?,
|
||||
popupMenu: TransportPopupMenu,
|
||||
files: List<Pair<Path, TransportTableModel.Attributes>>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package app.termora.transfer.internal.sftp
|
||||
|
||||
import app.termora.I18n
|
||||
import app.termora.WindowScope
|
||||
import app.termora.actions.AnAction
|
||||
import app.termora.actions.AnActionEvent
|
||||
import app.termora.randomUUID
|
||||
import app.termora.transfer.*
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import org.apache.sshd.sftp.client.fs.SftpFileSystem
|
||||
import java.awt.Window
|
||||
import java.nio.file.FileSystem
|
||||
import java.nio.file.Path
|
||||
import javax.swing.JMenu
|
||||
@@ -21,7 +21,7 @@ internal class ExtractTransportContextMenuExtension private constructor() : Tran
|
||||
}
|
||||
|
||||
override fun createJMenuItem(
|
||||
window: Window,
|
||||
windowScope: WindowScope,
|
||||
fileSystem: FileSystem?,
|
||||
popupMenu: TransportPopupMenu,
|
||||
files: List<Pair<Path, TransportTableModel.Attributes>>
|
||||
|
||||
@@ -3,11 +3,11 @@ package app.termora.transfer.internal.sftp
|
||||
import app.termora.I18n
|
||||
import app.termora.Icons
|
||||
import app.termora.OptionPane
|
||||
import app.termora.WindowScope
|
||||
import app.termora.transfer.TransportContextMenuExtension
|
||||
import app.termora.transfer.TransportPopupMenu
|
||||
import app.termora.transfer.TransportTableModel
|
||||
import org.apache.sshd.sftp.client.fs.SftpFileSystem
|
||||
import java.awt.Window
|
||||
import java.nio.file.FileSystem
|
||||
import java.nio.file.Path
|
||||
import javax.swing.JMenuItem
|
||||
@@ -19,7 +19,7 @@ internal class RmrfTransportContextMenuExtension private constructor() : Transpo
|
||||
}
|
||||
|
||||
override fun createJMenuItem(
|
||||
window: Window,
|
||||
windowScope: WindowScope,
|
||||
fileSystem: FileSystem?,
|
||||
popupMenu: TransportPopupMenu,
|
||||
files: List<Pair<Path, TransportTableModel.Attributes>>
|
||||
@@ -31,7 +31,7 @@ internal class RmrfTransportContextMenuExtension private constructor() : Transpo
|
||||
val rmrfMenu = JMenuItem("rm -rf", Icons.warningIntroduction)
|
||||
rmrfMenu.addActionListener {
|
||||
if (OptionPane.showConfirmDialog(
|
||||
window,
|
||||
windowScope.window,
|
||||
I18n.getString("termora.transport.table.contextmenu.rm-warning"),
|
||||
messageType = JOptionPane.ERROR_MESSAGE
|
||||
) == JOptionPane.YES_OPTION
|
||||
|
||||
@@ -114,7 +114,7 @@ termora.settings.keymap=Keymap
|
||||
termora.settings.keymap.shortcut=Shortcut
|
||||
termora.settings.keymap.action=Action
|
||||
termora.settings.keymap.already-exists=The shortcut [{0}] is already in use by [{1}]
|
||||
termora.settings.keymap.question=Select a line, press the <font color=rgb({0},{1},{2})> ⌫ (Backspace)</font> key to remove the shortcut
|
||||
|
||||
|
||||
termora.settings.sftp.edit-command=Edit Command
|
||||
termora.settings.sftp.db-click-behavior=Double-click
|
||||
|
||||
@@ -99,7 +99,7 @@ termora.settings.keymap=Горяиче клавиши
|
||||
termora.settings.keymap.shortcut=Комбинация
|
||||
termora.settings.keymap.action=Команда
|
||||
termora.settings.keymap.already-exists=Комбинация [{0}] уже используется [{1}]
|
||||
termora.settings.keymap.question=Выберите строку и нажмите <font color=rgb({0},{1},{2})> ⌫ (клавишу Backspace)</font>, чтобы удалить сочетание клавиш
|
||||
|
||||
|
||||
termora.settings.sftp.edit-command=Редактировать команду
|
||||
termora.settings.sftp.db-click-behavior=двойной щелчок
|
||||
|
||||
@@ -125,7 +125,7 @@ termora.settings.keymap=键盘
|
||||
termora.settings.keymap.shortcut=快捷键
|
||||
termora.settings.keymap.action=操作
|
||||
termora.settings.keymap.already-exists=快捷键 [{0}] 已经被 [{1}] 占用
|
||||
termora.settings.keymap.question=选中一行,按下 <font color=rgb({0},{1},{2})> ⌫ (退格键)</font> 移除快捷键
|
||||
|
||||
|
||||
termora.settings.sftp.edit-command=编辑命令
|
||||
termora.settings.sftp.db-click-behavior=双击行为
|
||||
|
||||
@@ -55,7 +55,6 @@ termora.settings.keymap=鍵盤
|
||||
termora.settings.keymap.shortcut=快捷鍵
|
||||
termora.settings.keymap.action=操作
|
||||
termora.settings.keymap.already-exists=快捷鍵 [{0}] 已經被 [{1}] 占用
|
||||
termora.settings.keymap.question=選取一行,按下 <font color=rgb({0},{1},{2})> ⌫ (退格鍵)</font> 移除快速鍵
|
||||
|
||||
termora.settings.sftp.edit-command=編輯命令
|
||||
termora.settings.sftp.db-click-behavior=按兩下行為
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FROM linuxserver/openssh-server:9.3_p2-r1-ls147
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
||||
&& apk update && apk add wget tmux gcc zip p7zip g++ git make zsh htop stress-ng inetutils-telnet xclock xcalc xorg-server xinit && wget https://ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz \
|
||||
&& tar -xf lrzsz-0.12.20.tar.gz && cd lrzsz-0.12.20 && ./configure && make && make install \
|
||||
&& ln -s /usr/local/bin/lrz /usr/local/bin/rz && ln -s /usr/local/bin/lsz /usr/local/bin/sz
|
||||
@@ -7,6 +7,3 @@ RUN sed -i 's/#AllowAgentForwarding yes/AllowAgentForwarding yes/g' /etc/ssh/ssh
|
||||
RUN sed -i 's/AllowTcpForwarding no/AllowTcpForwarding yes/g' /etc/ssh/sshd_config
|
||||
RUN sed -i 's/GatewayPorts no/GatewayPorts yes/g' /etc/ssh/sshd_config
|
||||
RUN sed -i 's/X11Forwarding no/X11Forwarding yes/g' /etc/ssh/sshd_config
|
||||
|
||||
# docker build -t sshd .
|
||||
# docker run --rm -it -e SUDO_ACCESS=true -e PASSWORD_ACCESS=true -e USER_PASSWORD=123456 -p 2222:2222 sshd
|
||||
Reference in New Issue
Block a user