fix: proxy error
This commit is contained in:
@@ -3,7 +3,11 @@
|
|||||||
const Discord = require('../src/index');
|
const Discord = require('../src/index');
|
||||||
const { ProxyAgent } = require('proxy-agent');
|
const { ProxyAgent } = require('proxy-agent');
|
||||||
|
|
||||||
const proxy = new ProxyAgent('<proxy>');
|
const proxy = new ProxyAgent({
|
||||||
|
getProxyForUrl: function () {
|
||||||
|
return '<any proxy>';
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const client = new Discord.Client({
|
const client = new Discord.Client({
|
||||||
ws: {
|
ws: {
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ class APIRequest {
|
|||||||
secureProtocol: 'TLSv1_2_method',
|
secureProtocol: 'TLSv1_2_method',
|
||||||
ciphers: ciphers.join(':'),
|
ciphers: ciphers.join(':'),
|
||||||
})) {
|
})) {
|
||||||
this.client.options.http.agent.options[k] = v;
|
this.client.options.http.agent.httpsAgent[k] = v;
|
||||||
this.client.options.http.agent.httpsAgent.options.options[k] = v;
|
|
||||||
}
|
}
|
||||||
agent = this.client.options.http.agent;
|
agent = this.client.options.http.agent;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user