-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use proxy to send request #13
Comments
@fordca at the moment, the proxy can be used along with the rest of the captcha parameters, as described here. Example: solver.recaptcha({
pageurl: 'https://2captcha.com/demo/recaptcha-v2',
googlekey: '6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u',
proxy: "login:password@1.2.3.4:8888", // The (Username : Password @ Address : Port) of our chosen proxy
proxytype: "http" // The 'Type' of proxy, http, https, socks4, socks5.
})
.then((res) => {
console.log(res)
})
.catch((err) => {
console.error(err.message)
}) |
I think you can setup a |
Hello For example: import { SocksProxyAgent } from 'socks-proxy-agent';
const agent = new SocksProxyAgent('socks5h://127.0.0.1:9050');
await fetch('https://google.com', {
agent,
method: 'POST',
body: {}
headers,
})
} I tested and it works, don't know about DNS leaks tho, but socks5h should have it resolving DNS in socks if the socks-proxy-agent works as supposed. I suggest using wireshark to check it. |
Hi, thanks for this repo to use 2captcha conveniently.
I wonder if there is a way to config a proxy to use
solver
, because my code run behind a work NAT and can't connect to 2captcha.com directlyI have been looked for the code and there is no proxy config for init solver.
Is there a way to solve my problem that I didn't found OR there is no proxy's config for now?
The text was updated successfully, but these errors were encountered: