-2

Proxies Requests is using my own ip and when I'm using https I'm getting error:

TimeoutError: [WinError 10060] 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

I'm really trying to solve it and didn't found a working solution.

halfer
  • 19,824
  • 17
  • 99
  • 186
Zeyrox
  • 1

1 Answers1

0

This is a code snippet that should work in your case.

import requests

proxies = {
  'http': 'http://190.8.46.90:6969',
  'https': 'http://190.8.46.90:6969',
}
s = requests.Session()
s.proxies.update(proxies)

s.get('https://api.myip.com')

You should also check for a firewall issue, the main cause of a connection timeout.

Davide Madrisan
  • 1,969
  • 2
  • 14
  • 22
  • hmmm not working, its still using my own ip – Zeyrox Oct 03 '21 at 13:36
  • If your mean your proxy does not act as a proxy and just routes the packages without changing the source IP? So I think the problem is a proxy misconfiguration not your code. It seems another issue unrelated to the timeout while setting a proxy. – Davide Madrisan Oct 03 '21 at 15:46