diff --git a/public/.eslintrc b/public/.eslintrc deleted file mode 100644 index af01919..0000000 --- a/public/.eslintrc +++ /dev/null @@ -1,51 +0,0 @@ -{ - "extends": "standard", - "env": { - "es6": true, - "jest": true, - "browser": true - }, - "globals": { - "GENTLY": true, - "chrome": true, - "hterm" : true, - "lib" : true, - "io" : true - }, - "rules": { - "no-multi-spaces": 0, - "comma-dangle": [ - "error", - "always-multiline" - ], - "key-spacing": [ - "error", - { - "multiLine": { - "beforeColon": false, - "afterColon": true - }, - "align": { - "beforeColon": false, - "afterColon": true, - "on": "colon", - "mode": "strict" - } - } - ], - "semi": [ - "error", - "always" - ], - "no-var": [ - "error" - ], - "prefer-const": [ - "error", - { - "destructuring": "any", - "ignoreReadBeforeAssign": false - } - ] - } -} diff --git a/wetty.js b/wetty.js index 986781a..e8110a7 100644 --- a/wetty.js +++ b/wetty.js @@ -48,7 +48,9 @@ export default (port, globalsshuser, sshhost, sshport, sshauth, sslopts) => { const ssh = match ? `${match[0].split('/ssh/').pop()}@${sshhost}` : sshAddress; const cmd = process.getuid() === 0 && sshhost === 'localhost' ? '/bin/login' : './bin/ssh'; const args = - cmd === './bin/ssh' ? [ssh, '-p', sshport, '-o', `PreferredAuthentications=${sshauth}`] : []; + cmd === './bin/ssh' + ? [ssh, '-p', sshport, '-o', `PreferredAuthentications=${sshauth}`] + : ['-h', socket.client.conn.remoteAddress.split(':')[3]]; const term = pty.spawn(cmd, args, { name: 'xterm-256color', cols: 80,