set host, port, path to 8lanes server when connect
This commit is contained in:
parent
4885574357
commit
a3ab9c3a4a
|
|
@ -0,0 +1 @@
|
||||||
|
export const TUNNEL_SERVER = 'hope-tunnel.8lanes.co';
|
||||||
18
app/ui.js
18
app/ui.js
|
|
@ -24,6 +24,7 @@ import keysyms from '../core/input/keysymdef.js';
|
||||||
import Keyboard from '../core/input/keyboard.js';
|
import Keyboard from '../core/input/keyboard.js';
|
||||||
import RFB from '../core/rfb.js';
|
import RFB from '../core/rfb.js';
|
||||||
import * as WebUtil from './webutil.js';
|
import * as WebUtil from './webutil.js';
|
||||||
|
import { TUNNEL_SERVER } from './constant.js';
|
||||||
|
|
||||||
const PAGE_TITLE = 'noVNC';
|
const PAGE_TITLE = 'noVNC';
|
||||||
|
|
||||||
|
|
@ -900,6 +901,17 @@ const UI = {
|
||||||
/* ------^-------
|
/* ------^-------
|
||||||
* /CLIPBOARD
|
* /CLIPBOARD
|
||||||
* ==============
|
* ==============
|
||||||
|
* SEARCH_PARAMS
|
||||||
|
* ------v------*/
|
||||||
|
|
||||||
|
readParams(key) {
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
return urlParams.get(key);
|
||||||
|
},
|
||||||
|
|
||||||
|
/* ------^-------
|
||||||
|
* /SEARCH_PARAMS
|
||||||
|
* ==============
|
||||||
* CONNECTION
|
* CONNECTION
|
||||||
* ------v------*/
|
* ------v------*/
|
||||||
|
|
||||||
|
|
@ -917,9 +929,9 @@ const UI = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const host = UI.getSetting('host');
|
const host = TUNNEL_SERVER;
|
||||||
const port = UI.getSetting('port');
|
const port = UI.readParams('port');
|
||||||
const path = UI.getSetting('path');
|
const path = 'websockify';
|
||||||
|
|
||||||
if (typeof password === 'undefined') {
|
if (typeof password === 'undefined') {
|
||||||
password = WebUtil.getConfigVar('password');
|
password = WebUtil.getConfigVar('password');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue