DarkCat09 / python-aternos

[UNMAINTAINED] Unofficial Aternos API written in Python
https://pypi.org/project/python-aternos/
Apache License 2.0
92 stars 13 forks source link

Unable to bypass Cloudflare protection #100

Open GDemay opened 10 months ago

GDemay commented 10 months ago

🔍 Overview: I am currently developing a FastAPI application, integrated with python-aternos, aimed at controlling a Minecraft server. This application is equipped with two primary endpoints enabling the remote start and stop functionality of the server.

🚀 Current Status:

Locally, the application operates without issues. Deployment on AWS Lambda has also been achieved.

🚧 Issue Encountered:

After deploying to AWS Lambda, I'm encountering a significant error: "Unable to bypass Cloudflare protection." This issue suggests a possibility of Cloudflare or Artenos blocking requests that originate from AWS Lambda.

💡 Questions and Assistance Requested:

📌 Additional Context:

[ERROR] CloudflareError: Unable to bypass Cloudflare protection
Traceback (most recent call last):
  File "/var/lang/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/var/task/app.py", line 8, in <module>
    game_server.login()
  File "/var/task/GameServer.py", line 17, in login
    self.atclient.login_hashed(self.username, self.password)
  File "/var/task/python_aternos/atclient.py", line 91, in login_hashed
    self.atconn.parse_token()
  File "/var/task/python_aternos/atconnect.py", line 75, in parse_token
    loginpage = self.request_cloudflare(
  File "/var/task/python_aternos/atconnect.py", line 266, in request_cloudflare
    return self.request_cloudflare(
  File "/var/task/python_aternos/atconnect.py", line 266, in request_cloudflare
    return self.request_cloudflare(
  File "/var/task/python_aternos/atconnect.py", line 266, in request_cloudflare
    return self.request_cloudflare(
  [Previous line repeated 2 more times]
  File "/var/task/python_aternos/atconnect.py", line 193, in request_cloudflare
    raise CloudflareError('Unable to bypass Cloudflare protection')