'How can I use pysocks with surfshark credentials?

this is not working I get "Error connecting to HTTP proxy au-bne.prod.surfshark.com:3433: timed out"

try:

    socks.setdefaultproxy(socks.create_connection(("au-bne.prod.surfshark.com", 3433),
                                                  proxy_type=socks.HTTP, proxy_addr="au-bne.prod.surfshark.com",
                                                  proxy_port=3433, timeout=10,
                                                  proxy_username="surfshark_user",
                                                  proxy_password="surfshark_pass"))
    socks.wrapmodule(smtplib)
except Exception as e:
    print(e)

but if I use

import requests

try:
    proxies = {
        'http': 'http://surfshark_user:[email protected]:3433'
    }

    resp = requests.get('https://iplocation.com/', proxies=proxies, )

except Exception as e:
    print(e)

every thing is work fine



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source