Skip to content

Commit 0845e30

Browse files
committed
first commit
0 parents  commit 0845e30

File tree

1,079 files changed

+268372
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,079 files changed

+268372
-0
lines changed

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# pm2-webshell
2+
3+
[![GetBadges Game](https://pm2-hive-pm2-webshell.getbadges.io/shield/company/pm2-hive-pm2-webshell)](https://pm2-hive-pm2-webshell.getbadges.io/?ref=shield-game)
4+
5+
Fully capable Webshell
6+
7+
![PM2 SSH](https://github.com/pm2-hive/pm2-webshell/raw/master/preview.png)
8+
9+
## Install
10+
11+
```bash
12+
$ pm2 install pm2-webshell
13+
$ google-chrome http://localhost:8080
14+
```
15+
16+
Default Username: foo
17+
18+
Default Password: bar
19+
20+
## Configure
21+
22+
```
23+
# Changer user
24+
$ pm2 set pm2-webshell:username foo
25+
26+
# Change password
27+
$ pm2 set pm2-webshell:password bar
28+
29+
# Change port
30+
$ pm2 set pm2-webshell:port 7890
31+
32+
# HTTPS
33+
$ pm2 set pm2-webshell:https true
34+
35+
# SSL Certificate file
36+
$ pm2 set pm2-webshell: ssl_cert ~/path/to/ssl.cert
37+
38+
# SSL Key file
39+
$ pm2 set pm2-webshell: ssl_key ~/path/to/ssl.key
40+
````
41+
42+
## Uninstall
43+
44+
```bash
45+
$ pm2 uninstall pm2-webshell
46+
```
47+
48+
# License
49+
50+
MIT

app.js

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
2+
var tty = require('tty.js');
3+
4+
var pmx = require('pmx');
5+
var probe = pmx.probe();
6+
7+
var conf = pmx.initModule({
8+
widget : {
9+
type : 'generic',
10+
logo : 'http://www.creativetechs.com/iq/tip_images/TerminalApp-Icon.png',
11+
12+
// 0 = main element
13+
// 1 = secondary
14+
// 2 = main border
15+
// 3 = secondary border
16+
theme : ['#111111', '#1B2228', '#807C7C', '#807C7C'],
17+
18+
el : {
19+
probes : false,
20+
actions : false
21+
},
22+
23+
block : {
24+
actions : false,
25+
issues : false,
26+
meta : false,
27+
cpu: false,
28+
mem: false,
29+
main_probes : ['Username', 'Port', 'Bind', 'HTTPS']
30+
}
31+
32+
// Status
33+
// Green / Yellow / Red
34+
}
35+
});
36+
37+
38+
probe.metric({
39+
name: 'Port',
40+
value: function() {
41+
return conf.port;
42+
}
43+
});
44+
45+
probe.metric({
46+
name: 'Username',
47+
value: function() {
48+
return conf.username;
49+
}
50+
});
51+
52+
probe.metric({
53+
name: 'Bind',
54+
value: function() {
55+
return conf.bind;
56+
}
57+
});
58+
59+
probe.metric({
60+
name: 'HTTPS',
61+
value: function() {
62+
return conf.https;
63+
}
64+
});
65+
66+
var ssh_conf = {
67+
shell : 'bash',
68+
users : {},
69+
port : parseInt(conf.port),
70+
"hostname": conf.bind,
71+
"limitGlobal": 10000,
72+
"limitPerUser": 1000,
73+
"term": {
74+
"termName": "xterm",
75+
"geometry": [80, 24],
76+
"scrollback": 1000,
77+
"visualBell": false,
78+
"popOnBell": false,
79+
"cursorBlink": false,
80+
"screenKeys": false,
81+
"colors": [
82+
"#2e3436",
83+
"#cc0000",
84+
"#4e9a06",
85+
"#c4a000",
86+
"#3465a4",
87+
"#75507b",
88+
"#06989a",
89+
"#d3d7cf",
90+
"#555753",
91+
"#ef2929",
92+
"#8ae234",
93+
"#fce94f",
94+
"#729fcf",
95+
"#ad7fa8",
96+
"#34e2e2",
97+
"#eeeeec"
98+
]
99+
}
100+
};
101+
102+
//ssh_conf.users[conf.username] = conf.password;
103+
104+
if (JSON.parse(conf.https) === true) {
105+
ssh_conf['https'] = {
106+
"key": conf.ssl_key || "./term-default.key",
107+
"cert": conf.ssl_cert || "./term-default.crt"
108+
};
109+
}
110+
111+
var app = tty.createServer(ssh_conf);
112+
113+
app.listen();

node_modules/.bin/tty.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/pmx/.npmignore

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/pmx/.travis.yml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/pmx/CHANGELOG.md

+85
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/pmx/HISTOGRAM.md

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)