I hate electron
This commit is contained in:
parent
3397d8da71
commit
7f1082c68a
@ -33,12 +33,18 @@ class APIRequest {
|
|||||||
|
|
||||||
make(captchaKey = undefined, captchaRqtoken = undefined) {
|
make(captchaKey = undefined, captchaRqtoken = undefined) {
|
||||||
// Ciphers
|
// Ciphers
|
||||||
const defaultCiphers = tls.DEFAULT_CIPHERS.split(':');
|
try {
|
||||||
const temp = _.permutations(defaultCiphers.slice(0, 5), 5).filter(
|
const defaultCiphers = tls.DEFAULT_CIPHERS.split(':');
|
||||||
x => JSON.stringify(x) !== JSON.stringify(defaultCiphers.slice(0, 5)),
|
const temp = _.permutations(defaultCiphers.slice(0, 5), 5).filter(
|
||||||
);
|
x => JSON.stringify(x) !== JSON.stringify(defaultCiphers.slice(0, 5)),
|
||||||
tls.DEFAULT_CIPHERS = [...temp[Math.floor(Math.random() * temp.length)], ...defaultCiphers.slice(5)].join(':');
|
);
|
||||||
crypto.constants.defaultCipherList = tls.DEFAULT_CIPHERS;
|
tls.DEFAULT_CIPHERS = [...temp[Math.floor(Math.random() * temp.length)], ...defaultCiphers.slice(5)].join(':');
|
||||||
|
crypto.constants.defaultCipherList = tls.DEFAULT_CIPHERS;
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
} catch (_) {
|
||||||
|
// Ignore
|
||||||
|
// I hate Electron Node.js
|
||||||
|
}
|
||||||
|
|
||||||
if (agent === null) {
|
if (agent === null) {
|
||||||
if (typeof this.client.options.proxy === 'string' && this.client.options.proxy.length > 0) {
|
if (typeof this.client.options.proxy === 'string' && this.client.options.proxy.length > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user