馃摑 Summary
Version 0.5.4 cannot use proxies with the socks4 or socks5 protocol and throws an error, while version 0.5.3 works normally and responds properly.
馃摉 Description
I used NPM to install the latest version of Impit with the command:
After installing, I started using the package normally. However, after a while, I noticed that I couldn鈥檛 use proxies with the socks4 or socks5 protocol anymore. I double-checked multiple times to make sure the proxy was still alive and not dead.
When I used a proxy with that protocol, I got an error like this:
PS C:\Users\admin\Documents\Coding\impit-test> node .
[Error: impit error: The internal HTTP library has thrown an error:
reqwest::Error {
kind: Request,
url: "https://backend.wplace.live/me",
source: hyper_util::client::legacy::Error(
Connect,
SocksConnect(
Inner(
ConnectError(
"tcp connect error",
113.169.74.21:10012,
Os {
code: 10060,
kind: TimedOut,
message: "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.",
},
),
),
),
),
}] {
code: 'GenericFailure'
}
At that time, my code looked like this:
import { Impit } from "impit";
import { CookieJar } from "tough-cookie";
const COOKIE = "deleted the cookie";
try {
const cookie = new CookieJar();
await cookie.setCookie(`j=${COOKIE}; Path=/`, "https://backend.wplace.live");
const impit = new Impit({
browser: "chrome",
proxyUrl: "socks4://113.169.74.21:10012",
timeout: 30000,
ignoreTlsErrors: true,
cookieJar: cookie
});
const res = await impit.fetch("https://backend.wplace.live/me");
console.log(await res.json());
}
catch(err) {
console.error(err);
}
After repeatedly checking and asking GPT as well as searching on Google, and even looking through StackOverflow, I couldn鈥檛 find any information related to the Impit package 馃槬. Then I remembered there was a repo also using this package that worked fine. I went into their package.json and saw that they were on version 0.5.3. I followed and installed version 0.5.3 like this:
After installing, I tried using the same proxy again and... surprisingly! Impit fetched successfully without throwing any errors.
I鈥檓 not sure if anyone has already opened an issue like this, so please excuse me if this is a duplicate.
i used gpt to translate the issues to english
馃摑 Summary
Version
0.5.4cannot use proxies with thesocks4orsocks5protocol and throws an error, while version0.5.3works normally and responds properly.馃摉 Description
I used NPM to install the latest version of
Impitwith the command:After installing, I started using the package normally. However, after a while, I noticed that I couldn鈥檛 use proxies with the
socks4orsocks5protocol anymore. I double-checked multiple times to make sure the proxy was still alive and not dead.When I used a proxy with that protocol, I got an error like this:
At that time, my code looked like this:
After repeatedly checking and asking GPT as well as searching on Google, and even looking through StackOverflow, I couldn鈥檛 find any information related to the
Impitpackage 馃槬. Then I remembered there was a repo also using this package that worked fine. I went into theirpackage.jsonand saw that they were on version0.5.3. I followed and installed version0.5.3like this:After installing, I tried using the same proxy again and... surprisingly! Impit fetched successfully without throwing any errors.
I鈥檓 not sure if anyone has already opened an issue like this, so please excuse me if this is a duplicate.
i used gpt to translate the issues to english