Pass the network to cheerpx via an object
This commit is contained in:
parent
cc6e3ad5e1
commit
2ede0b1214
11
index.html
11
index.html
@ -36,6 +36,9 @@
|
|||||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||||
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap" rel="stylesheet">
|
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="./xterm/xterm.css" />
|
<link rel="stylesheet" href="./xterm/xterm.css" />
|
||||||
|
<script>
|
||||||
|
window.networkInterface = {};
|
||||||
|
</script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { init } from "/tun/tailscale_tun.js";
|
import { init } from "/tun/tailscale_tun.js";
|
||||||
import {createUi} from "/tun/tailscale_tun_ui.js";
|
import {createUi} from "/tun/tailscale_tun_ui.js";
|
||||||
@ -60,9 +63,9 @@
|
|||||||
stateUpdateCb: updateState,
|
stateUpdateCb: updateState,
|
||||||
loginUrlCb: setLoginUrl,
|
loginUrlCb: setLoginUrl,
|
||||||
}));
|
}));
|
||||||
window.listen = listen;
|
window.networkInterface.bind = bind;
|
||||||
window.connect = connect;
|
window.networkInterface.connect = connect;
|
||||||
window.bind = bind;
|
window.networkInterface.listen = listen;
|
||||||
window.parseIP = parseIP;
|
window.parseIP = parseIP;
|
||||||
window.showModal = showModal;
|
window.showModal = showModal;
|
||||||
</script>
|
</script>
|
||||||
@ -309,7 +312,7 @@
|
|||||||
{
|
{
|
||||||
printOnTerm.printError(printOnTerm.getErrorMessage(err));
|
printOnTerm.printError(printOnTerm.getErrorMessage(err));
|
||||||
}
|
}
|
||||||
CheerpXApp.create({devices:[{type:"block",url:"https://127.0.0.1:8080/images/webvm_20220131.ext2",name:"block1"}],mounts:[{type:"ext2",dev:"block1",path:"/"},{type:"cheerpOS",dev:"/app",path:"/app"},{type:"cheerpOS",dev:"/str",path:"/data"},{type:"devs",dev:"",path:"/dev"}]}).then(runTest, failCallback);
|
CheerpXApp.create({devices:[{type:"block",url:"https://127.0.0.1:8080/images/webvm_20220131.ext2",name:"block1"}],mounts:[{type:"ext2",dev:"block1",path:"/"},{type:"cheerpOS",dev:"/app",path:"/app"},{type:"cheerpOS",dev:"/str",path:"/data"},{type:"devs",dev:"",path:"/dev"}], networkInterface}).then(runTest, failCallback);
|
||||||
}
|
}
|
||||||
function initialMessage()
|
function initialMessage()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user