Python crawler, requests agent has no problem on winodws, wrong timeout on mac?

import requests
url = "http://www.httpbin.org/ip"
proxies_me = {
    "http":"http://127.0.0.1:1080",
    "https":"https://127.0.0.1:1080"
}
response = requests.get(url, proxies=proxies_me)
print(response.text)

Why is it possible to successfully get to the page on windows, but time out if you use mac?
how to set mac network settings if you use a proxy?

Oct.23,2021

look, you should be using ss. If you are using ss:

the windows client of ss has a built-in http proxy, so you can use the http proxy directly, while the ss client under macos only has the socks5 proxy, so you can't use the http proxy. Requests supports socks5 proxies, so you can do this:

proxies_me = {
    "http":"socks5://127.0.0.1:1080",
    "https":"socks5://127.0.0.1:1080"
}

make sure you have installed requests: that supports socks5 agents pip install-U requests [socks]

Menu