fix: config move algorithims to ssh property
This commit is contained in:
parent
6ff58c55f5
commit
52a989bbb2
3 changed files with 108 additions and 76 deletions
|
@ -31,19 +31,7 @@ const defaultConfig = {
|
|||
readyTimeout: 20000,
|
||||
keepaliveInterval: 120000,
|
||||
keepaliveCountMax: 10,
|
||||
alwaysSendKeyboardInteractivePrompts: false
|
||||
},
|
||||
header: {
|
||||
text: null,
|
||||
background: "green"
|
||||
},
|
||||
options: {
|
||||
challengeButton: true,
|
||||
autoLog: false,
|
||||
allowReauth: true,
|
||||
allowReconnect: true,
|
||||
allowReplay: true
|
||||
},
|
||||
alwaysSendKeyboardInteractivePrompts: false,
|
||||
algorithms: {
|
||||
kex: [
|
||||
"ecdh-sha2-nistp256",
|
||||
|
@ -63,7 +51,30 @@ const defaultConfig = {
|
|||
"aes256-cbc"
|
||||
],
|
||||
hmac: ["hmac-sha2-256", "hmac-sha2-512", "hmac-sha1"],
|
||||
serverHostKey: [
|
||||
"ssh-ed25519",
|
||||
"rsa-sha2-512",
|
||||
"rsa-sha2-256",
|
||||
"ecdsa-sha2-nistp256",
|
||||
"ecdsa-sha2-nistp384",
|
||||
"ecdsa-sha2-nistp521",
|
||||
"rsa-sha2-512",
|
||||
"rsa-sha2-256",
|
||||
"ssh-rsa"
|
||||
],
|
||||
compress: ["none", "zlib@openssh.com", "zlib"]
|
||||
}
|
||||
},
|
||||
header: {
|
||||
text: null,
|
||||
background: "green"
|
||||
},
|
||||
options: {
|
||||
challengeButton: true,
|
||||
autoLog: false,
|
||||
allowReauth: true,
|
||||
allowReconnect: true,
|
||||
allowReplay: true
|
||||
},
|
||||
session: {
|
||||
secret: process.env.WEBSSH_SESSION_SECRET || generateSecureSecret(),
|
||||
|
|
|
@ -38,7 +38,33 @@ const configSchema = {
|
|||
term: { type: "string" },
|
||||
readyTimeout: { type: "integer" },
|
||||
keepaliveInterval: { type: "integer" },
|
||||
keepaliveCountMax: { type: "integer" }
|
||||
keepaliveCountMax: { type: "integer" },
|
||||
algorithms: {
|
||||
type: "object",
|
||||
properties: {
|
||||
kex: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
cipher: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
hmac: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
serverHostKey: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
compress: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
}
|
||||
},
|
||||
required: ["kex", "cipher", "hmac", "serverHostKey", "compress"]
|
||||
}
|
||||
},
|
||||
required: [
|
||||
"host",
|
||||
|
@ -68,28 +94,6 @@ const configSchema = {
|
|||
},
|
||||
required: ["challengeButton", "allowReauth", "allowReplay"]
|
||||
},
|
||||
algorithms: {
|
||||
type: "object",
|
||||
properties: {
|
||||
kex: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
cipher: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
hmac: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
compress: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
}
|
||||
},
|
||||
required: ["kex", "cipher", "hmac", "compress"]
|
||||
},
|
||||
session: {
|
||||
type: "object",
|
||||
properties: {
|
||||
|
@ -99,6 +103,6 @@ const configSchema = {
|
|||
required: ["secret", "name"]
|
||||
}
|
||||
},
|
||||
required: ["listen", "http", "user", "ssh", "header", "options", "algorithms"]
|
||||
required: ["listen", "http", "user", "ssh", "header", "options"]
|
||||
}
|
||||
module.exports = configSchema
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
"password": null,
|
||||
"privatekey": null
|
||||
},
|
||||
"session": {
|
||||
"secret": "secret",
|
||||
"name": "webssh2"
|
||||
},
|
||||
"ssh": {
|
||||
"host": null,
|
||||
"port": 22,
|
||||
|
@ -20,21 +24,11 @@
|
|||
"readyTimeout": 20000,
|
||||
"keepaliveInterval": 120000,
|
||||
"keepaliveCountMax": 10,
|
||||
"allowedSubnets": []
|
||||
},
|
||||
"header": {
|
||||
"text": null,
|
||||
"background": "green"
|
||||
},
|
||||
"options": {
|
||||
"challengeButton": true,
|
||||
"autoLog": false,
|
||||
"allowReauth": true,
|
||||
"allowReconnect": true,
|
||||
"allowReplay": true
|
||||
},
|
||||
"allowedSubnets": [],
|
||||
"alwaysSendKeyboardInteractivePrompts": false,
|
||||
"algorithms": {
|
||||
"kex": [
|
||||
"curve25519-sha256",
|
||||
"ecdh-sha2-nistp256",
|
||||
"ecdh-sha2-nistp384",
|
||||
"ecdh-sha2-nistp521",
|
||||
|
@ -60,6 +54,29 @@
|
|||
"none",
|
||||
"zlib@openssh.com",
|
||||
"zlib"
|
||||
],
|
||||
"serverHostKey": [
|
||||
"ssh-ed25519",
|
||||
"rsa-sha2-512",
|
||||
"rsa-sha2-256",
|
||||
"ecdsa-sha2-nistp256",
|
||||
"ecdsa-sha2-nistp384",
|
||||
"ecdsa-sha2-nistp521",
|
||||
"rsa-sha2-512",
|
||||
"rsa-sha2-256",
|
||||
"ssh-rsa"
|
||||
]
|
||||
}
|
||||
},
|
||||
"header": {
|
||||
"text": null,
|
||||
"background": "green"
|
||||
},
|
||||
"options": {
|
||||
"challengeButton": true,
|
||||
"autoLog": false,
|
||||
"allowReauth": true,
|
||||
"allowReconnect": true,
|
||||
"allowReplay": true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue