We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bafad38 commit 6e58756Copy full SHA for 6e58756
1 file changed
test/01_proxy.ts
@@ -7,7 +7,8 @@ import http from "http";
7
import net from "net";
8
import nodeStatic from "node-static";
9
import WebSocket from "ws";
10
-import { Proxy } from "../lib/proxy";
+import { Proxy } from "../";
11
+import dns from "dns";
12
13
const fileStaticA = new nodeStatic.Server(`${__dirname}/wwwA`);
14
const fileStaticB = new nodeStatic.Server(`${__dirname}/wwwB`);
@@ -19,6 +20,10 @@ const testWSPort = 40007;
19
20
const testUrlA = `http://${testHost}:${testPortA}`;
21
const testUrlB = `http://${testHost}:${testPortB}`;
22
23
+if (typeof dns.setDefaultResultOrder === "function") {
24
+ dns.setDefaultResultOrder("ipv4first");
25
+}
26
+
27
const getHttp = (url, cb) => {
28
request({ url }, (err, resp, body) => {
29
cb(err, resp, body);
0 commit comments