Skip to content

Commit

Permalink
Disable workaround for old version of udx
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl authored Apr 13, 2023
1 parent 054d86f commit 23426c4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hypergate-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Gateway from "./Gateway.js";
import Utils from "./Utils.js";
import Minimist from 'minimist';
import Fs from 'fs';
import UDXBinding from "udx-native/lib/binding.js";
// import UDXBinding from "udx-native/lib/binding.js";

function prepareLogger(tag, debug) {
const _console_log = console.log;
Expand All @@ -28,11 +28,11 @@ function prepareLogger(tag, debug) {
}

function disableIPv6(argv) {
const _udx_napi_socket_bind = UDXBinding.udx_napi_socket_bind;
UDXBinding.udx_napi_socket_bind = function (...args) {
if (args[3] == 6) throw "IPv6 is disabled"
return _udx_napi_socket_bind(...args);
}
// const _udx_napi_socket_bind = UDXBinding.udx_napi_socket_bind;
// UDXBinding.udx_napi_socket_bind = function (...args) {
// if (args[3] == 6) throw "IPv6 is disabled"
// return _udx_napi_socket_bind(...args);
// }
}


Expand Down Expand Up @@ -159,4 +159,4 @@ if (argv.help) {
} else {
help();
}
}
}

0 comments on commit 23426c4

Please sign in to comment.