mirror of
https://github.com/linuxserver/gclient.git
synced 2026-02-20 02:54:19 +08:00
logic updates for downstream and style tweaks for black backgrounds
This commit is contained in:
parent
7a0c91b332
commit
e29de0d001
@ -14,7 +14,7 @@ All application settings are passed via environment variables:
|
||||
| PASSWORD | Desktop session password for the RDP connection, default abc. |
|
||||
| RDP_HOST | IP address of RDP endpoint, default "127.0.0.1". |
|
||||
| RDP_PORT | RDP port to connect to, default "3389".(quotes important not an integer) |
|
||||
| AUTO_LOGIN | Set to false to disable auto login, default true. |
|
||||
| AUTO_LOGIN | Set to false to disable auto login or true to force it, default unset. |
|
||||
| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` |
|
||||
| TITLE | The page title displayed on the web browser, default "Guacamole Client". |
|
||||
| CYPHER | The cipher key to user for encoding the connection string token for guacamole, default "LSIOGCKYLSIOGCKYLSIOGCKYLSIOGCKY" |
|
||||
|
||||
9
app.js
9
app.js
@ -6,11 +6,11 @@ var CUSTOM_USER = process.env.CUSTOM_USER || 'abc';
|
||||
var PASSWORD = process.env.PASSWORD || 'abc';
|
||||
var RDP_HOST = process.env.RDP_HOST || '127.0.0.1';
|
||||
var RDP_PORT = process.env.RDP_PORT || '3389';
|
||||
var AUTO_LOGIN = process.env.AUTO_LOGIN || true;
|
||||
var AUTO_LOGIN = process.env.AUTO_LOGIN || null;
|
||||
var SUBFOLDER = process.env.SUBFOLDER || '/';
|
||||
var TITLE = process.env.TITLE || 'Guacamole Client';
|
||||
var CYPHER =process.env.CYPHER || 'LSIOGCKYLSIOGCKYLSIOGCKYLSIOGCKY';
|
||||
var FM_NO_AUTH = process.env.FM_NO_AUTH || false;
|
||||
var FM_NO_AUTH = process.env.FM_NO_AUTH || 'false';
|
||||
var FM_HOME = process.env.FM_HOME || '/config';
|
||||
|
||||
//// Application Variables ////
|
||||
@ -70,7 +70,8 @@ baseRouter.get('/', function (req, res) {
|
||||
}
|
||||
}
|
||||
};
|
||||
if ((! req.query.login) || (AUTO_LOGIN == true) || (PASSWORD == 'abc')) {
|
||||
console.log(AUTO_LOGIN);
|
||||
if (((! req.query.login) && (AUTO_LOGIN == 'true')) || ((! req.query.login) && (PASSWORD == 'abc') && (AUTO_LOGIN !== 'false'))) {
|
||||
Object.assign(connectString.connection.settings, {'username':CUSTOM_USER,'password':PASSWORD});
|
||||
}
|
||||
res.render(__dirname + '/rdp.ejs', {token : encrypt(connectString), title: TITLE});
|
||||
@ -95,7 +96,7 @@ io.on('connection', async function (socket) {
|
||||
username: CUSTOM_USER,
|
||||
password: password,
|
||||
};
|
||||
if (FM_NO_AUTH) {
|
||||
if (FM_NO_AUTH == 'true') {
|
||||
authData = {id: true};
|
||||
getFiles(FM_HOME);
|
||||
return;
|
||||
|
||||
@ -45,6 +45,7 @@ button {
|
||||
text-decoration: none;
|
||||
font-size: 1.2em;
|
||||
border-radius: 5px;
|
||||
border:1px solid white;
|
||||
}
|
||||
|
||||
.sidenav {
|
||||
@ -57,7 +58,7 @@ button {
|
||||
}
|
||||
|
||||
.sidenav:hover {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
#sideopen {
|
||||
@ -81,6 +82,7 @@ button {
|
||||
border-radius:50%;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border:1px solid white;
|
||||
}
|
||||
|
||||
#clipboard {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user