wojons / cloudflare-lb Goto Github PK
View Code? Open in Web Editor NEWUse cloudflare as a load balancer
License: MIT License
Use cloudflare as a load balancer
License: MIT License
Greetings from 2020.
I dug the whole internet and found this, but after days of research, I still couldn't get it running.
First of all the API seems to be outdated as the Cloudflare API is now v4, I fixed the URL and got these error messages.
Getting data from CloudFlare Traceback (most recent call last): File "cloudflare-lb.py", line 83, in <module> healthcheck(host) File "cloudflare-lb.py", line 59, in healthcheck if get_rec_id(RECORD, host[0]) == False: #needs to be added File "cloudflare-lb.py", line 72, in get_rec_id for y in RECS: TypeError: 'bool' object is not iterable
I am a newbie but I really need this, could you update it by any chance?
Thank you
Best regards
Takeshi.M
There is a bug that probably somehow related to CloudFlare API changes.
cloudflare-lb.py can't delete dead hosts from the list. If host dies, script just prints "Still Dead".
As far as I understand, get_rec_id function doesn't return an id because condition "if y['display_name'] == name" always false.
"display_name" variable returns a subdomain, and "name" variable returns full url.
example:
"name": "direct.example.com",
"display_name": "direct",
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.