butlerx / wetty Goto Github PK
View Code? Open in Web Editor NEWTerminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)
Home Page: https://butlerx.github.io/wetty
License: MIT License
Terminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)
Home Page: https://butlerx.github.io/wetty
License: MIT License
Hi, nice work!! It's been very useful...
one minor thing, it seems that "tab" autocompletion is not supported or at least I couldn't make it to wotk.
Any suggestions?
Hello, I've tried installing from a git clone and received the following error:
npm http GET https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz
npm http 200 https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz
npm http 200 https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz
> [email protected] install /root/wetty/node_modules/pty.js
> node-gyp rebuild
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-57-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /root/wetty/node_modules/pty.js
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! weird error 1
npm ERR! Error: ENOENT, lstat '/root/tmp/npm-18900-1ajJ8_LR/1453153736493-0.21297033480368555/package/dist/lodash.underscore.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Linux 3.13.0-57-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /root/wetty
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /root/tmp/npm-18900-1ajJ8_LR/1453153736493-0.21297033480368555/package/dist/lodash.underscore.js
npm ERR! fstream_path /root/tmp/npm-18900-1ajJ8_LR/1453153736493-0.21297033480368555/package/dist/lodash.underscore.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/root/tmp/npm-18900-1ajJ8_LR/1453153737388-0.06007509049959481/package/test/test.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Linux 3.13.0-57-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /root/wetty
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /root/tmp/npm-18900-1ajJ8_LR/1453153737388-0.06007509049959481/package/test/test.js
npm ERR! fstream_path /root/tmp/npm-18900-1ajJ8_LR/1453153737388-0.06007509049959481/package/test/test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! tar pack Error reading /root/tmp/npm-18900-1ajJ8_LR/1453153736534-0.860922196181491/package
npm ERR! addLocalDirectory Could not pack "/root/tmp/npm-18900-1ajJ8_LR/1453153736534-0.860922196181491/package" to "/root/.npm/underscore.string/2. 3.3/package.tgz"
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/wetty/npm-debug.log
npm ERR! not ok code 0
I am having problems with german umlauts (äöüÄÖÜ) in wetty and I am not sure if it's a problem upstream or related to wetty. I managed to get german umlauts displayed correct if I set the keyboard character endoding to raw in the JavaScript console: `term.keyboard.characterEncoding='raw'``
The second problem is related to Alt Gr key. I am unable to print a '@' sign. If I press AltGr+Q
I am getting the follwing characters in the wetty console ^[
. I can copy & paste an '@' sign from an external editor as well as in wetty itself. So I doubt it an encoding problem or something.
Obviously I am a german user, with a german keyboard layout :-)
Any ideas?
I'm using a reverse proxy called Pound on my system.
On connecting:
http on port 8080
Thu Jul 16 2015 12:24:45 GMT+0200 (CEST) Connection accepted.
Error: TypeError: Cannot call method 'end' of undefined
And have only a red frozen cursor on the client - no error messages in the client console.
How could I troubleshoot this, and what settings are recommended in general for a proxy?
I searched and didn't see an existing issue. Can you support docker attach API so that we can run a browser terminal for another docker container? See docker API https://docs.docker.com/engine/reference/api/docker_remote_api_v1.22/#attach-to-a-container
I am noticing that there are quite a few linux zombie processes after normal login and out through wetty. All the linux zombie process are [ssh] so I suspect that the ssh is never closed properly by wetty. Unfortunately, aside from restarting the node server, I don't quite know how to fix this. Any ideas?
I had to modify the proxy configuration for nginx as follows:
(otherwise the js-files are not loaded..) just for info :)
Thank you for this GREAT software! :-) and keep up the good
work!!
Kind regards,
-Ingo
location ^~ /wetty {
proxy_pass http://127.0.0.1:3000/wetty/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 43200000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
}
Hello, thanks for great work.
To work with sub urls.(for example https://blabla.com/wetty/) I have changed these lines.
Some changes are just non-important relative path things but as you notice that I had to remove socket.io's "wetty" name from both path and app code (//).
It is seems completely Ok now.
However I am not sure why I need to remove socket.io name and any side-effects of it or even don't know is it a kind of bug :/
Note: I have also another service that is running at root path. (managed by nginx https proxy)
index.html:
<script src="wetty/hterm_all.js"></script>
<script src="socket.io/socket.io.js"></script>
<script src="wetty/wetty.js"></script>
app.js:
_ var io = server(httpserv,{path: '//socket.io'});_
I use latest LTS version(4x) of nodejs and LTS(14.04) ubuntu server.
thanks :)
Hi
I can't seem to find any information on what browsers Wetty support. Is this Chrome only? Is it possible to add this information in the readme?
Kind regards
Merlijn
@krishnasrinivas , I am trying to use wetty to work from an electron shell. hterm
is dependent on chrome. are there any alternatives that I could use to make it browser independent?
Hi,
I got this working for my personal server. It is pretty darn useful. Kudos for putting this project together and making it open source.
The only minor hiccup was that I use a non-standard SSH port and I want to let the user choose the username (the script as-is forces the user to be the same user that started the node server).
So, I put together a simple perl script (sshuser.pl) that is called by app.js that looks like this:
#!/usr/bin/perl
my $addr = $ARGV[0];
print "Enter your username: ";
my $username = <STDIN>;
chomp ( $username );
exec ("/usr/bin/ssh -p <non standard ssh port here> $username\@$addr");
Maybe you or other user may find it useful.
Terry
If I try the dockerhub available version, it runs fine, but it seems something is broken with the npm install. I have the same issue if I try to do install it out of docker, first I thought it was my environment, so it's why I decided to test it with the existing Dockerfile.
root@obelix:~/ludo-tests/wetty# git branch
* master
root@obelix:~/ludo-tests/wetty# git rev-parse HEAD
6663504f0df27322940f56fc3f8590990bc3d409
root@obelix:~/ludo-tests/wetty# docker run -p 3000:3000 7c4cfb5d4171
module.js:340
throw err;
^
Error: Cannot find module '../build/Release/pty.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/app/node_modules/pty.js/lib/pty.js:9:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
root@obelix:~/ludo-tests/wetty#
I am running wetty in a vagrant box (debian-7.8.xxx) from puppetlab and I can't login using root. Entering the root username triggers the `Login incorrect' message.
Is `root' hardcoded to be refused ? I can login fine using ssh.
Qs: Once we have term via wetty, where do the commands that get typed in the wetty term get logged ?
This is useful for auditing.
Regards
Which version of socket.io does wetty support?
When I use Atmosphere extensions for socket.io to Integrate with wetty, everything else seems good ,except a black screen on my browser.
In my case , I used socket.io 0.98 in wetty ,so I wanna know is it about socke.io version?
thx
Hi there. Great work!
Is there a way to paste from a clipboard, directly to the terminal?
Copy seems to work with ctrl-C, but ctrl-V?
Thank you, ..
I tried on debian 8, the script was as following:
# Upstart script
# /etc/init/wetty.conf
description "Web TTY"
author "Wetty"
start on started mountall
stop on shutdown
respawn
respawn limit 20 5
exec sudo -u thee wetty -p 5555
By default Wetty listens globally on 0.0.0.0. It would be nice for those of us using Wetty behind Nginx or Apache to have it only bind to localhost.
Hi,
I saw this conversation (http://bit.ly/1r1qeg5) in chromium-hterm and I am curious did you ever manage to get it working for Firefox reliably?
Thanks
Terry
The current container eats up 789MB because the node:0.10.38 base image seems to be huge. Using e.g. https://hub.docker.com/r/risingstack/alpine/ or even node:0.10.38-slim you should be able to create a container way smaller.
I am unable to copy text from wetty under OS X. I can paste just fine and I see the scissors pop up when I hit COMMAND-C
Got an error while trying to get a shell after the login/pwd: "Cannot make/remove an entry for the specified session".
See this screenshot:
http://www.zoobab.com/wetty-bug
Any idea why?
I'm a new fan of wetty. The only problem is that I work behind a firewall that (evidently) blocks web sockets. Bummer. This was a confusing discovery for me at first because I have been using tty.js (another node.js web terminal that uses web sockets). After looking at the code and a quick Google search I discovered that wetty uses the standard WebSocket API while tty.js uses a 3rd party called socket.io.js which, if web sockets aren't available, falls back to the following technologies:
I guess my question is, have you considered using socket.io.js to make wetty available behind firewalls that block web sockets?
Thanks for your time.
Hey!
I was just curious if you have ever used tmux with this setup? Scrolling past content does not seem to work.
This is also true for Google's own implementation of hterm that they use in their new development console. I came across this... https://code.google.com/p/chromium/issues/detail?id=331616
Hi, I can't get the terminal to work properly. I keep getting this error: Error: Error: ioctl(2) failed.
Any ideas? Thanks!
Title says it all. I suspect this is due to the SSH connection being severed. I can provide additional info is required.
Probably this is not a priority, anyway on mobile devices (at least Firefox OS and iOS) the keyboard isn't shown when focusing the app, which makes it unusable. Is there anything that can be done?
found this in app.js
if (process.getuid() == 0) {
can't override by cmd options
can't connect to other machines if i under root on wetty machine.
What is purpose of this line?
I know https is a nobrainer when it comes to security.
But how likely is it that somewhere somebody is sniffing http websocketpackets for passwords, of a http wetty session running in a docker on some server.
Hello!
I don't know, whether it is a feature request or not, but combination of ALTGR + key doesn't work in wetty. Could you develop this feature please?
Thank you!
Hey,
I'm not sure if I have something wrong going on but I can't seem to get this installed. I was hoping that you could have a look and see if anything jumps out at you. Node is v0.12.4
and NPM is 2.10.1
.
Thanks and great work!
vagrant@vagrant-ubuntu-trusty-64 ~/vendor/wetty — u:1 j:0vboxguest 248441 2 vboxsf
git:master (14:49:37 06.14)
#5 ❯❯❯ npm install
> [email protected] install /home/vagrant/vendor/wetty/node_modules/waitpid
> node-gyp rebuild
make: Entering directory `/home/vagrant/vendor/wetty/node_modules/waitpid/build'
CXX(target) Release/obj.target/waitpid/src/waitpid.o
../src/waitpid.cc:11:36: error: ‘Arguments’ does not name a type
static Handle<Value> Waitpid(const Arguments& args) {
^
../src/waitpid.cc:11:47: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
static Handle<Value> Waitpid(const Arguments& args) {
^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> Waitpid(const int&)’:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/waitpid.cc:12:15: error: within this context
HandleScope scope;
^
../src/waitpid.cc:15:13: error: invalid types ‘const int[int]’ for array subscript
if (args[0]->IsInt32()) {
^
../src/waitpid.cc:16:19: error: invalid types ‘const int[int]’ for array subscript
child = args[0]->Int32Value();
^
../src/waitpid.cc:22:40: error: no matching function for call to ‘v8::Object::New()’
Local<Object> result = Object::New();
^
../src/waitpid.cc:22:40: note: candidate is:
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2388:24: note: static v8::Local<v8::Object> v8::Object::New(v8::Isolate*)
static Local<Object> New(Isolate* isolate);
^
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2388:24: note: candidate expects 1 argument, 0 provided
../src/waitpid.cc:25:19: error: ‘New’ is not a member of ‘v8::String’
result->Set(String::New("exitCode"), Integer::New(WEXITSTATUS(status)));
^
../src/waitpid.cc:25:76: error: no matching function for call to ‘v8::Integer::New(int)’
result->Set(String::New("exitCode"), Integer::New(WEXITSTATUS(status)));
^
../src/waitpid.cc:25:76: note: candidate is:
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2012:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
static Local<Integer> New(Isolate* isolate, int32_t value);
^
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2012:25: note: candidate expects 2 arguments, 1 provided
../src/waitpid.cc:26:19: error: ‘New’ is not a member of ‘v8::String’
result->Set(String::New("signalCode"), Null());
^
../src/waitpid.cc:26:51: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Null(v8::Isolate*)’
result->Set(String::New("signalCode"), Null());
^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:306:28: note: declared here
friend Handle<Primitive> Null(Isolate* isolate);
^
../src/waitpid.cc:27:20: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(result);
^
../src/waitpid.cc:30:19: error: ‘New’ is not a member of ‘v8::String’
result->Set(String::New("exitCode"), Null());
^
../src/waitpid.cc:30:49: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Null(v8::Isolate*)’
result->Set(String::New("exitCode"), Null());
^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:306:28: note: declared here
friend Handle<Primitive> Null(Isolate* isolate);
^
../src/waitpid.cc:31:19: error: ‘New’ is not a member of ‘v8::String’
result->Set(String::New("signalCode"), Integer::New(WTERMSIG(status)));
^
../src/waitpid.cc:31:75: error: no matching function for call to ‘v8::Integer::New(int)’
result->Set(String::New("signalCode"), Integer::New(WTERMSIG(status)));
^
../src/waitpid.cc:31:75: note: candidate is:
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2012:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
static Local<Integer> New(Isolate* isolate, int32_t value);
^
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:2012:25: note: candidate expects 2 arguments, 1 provided
../src/waitpid.cc:32:20: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(result);
^
../src/waitpid.cc:34:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(Undefined());
^
../src/waitpid.cc:34:34: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Undefined(v8::Isolate*)’
return scope.Close(Undefined());
^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:305:28: note: declared here
friend Handle<Primitive> Undefined(Isolate* isolate);
^
../src/waitpid.cc:37:44: error: ‘New’ is not a member of ‘v8::String’
return ThrowException(Exception::Error(String::New("Not an integer.")));
^
../src/waitpid.cc:37:75: error: ‘ThrowException’ was not declared in this scope
return ThrowException(Exception::Error(String::New("Not an integer.")));
^
In file included from ../src/waitpid.cc:1:0:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h: In function ‘void init(v8::Handle<v8::Object>)’:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/waitpid.cc:43:15: error: within this context
HandleScope scope;
^
../src/waitpid.cc:44:45: error: no matching function for call to ‘NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [8], v8::Handle<v8::Value> (&)(const int&))’
NODE_SET_METHOD(target, "waitpid", Waitpid);
^
../src/waitpid.cc:44:45: note: candidate is:
In file included from ../src/waitpid.cc:2:0:
/home/vagrant/.node-gyp/0.12.4/src/node.h:228:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
inline void NODE_SET_METHOD(const TypeName& recv,
^
/home/vagrant/.node-gyp/0.12.4/src/node.h:228:13: note: template argument deduction/substitution failed:
../src/waitpid.cc:44:45: note: cannot convert ‘Waitpid’ (type ‘v8::Handle<v8::Value>(const int&)’) to type ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’
NODE_SET_METHOD(target, "waitpid", Waitpid);
^
make: *** [Release/obj.target/waitpid/src/waitpid.o] Error 1
make: Leaving directory `/home/vagrant/vendor/wetty/node_modules/waitpid/build'
build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-53-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/vendor/wetty/node_modules/waitpid
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm WARN deprecated [email protected]: use serve-favicon module
> [email protected] install /home/vagrant/vendor/wetty/node_modules/pty.js
> node-gyp rebuild
make: Entering directory `/home/vagrant/vendor/wetty/node_modules/pty.js/build'
CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:82:20: error: ‘Arguments’ does not name a type
PtyGetStatus(const Arguments&);
^
../src/unix/pty.cc:82:29: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
PtyGetStatus(const Arguments&);
^
../src/unix/pty.cc:376:20: error: ‘Arguments’ does not name a type
PtyGetStatus(const Arguments& args) {
^
../src/unix/pty.cc:376:31: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
PtyGetStatus(const Arguments& args) {
^
In file included from /home/vagrant/.node-gyp/0.12.4/src/node.h:61:0,
from ../node_modules/nan/nan.h:157,
from ../src/unix/pty.cc:16:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> PtyGetStatus(const int&)’:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/unix/pty.cc:377:15: error: within this context
HandleScope scope;
^
../src/unix/pty.cc:379:12: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
if (args.Length() != 1
^
../src/unix/pty.cc:380:17: error: invalid types ‘const int[int]’ for array subscript
|| !args[0]->IsNumber()) {
^
../src/unix/pty.cc:382:7: error: ‘New’ is not a member of ‘v8::String’
String::New("Usage: pty.status(pid)")));
^
../src/unix/pty.cc:382:45: error: ‘ThrowException’ was not declared in this scope
String::New("Usage: pty.status(pid)")));
^
../src/unix/pty.cc:385:19: error: invalid types ‘const int[int]’ for array subscript
int pid = args[0]->IntegerValue();
^
../src/unix/pty.cc:387:53: error: no matching function for call to ‘v8::Number::New(std::map<int, int>::mapped_type&)’
Local<Number> statusCode = Number::New(pidMap[pid]);
^
../src/unix/pty.cc:387:53: note: candidate is:
In file included from /home/vagrant/.node-gyp/0.12.4/src/node.h:61:0,
from ../node_modules/nan/nan.h:157,
from ../src/unix/pty.cc:16:
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:1999:24: note: static v8::Local<v8::Number> v8::Number::New(v8::Isolate*, double)
static Local<Number> New(Isolate* isolate, double value);
^
/home/vagrant/.node-gyp/0.12.4/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided
../src/unix/pty.cc:388:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(statusCode);
^
../src/unix/pty.cc: In function ‘void init(v8::Handle<v8::Object>)’:
../src/unix/pty.cc:616:49: error: no matching function for call to ‘NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [7], v8::Handle<v8::Value> (&)(const int&))’
NODE_SET_METHOD(target, "status", PtyGetStatus);
^
../src/unix/pty.cc:616:49: note: candidate is:
In file included from ../node_modules/nan/nan.h:157:0,
from ../src/unix/pty.cc:16:
/home/vagrant/.node-gyp/0.12.4/src/node.h:228:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
inline void NODE_SET_METHOD(const TypeName& recv,
^
/home/vagrant/.node-gyp/0.12.4/src/node.h:228:13: note: template argument deduction/substitution failed:
../src/unix/pty.cc:616:49: note: cannot convert ‘PtyGetStatus’ (type ‘v8::Handle<v8::Value>(const int&)’) to type ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’
NODE_SET_METHOD(target, "status", PtyGetStatus);
^
../src/unix/pty.cc: In function ‘void PtyFork(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/unix/pty.cc:228:34: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
if (strlen(cwd)) chdir(cwd);
^
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
make: Leaving directory `/home/vagrant/vendor/wetty/node_modules/pty.js/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-53-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/vendor/wetty/node_modules/pty.js
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
\
> [email protected] install /home/vagrant/vendor/wetty/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/vagrant/vendor/wetty/node_modules/websocket/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/home/vagrant/vendor/wetty/node_modules/websocket/build'
npm ERR! Linux 3.13.0-53-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the waitpid package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls waitpid
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/vendor/wetty/npm-debug.log
Hi,
Wetty was perfectly working, but I have updated to last node version, and now I can't re-install it.
Is the last version of node supported ? I hope because I really like wetty !
Here is my stack trace.
Thanks !
nodejs@dev:~$ npm install -g wetty
npm WARN deprecated [email protected]: use serve-favicon module
/home/nodejs/.node-v4.2.2-linux-x64/bin/wetty -> /home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/wetty/bin/wetty.js
[email protected] install /home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/wetty/node_modules/pty.js
node-gyp rebuild
make: Entering directory '/home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/wetty/node_modules/pty.js/build'
CXX(target) Release/obj.target/pty/src/unix/pty.o
In file included from ../src/unix/pty.cc:20:0:
../../nan/nan.h:324:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local&)’
NAN_INLINE v8::Local NanEnsureHandleOrPersistent(const v8::Local &val) {
^
../../nan/nan.h:319:17: note: ‘template v8::Handle Nan::imp::NanEnsureHandleOrPersistent(v8::Handle&)’ previously declared here
v8::Handle NanEnsureHandleOrPersistent(const v8::Handle &val) {
^
../../nan/nan.h:344:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureLocal(v8::Handle&)’
NAN_INLINE v8::Local NanEnsureLocal(const v8::Handle &val) {
^
../../nan/nan.h:334:27: note: ‘template v8::Local Nan::imp::NanEnsureLocal(const v8::Local&)’ previously declared here
NAN_INLINE v8::Local NanEnsureLocal(const v8::Local &val) {
^
../../nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../../nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char_, size_t, int)’:
../../nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(const char_, uint32_t)’:
../../nan/nan.h:768:67: error: call of overloaded ‘New(v8::Isolate_, const char_&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../../nan/nan.h:768:67: note: candidates are:
In file included from ../../nan/nan.h:25:0,
from ../src/unix/pty.cc:20:
/home/nodejs/.node-gyp/4.2.2/include/node/node_buffer.h:31:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate_, v8::Localv8::String, node::encoding)
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate_ isolate,
^
/home/nodejs/.node-gyp/4.2.2/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/nodejs/.node-gyp/4.2.2/include/node/node_buffer.h:43:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate_, char_, size_t)
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/home/nodejs/.node-gyp/4.2.2/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char_’ to ‘char_’
In file included from ../src/unix/pty.cc:20:0:
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanBufferUse(char_, uint32_t)’:
../../nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
pty.target.mk:90: recipe for target 'Release/obj.target/pty/src/unix/pty.o' failed
make: *_* [Release/obj.target/pty/src/unix/pty.o] Error 1
make: Leaving directory '/home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/wetty/node_modules/pty.js/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-39-pve
gyp ERR! command "/home/nodejs/.node-v4.2.2-linux-x64/bin/node" "/home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/wetty/node_modules/pty.js
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: node-gyp rebuild
npm WARN install:[email protected] Exit status 1
[email protected] install /home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/wetty/node_modules/websocket
(node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory '/home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/wetty/node_modules/websocket/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory '/home/nodejs/.node-v4.2.2-linux-x64/lib/node_modules/wetty/node_modules/websocket/build'
/home/nodejs/.node-v4.2.2-linux-x64/lib
└── (empty)
npm ERR! code 1
Hi, I've tried Wetty lately and suspected that it may let the hacker to brute-force user's password by repeatedly guessing it. Please implement Fail2ban configs to block repeated login failure users.
I am trying to run wetty on a AWS EC2 instance. If a start the app.js with root I can access (using nginx as reverse proxy) to from public but when I try to do so using http://domainname:3000/wetty/ssh/ it returns Permission denied (publickey). The user is a valid SSH user and it can access the remote server from my local machine though.
Hi, can you make tab key work? ?? currently it will jumps to location bar....
I'm trying to build wetty on AIX machine. I have python 2.7.6 installed on this machine. By following the build steps in README, I got this error:
ImportError: 0509-022 Cannot load module /opt/freeware/lib/python2.7/lib-dynl
oad/binascii.so.
0509-150 Dependent module libz.so could not be loaded.
0509-022 Cannot load module libz.so.
0509-026 System error: A file or directory in the path name does not exi
st.
0509-022 Cannot load module /opt/freeware/lib/python2.7/lib-dynload/bina
scii.so.
0509-150 Dependent module /opt/freeware/lib/python2.7/lib-dynload/bina
scii.so could not be loaded.
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/ibm/node/lib/node_modules/npm/node
_modules/node-gyp/lib/configure.js:422:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System AIX 1
gyp ERR! command "/ibm/node/bin/node" "/ibm/node/lib/node_modules/npm/node_modul
es/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/smui-install/wetty/node_modules/pty.js
gyp ERR! node -v v4.4.1
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
npm ERR! AIX 1
npm ERR! argv "/ibm/node/bin/node" "/ibm/node/bin/npm" "install"
npm ERR! node v4.4.1
npm ERR! npm v2.14.20
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pty.js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/smui-install/wetty/npm-debug.log
Anyone got this error before? Any ideas?
Thanks!
Any idea?
Hey,
is there any chance of windows support, maybe with the pty.js fork or the open pullreq?
https://github.com/JamesMGreene/node-partty
chjj/pty.js#111
i wish it's used in my Education,
and hope to reduce students cheating,
so i want to remove ctrl-V,
i tried modify codes,
but i can't ORZ,
can you give me some proposal?
I'm trying to run wetty on hostA using
node app.js --sshhost hostB --sshport 22 -p 3000
From the Readme and the cmd options I was thinking this would allow me to open http://hostA:3000 and open a ssh settion to hostB. However, this seems not to work. The ssh connection that opens always points to hostA.
Is this a issue or just undocumented?
I want to use terminal by my user when i link Wetty that without password,
what can i do?
or give me some proposal?
Tmux mouse selection and CTRL+[ copy and paste flash the scissor icon but don't copy to the system clip board. Tested in Chrome on Windows and Linux and Firefox on Windows.
Hi
It would be great if Wetty would expose --sshhost
and --sshport
as GET parameters. This would make it very easy to integrate Wetty into web-based server management panels.
Kind regards
Merlijn Sebrechts
Right now, when I share this github link, it's a big picture of your beautiful face! It's a little off putting. I encourage you to make it display something else.
Has anyone noticed the issue described here:
On wide terminals mouse clicks over column 95 are ignored and the row char is printed out.
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-hterm/IZTprebuJ_U/discussion
Hi,
the verion 0.2.7-1 of pty.js doesn't compile with my aktuall Arch Linux Version, gcc Version 5.2.0?
With the version 0.3.0 of pty.js the installation workes and wetty is runnning.
Thanks for the greate work.
mfG Matthias
I've set up wetty to work behind apache with modproxy. It should respond to: https://myserver/shell/
Unfortunately, it looks like urls are absolute, and indeed i get the following errors:
https://myserver/wetty/hterm_all.js Failed to load resource: the server responded with a status of 404 (Not Found)
https://myserver/wetty/socket.io/socket.io.js Failed to load resource: the server responded with a status of 404 (Not Found)
https://myserver/wetty/wetty.js Failed to load resource: the server responded with a status of 404 (Not Found)
With relative urls they should be https://myserver/shell/wetty/wetty.js
the program actually listen to 0.0.0.0. It would be nice (and more secure) to have an option to make it bind to just local network or localhost, like many other programs do.
Hi,
I am running wetty inside of a docker container. When I open multiple browser windows and close one of them, then wetty will hang. The node processs is still running but none of the terminal windows is responding anymore.
Steps to reproduce:
Open wetty on first computer, log in, do a "watch date".
Open wetty with another chrome browser on another computer. Close the tab without loging in. Or log in and then press STRG+D.
The watch date in the first window will stop after a few seconds. No new connections are possible anymore until the docker container is restarted,
Hope you can reproduce and fix this. Because Wetty seems like a really cool solution.
Kind regards,
Thorsten
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.