Spaces:
Runtime error
Runtime error
Update network_fix.js
Browse files- network_fix.js +3 -1
network_fix.js
CHANGED
|
@@ -3,8 +3,8 @@ const http = require('http');
|
|
| 3 |
const dns = require('dns');
|
| 4 |
|
| 5 |
const DOMAINS = [
|
| 6 |
-
"ptb.discord.com",
|
| 7 |
"canary.discord.com",
|
|
|
|
| 8 |
"discord.com",
|
| 9 |
"dis.gd",
|
| 10 |
"discordapp.com",
|
|
@@ -53,6 +53,8 @@ function applyAdvancedFixes() {
|
|
| 53 |
https.globalAgent = new https.Agent(options);
|
| 54 |
http.globalAgent = new http.Agent(options);
|
| 55 |
|
|
|
|
|
|
|
| 56 |
try {
|
| 57 |
const { setGlobalDispatcher, Agent } = require('undici');
|
| 58 |
const dispatcher = new Agent({
|
|
|
|
| 3 |
const dns = require('dns');
|
| 4 |
|
| 5 |
const DOMAINS = [
|
|
|
|
| 6 |
"canary.discord.com",
|
| 7 |
+
"ptb.discord.com",
|
| 8 |
"discord.com",
|
| 9 |
"dis.gd",
|
| 10 |
"discordapp.com",
|
|
|
|
| 53 |
https.globalAgent = new https.Agent(options);
|
| 54 |
http.globalAgent = new http.Agent(options);
|
| 55 |
|
| 56 |
+
dns.setServers(['8.8.8.8', '1.1.1.1']); // Use reliable DNS
|
| 57 |
+
|
| 58 |
try {
|
| 59 |
const { setGlobalDispatcher, Agent } = require('undici');
|
| 60 |
const dispatcher = new Agent({
|