File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ import http from "http";
77import net from "net" ;
88import nodeStatic from "node-static" ;
99import WebSocket from "ws" ;
10- import { Proxy } from "../lib/proxy" ;
10+ import { Proxy } from "../" ;
11+ import dns from "dns" ;
1112
1213const fileStaticA = new nodeStatic . Server ( `${ __dirname } /wwwA` ) ;
1314const fileStaticB = new nodeStatic . Server ( `${ __dirname } /wwwB` ) ;
@@ -19,6 +20,10 @@ const testWSPort = 40007;
1920const testUrlA = `http://${ testHost } :${ testPortA } ` ;
2021const testUrlB = `http://${ testHost } :${ testPortB } ` ;
2122
23+ if ( typeof dns . setDefaultResultOrder === "function" ) {
24+ dns . setDefaultResultOrder ( "ipv4first" ) ;
25+ }
26+
2227const getHttp = ( url , cb ) => {
2328 request ( { url } , ( err , resp , body ) => {
2429 cb ( err , resp , body ) ;
You can’t perform that action at this time.
0 commit comments