v0.20.6: bugfix: falsey ssh value means 'off', not 'default'
This commit is contained in:
parent
0a8fabef7a
commit
41d8674519
|
@ -289,12 +289,16 @@ controllers.ssh = function (req, res, opts) {
|
||||||
function sshSuccess() {
|
function sshSuccess() {
|
||||||
//state.config.sshAuto = state.sshAuto;
|
//state.config.sshAuto = state.sshAuto;
|
||||||
saveConfig(function (err) {
|
saveConfig(function (err) {
|
||||||
|
var local = state.config.sshAuto;
|
||||||
|
if (false !== local && !local) {
|
||||||
|
local = 22;
|
||||||
|
}
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
res.end(JSON.stringify({
|
res.end(JSON.stringify({
|
||||||
success: true
|
success: true
|
||||||
, active: true
|
, active: true
|
||||||
, remote: Object.keys(state.config.ports)[0]
|
, remote: Object.keys(state.config.ports)[0]
|
||||||
, local: state.config.sshAuto || 22
|
, local: local
|
||||||
, saved: !err
|
, saved: !err
|
||||||
, module: 'ssh'
|
, module: 'ssh'
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "telebit",
|
"name": "telebit",
|
||||||
"version": "0.20.5",
|
"version": "0.20.6",
|
||||||
"description": "Break out of localhost. Connect to any device from anywhere over any tcp port or securely in a browser. A secure tunnel. A poor man's reverse VPN.",
|
"description": "Break out of localhost. Connect to any device from anywhere over any tcp port or securely in a browser. A secure tunnel. A poor man's reverse VPN.",
|
||||||
"main": "lib/remote.js",
|
"main": "lib/remote.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
Loading…
Reference in New Issue