The connection choice belongs inside the requests.get() call, under proxies. In this example, the https entry points to an HTTP proxy, and httpbin supplies the reply:
import requests check = requests.get( "https://httpbin.org/ip", proxies={"https": "http://HOST:PORT"}, timeout=12, ) print(check.status_code, check.text)Replac...