From 5d96f40490085cd7297a98104edef5f0a6fb5627 Mon Sep 17 00:00:00 2001 From: butlerx Date: Mon, 14 Aug 2017 21:36:39 +0100 Subject: [PATCH] add ip of client to host login --- public/.eslintrc | 51 ------------------------------------------------ wetty.js | 2 +- 2 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 public/.eslintrc 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 7848c1a..944f5da 100644 --- a/wetty.js +++ b/wetty.js @@ -48,7 +48,7 @@ export default (port, globalsshuser, sshhost, sshport, sshauth, sslopts) => { const ssh = match ? `${match[0].split('/ssh/').pop()}@${sshhost}` : sshAddress; const args = process.getuid() === 0 && sshhost === 'localhost' - ? ['login'] + ? ['login', '-h', socket.client.conn.remoteAddress.split(':')[3]] : [ssh, '-p', sshport, '-o', `PreferredAuthentications=${sshauth}`]; const term = pty.spawn('/usr/bin/env', args, { name: 'xterm-256color',