-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Proxy improvements #374
Proxy improvements #374
Conversation
In some tests made on the testProxy function, the `new ProxyAgent()` was not working, even adding it the IP result was the same. I've change it to the `new HttpsProxyAgent()` and it worked. Refactored the proxy agent to center the same function/creation the same where it is used
Que tipo de proxy devo usar? Onde comprar? |
Fiz os testes usando o do proxy scrape eles tem um plano de $1 para 1Gb para testar o proxy |
Toda hora da esse erro:{"status":400,"error":"Bad Request","response":{"message":["Invalid proxy"]}} no exemplro removi o user e senha |
Quando tem proxyscrape no host a API tenta buscar a partir da lista pública gratuita de proxy, utiliza o IP no lugar o hostname |
entao nao tem como testar? |
Tem sim, no proxyscrape tem a opção de obter o IP no lugar do hostname, ai só trocar lá no painel |
Conseguir configurar. So find ta voltando ok. Tem como saber se ta funcionando com o ip do proxy? |
@lindenbergp depois que configurar você pode acompanhar o uso pelo painel do proxy, se tiver contabilizando o uso quer dizer que ta funcionando |
Hello, I've conducted some tests using the
new ProxyAgent()
on thetestProxy
function when adding a new proxy (the same agent that is sent to Baileys). However, when using it, the IP did not change.I changed it to use the HttpsProxyAgent, and when using it, it worked as expected.
I also changed the website to check the IP address from meuip.com.br to icanhazip.com. When using meuip.com.br, I encountered some errors due to Cloudflare protection. After changing the website, the error was resolved.
I extracted the proxy agent creation into a function that can be used anywhere, ensuring the use of the same agent for all instances.
Additionally, I added a validation to check if the instance exists before attempting to add a proxy to it.
I'm new to the PR process and included the code from this PR: #371 in this one. If you prefer it to be separate, please let me know, and I'll fork again to handle it correctly.