Skip to content
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

Error using HTTPS proxy through tor SOCKS5 with requests-go library #24

Open
kyam10 opened this issue Jan 25, 2024 · 0 comments
Open

Error using HTTPS proxy through tor SOCKS5 with requests-go library #24

kyam10 opened this issue Jan 25, 2024 · 0 comments

Comments

@kyam10
Copy link

kyam10 commented Jan 25, 2024

Error using HTTPS proxy through SOCKS5 with requests-go library

Description

An error occurs indicating "Tor is not an HTTP Proxy" when trying to send an HTTPS request through a SOCKS5 proxy.

Versions

  • Python: 3.11
  • requests-go: 0.7.1

Steps to Reproduce

The following code snippet reproduces the error:

import requests_go as requests

session = requests.session()
session.proxies = {'http': 'socks5h://127.0.0.1:9150',
                   'https': 'socks5h://127.0.0.1:9150'}

# This works correctly
res = session.get('http://njallalafimoej5i4eg7vlnqjvmb6zhdh27qxcatdn647jtwwwui3nad.onion/')
print(res.status_code)
print(res.history[0].status_code, res.url)

# This causes an error
res = session.get('https://njallalafimoej5i4eg7vlnqjvmb6zhdh27qxcatdn647jtwwwui3nad.onion/')
print(res.status_code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant