update build tools, webpack, etc...
This commit is contained in:
parent
129c1be53c
commit
f64d68d6ee
10 changed files with 990 additions and 19989 deletions
File diff suppressed because one or more lines are too long
8
app/client/public/webssh2.bundle.js.LICENSE
Normal file
8
app/client/public/webssh2.bundle.js.LICENSE
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* The buffer module from node.js, for the browser.
|
||||||
|
*
|
||||||
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! https://mths.be/utf8js v2.1.2 by @mathias */
|
||||||
|
|
@ -292,5 +292,3 @@ body, html {
|
||||||
.dropup:hover .dropbtn {
|
.dropup:hover .dropbtn {
|
||||||
background-color: #3e8e41;
|
background-color: #3e8e41;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJ3ZWJzc2gyLmNzcyIsInNvdXJjZVJvb3QiOiIifQ==*/
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
import io from 'socket.io-client'
|
import io from 'socket.io-client'
|
||||||
import { Terminal } from 'xterm';
|
import { Terminal } from 'xterm'
|
||||||
import { FitAddon } from 'xterm-addon-fit';
|
import { FitAddon } from 'xterm-addon-fit'
|
||||||
import { library, dom } from '@fortawesome/fontawesome-svg-core'
|
import { library, dom } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faBars, faClipboard, faDownload, faKey, faCog } from '@fortawesome/free-solid-svg-icons'
|
import { faBars, faClipboard, faDownload, faKey, faCog } from '@fortawesome/free-solid-svg-icons'
|
||||||
library.add(faBars, faClipboard, faDownload, faKey, faCog)
|
library.add(faBars, faClipboard, faDownload, faKey, faCog)
|
||||||
|
|
@ -20,23 +20,23 @@ var allowreauth = false
|
||||||
var sessionLog, sessionFooter, logDate, currentDate, myFile, errorExists
|
var sessionLog, sessionFooter, logDate, currentDate, myFile, errorExists
|
||||||
var termid // eslint-disable-line
|
var termid // eslint-disable-line
|
||||||
// change path here and in the /app/server/app.js line 115
|
// change path here and in the /app/server/app.js line 115
|
||||||
var socket = io({path: '/ssh/socket.io'})
|
var socket = io({ path: '/ssh/socket.io' })
|
||||||
var term = new Terminal()
|
var term = new Terminal()
|
||||||
const fitAddon = new FitAddon();
|
const fitAddon = new FitAddon()
|
||||||
// DOM properties
|
// DOM properties
|
||||||
var status = document.getElementById('status')
|
var status = document.getElementById('status')
|
||||||
var header = document.getElementById('header')
|
var header = document.getElementById('header')
|
||||||
var dropupContent = document.getElementById('dropupContent')
|
var dropupContent = document.getElementById('dropupContent')
|
||||||
var footer = document.getElementById('footer')
|
var footer = document.getElementById('footer')
|
||||||
var terminalContainer = document.getElementById('terminal-container')
|
var terminalContainer = document.getElementById('terminal-container')
|
||||||
term.loadAddon(fitAddon);
|
term.loadAddon(fitAddon)
|
||||||
term.open(terminalContainer)
|
term.open(terminalContainer)
|
||||||
term.focus()
|
term.focus()
|
||||||
fitAddon.fit();
|
fitAddon.fit()
|
||||||
window.addEventListener('resize', resizeScreen, false)
|
window.addEventListener('resize', resizeScreen, false)
|
||||||
|
|
||||||
function resizeScreen () {
|
function resizeScreen () {
|
||||||
fitAddon.fit();
|
fitAddon.fit()
|
||||||
socket.emit('resize', { cols: term.cols, rows: term.rows })
|
socket.emit('resize', { cols: term.cols, rows: term.rows })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ function resizeScreen () {
|
||||||
// socket.connect()
|
// socket.connect()
|
||||||
} */
|
} */
|
||||||
|
|
||||||
term.onData(data => socket.emit('data', data));
|
term.onData(data => socket.emit('data', data))
|
||||||
|
|
||||||
socket.on('data', function (data) {
|
socket.on('data', function (data) {
|
||||||
term.write(data)
|
term.write(data)
|
||||||
|
|
@ -159,7 +159,7 @@ socket.on('reauth', function () {
|
||||||
(allowreauth) && reauthSession()
|
(allowreauth) && reauthSession()
|
||||||
})
|
})
|
||||||
|
|
||||||
term.onTitleChange(title => document.title = title)
|
term.onTitleChange(title => (document.title = title))
|
||||||
|
|
||||||
// draw/re-draw menu and reattach listeners
|
// draw/re-draw menu and reattach listeners
|
||||||
// when dom is changed, listeners are abandonded
|
// when dom is changed, listeners are abandonded
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,7 @@
|
||||||
var config = require('./server/app').config
|
var config = require('./server/app').config
|
||||||
var server = require('./server/app').server
|
var server = require('./server/app').server
|
||||||
|
|
||||||
server.listen({ host: config.listen.ip, port: config.listen.port
|
server.listen({ host: config.listen.ip, port: config.listen.port })
|
||||||
})
|
|
||||||
|
|
||||||
console.log('WebSSH2 service listening on ' + config.listen.ip + ':' + config.listen.port)
|
console.log('WebSSH2 service listening on ' + config.listen.ip + ':' + config.listen.port)
|
||||||
|
|
||||||
|
|
|
||||||
1348
app/package-lock.json
generated
1348
app/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -29,7 +29,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"basic-auth": "^2.0.1",
|
"basic-auth": "^2.0.1",
|
||||||
"colors": "^1.3.2",
|
"colors": "^1.3.2",
|
||||||
"compression": "^1.7.3",
|
"compression": "^1.7.4",
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
"express": "^4.16.4",
|
"express": "^4.16.4",
|
||||||
"express-session": "^1.15.6",
|
"express-session": "^1.15.6",
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
"read-config": "git+https://github.com/billchurch/nodejs-read-config.git",
|
"read-config": "git+https://github.com/billchurch/nodejs-read-config.git",
|
||||||
"socket.io": "^2.1.1",
|
"socket.io": "^2.1.1",
|
||||||
"ssh2": "^0.6.1",
|
"ssh2": "^0.6.1",
|
||||||
"validator": "^10.9.0"
|
"validator": "^11.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node index.js",
|
"start": "node index.js",
|
||||||
|
|
@ -60,24 +60,24 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^1.2.12",
|
"@fortawesome/fontawesome-svg-core": "^1.2.25",
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.6.3",
|
"@fortawesome/free-solid-svg-icons": "^5.11.2",
|
||||||
"clean-webpack-plugin": "^1.0.0",
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
"copy-webpack-plugin": "^4.6.0",
|
"copy-webpack-plugin": "^5.0.4",
|
||||||
"cross-env": "^5.2.0",
|
"cross-env": "^6.0.3",
|
||||||
"css-loader": "^2.1.0",
|
"css-loader": "^3.2.0",
|
||||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^4.2.0",
|
||||||
"nodaemon": "0.0.5",
|
"nodaemon": "0.0.5",
|
||||||
"postcss-discard-comments": "^4.0.1",
|
"postcss-discard-comments": "^4.0.2",
|
||||||
"snazzy": "^8.0.0",
|
"snazzy": "^8.0.0",
|
||||||
"standard": "^12.0.1",
|
"standard": "^14.3.1",
|
||||||
"style-loader": "^0.23.1",
|
"style-loader": "^1.0.0",
|
||||||
"terser-webpack-plugin": "^2.1.2",
|
"terser-webpack-plugin": "^2.1.2",
|
||||||
"url-loader": "^1.1.2",
|
"url-loader": "^2.1.0",
|
||||||
"webpack": "^4.28.4",
|
"webpack": "^4.41.0",
|
||||||
"webpack-cli": "^3.2.1",
|
"webpack-cli": "^3.3.9",
|
||||||
"webpack-merge": "^4.2.1",
|
"webpack-merge": "^4.2.2",
|
||||||
"webpack-stream": "^5.2.1",
|
"webpack-stream": "^5.2.1",
|
||||||
"xterm": "^4.0.2",
|
"xterm": "^4.0.2",
|
||||||
"xterm-addon-fit": "^0.2.1"
|
"xterm-addon-fit": "^0.2.1"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
const webpack = require('webpack')
|
// const webpack = require('webpack')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const CleanWebpackPlugin = require('clean-webpack-plugin')
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
@ -9,7 +9,7 @@ module.exports = {
|
||||||
webssh2: './client/src/js/index.js'
|
webssh2: './client/src/js/index.js'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new CleanWebpackPlugin(['client/public'], {
|
new CleanWebpackPlugin({
|
||||||
root: path.resolve('__dirname', '../'),
|
root: path.resolve('__dirname', '../'),
|
||||||
verbose: true
|
verbose: true
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
const merge = require('webpack-merge')
|
const merge = require('webpack-merge')
|
||||||
const common = require('./webpack.common.js')
|
const common = require('./webpack.common.js')
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin')
|
||||||
|
|
||||||
module.exports = merge(common,{
|
module.exports = merge(common, {
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
minimizer: [
|
minimizer: [
|
||||||
|
|
@ -20,9 +20,9 @@ module.exports = merge(common,{
|
||||||
ie8: false,
|
ie8: false,
|
||||||
keep_classnames: undefined,
|
keep_classnames: undefined,
|
||||||
keep_fnames: false,
|
keep_fnames: false,
|
||||||
safari10: false,
|
safari10: false
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -13,49 +13,49 @@ var logger = require('morgan')
|
||||||
|
|
||||||
// sane defaults if config.json or parts are missing
|
// sane defaults if config.json or parts are missing
|
||||||
let config = {
|
let config = {
|
||||||
'listen': {
|
listen: {
|
||||||
'ip': '0.0.0.0',
|
ip: '0.0.0.0',
|
||||||
'port': 2222
|
port: 2222
|
||||||
},
|
},
|
||||||
'user': {
|
user: {
|
||||||
'name': null,
|
name: null,
|
||||||
'password': null
|
password: null
|
||||||
},
|
},
|
||||||
'ssh': {
|
ssh: {
|
||||||
'host': null,
|
host: null,
|
||||||
'port': 22,
|
port: 22,
|
||||||
'term': 'xterm-color',
|
term: 'xterm-color',
|
||||||
'readyTimeout': 20000,
|
readyTimeout: 20000,
|
||||||
'keepaliveInterval': 120000,
|
keepaliveInterval: 120000,
|
||||||
'keepaliveCountMax': 10
|
keepaliveCountMax: 10
|
||||||
},
|
},
|
||||||
'terminal': {
|
terminal: {
|
||||||
'cursorBlink': true,
|
cursorBlink: true,
|
||||||
'scrollback': 10000,
|
scrollback: 10000,
|
||||||
'tabStopWidth': 8,
|
tabStopWidth: 8,
|
||||||
'bellStyle': 'sound'
|
bellStyle: 'sound'
|
||||||
},
|
},
|
||||||
'header': {
|
header: {
|
||||||
'text': null,
|
text: null,
|
||||||
'background': 'green'
|
background: 'green'
|
||||||
},
|
},
|
||||||
'session': {
|
session: {
|
||||||
'name': 'WebSSH2',
|
name: 'WebSSH2',
|
||||||
'secret': 'mysecret'
|
secret: 'mysecret'
|
||||||
},
|
},
|
||||||
'options': {
|
options: {
|
||||||
'challengeButton': true,
|
challengeButton: true,
|
||||||
'allowreauth': true
|
allowreauth: true
|
||||||
},
|
},
|
||||||
'algorithms': {
|
algorithms: {
|
||||||
'kex': [
|
kex: [
|
||||||
'ecdh-sha2-nistp256',
|
'ecdh-sha2-nistp256',
|
||||||
'ecdh-sha2-nistp384',
|
'ecdh-sha2-nistp384',
|
||||||
'ecdh-sha2-nistp521',
|
'ecdh-sha2-nistp521',
|
||||||
'diffie-hellman-group-exchange-sha256',
|
'diffie-hellman-group-exchange-sha256',
|
||||||
'diffie-hellman-group14-sha1'
|
'diffie-hellman-group14-sha1'
|
||||||
],
|
],
|
||||||
'cipher': [
|
cipher: [
|
||||||
'aes128-ctr',
|
'aes128-ctr',
|
||||||
'aes192-ctr',
|
'aes192-ctr',
|
||||||
'aes256-ctr',
|
'aes256-ctr',
|
||||||
|
|
@ -65,23 +65,23 @@ let config = {
|
||||||
'aes256-gcm@openssh.com',
|
'aes256-gcm@openssh.com',
|
||||||
'aes256-cbc'
|
'aes256-cbc'
|
||||||
],
|
],
|
||||||
'hmac': [
|
hmac: [
|
||||||
'hmac-sha2-256',
|
'hmac-sha2-256',
|
||||||
'hmac-sha2-512',
|
'hmac-sha2-512',
|
||||||
'hmac-sha1'
|
'hmac-sha1'
|
||||||
],
|
],
|
||||||
'compress': [
|
compress: [
|
||||||
'none',
|
'none',
|
||||||
'zlib@openssh.com',
|
'zlib@openssh.com',
|
||||||
'zlib'
|
'zlib'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'serverlog': {
|
serverlog: {
|
||||||
'client': false,
|
client: false,
|
||||||
'server': false
|
server: false
|
||||||
},
|
},
|
||||||
'accesslog': false,
|
accesslog: false,
|
||||||
'verify': false
|
verify: false
|
||||||
}
|
}
|
||||||
|
|
||||||
// test if config.json exists, if not provide error message but try to run
|
// test if config.json exists, if not provide error message but try to run
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue