Skip to content

Commit 4bf61d6

Browse files
committed
Fixes
1 parent 0b0fd5a commit 4bf61d6

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ expect-tests: build/v86-debug.wasm build/libwabt.cjs
341341
make -C tests/expect/tests
342342
./tests/expect/run.js
343343

344-
devices-test: build/v86-debug.wasm
344+
devices-test: build/v86-debug.wasm build/mitm.mjs
345345
./tests/devices/virtio_9p.js
346346
./tests/devices/virtio_console.js
347347
./tests/devices/fetch_network.js

src/browser/fake_network.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,12 @@ function handle_fake_tcp(packet, adapter)
262262
conn.dport = packet.tcp.sport;
263263
conn.pdest = packet.ipv4.src;
264264

265-
adapter.bus.pair.send('tcp-connection', conn);
265+
adapter.bus.pair.send("tcp-connection", conn);
266266

267267
if(adapter.on_tcp_connection) {
268268
adapter.on_tcp_connection(conn, packet);
269269
}
270-
if (adapter.tcp_conn[tuple]) return;
270+
if(adapter.tcp_conn[tuple]) return;
271271
}
272272

273273
if(!adapter.tcp_conn[tuple]) {

src/browser/fetch_network.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ export function FetchNetworkAdapter(bus, config)
3535
this.eth_encoder_buf = create_eth_encoder_buf();
3636
this.fetch = (...args) => fetch(...args);
3737

38-
import("../../build/mitm.mjs").then(factory => factory.default()).then(obj => {
38+
eval(`import("../../build/mitm.mjs")`).then(factory => factory.default()).then(obj => {
3939
this.tls = new obj["MITM"]();
4040
this.tls["generateECCPrivateKey"]();
41-
console.log("TLS online");
4241
}).catch(e => {
4342
console.log(e);
4443
dbg_log("No TLS library detected.");

0 commit comments

Comments
 (0)