Skip to content

Add Support for Custom HTTP Headers in agent-python via Argument #55

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

BrunoTeixeira1996
Copy link

Hi guys,

I was using Hashtopolis inside a Docker container inside a VPS, however I wanted to integrated vast.ai to act as my agents and so for that I had to expose the VPS to the internet. That's not good in my opinion as we could get a lot of traffic from people trying to bruteforce the login form.

Knowing this I implemented a Cloud Flare Tunnel exposing port 8080 localy and assigned to a domain of my own - adding to this I also created an access rule that only people with a certain CF header can access that login form, thus making this login form protected.

Everything worked just fine however the agent-python was not prepared to deal with this kind of authentication since the requests being made dont use any kind of authentication mechanism and there's no argumment available to do this right now.

This pull request adds a new flag called http-headers that is optional but if used these headers will be used on the Session.py and jsonRequest.py thus making it possible to authenticate in the CF Tunnel and make requests to the Hashtopolis Server.

I tested all of this using vast.ai agents and everything worked just fine!

Please tell me if you guys need anything to be changed as I am willing to help

Thanks!

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

Successfully merging this pull request may close these issues.

1 participant