diff --git a/master/main.py b/master/main.py index 49608e7..ede59ba 100644 --- a/master/main.py +++ b/master/main.py @@ -233,37 +233,6 @@ def site_status(): else: return jsonify({'success': 'false', 'domain': domain, 'ip': publicIP, 'tlsa': 'none','error': 'No TLSA record found'}) - -@app.route('/info') -def site_status_human(): - domain = request.args.get('domain') - domain = domain.lower() - if domain == None: - return "

Invalid domain

" - - # Check if domain exists - if not site_exists(domain): - return "

Domain does not exist

" - - # Get worker - worker = site_worker(domain) - if worker == None: - return "

Domain does not exist

" - - # Get worker ip - ip = workerIP_PRIV(worker) - - # Get TLSA record - resp=requests.get("http://"+ip + ":5000/tlsa?domain=" + domain,timeout=2) - json = resp.json() - publicIP = workerIP(worker) - - if "tlsa" in json: - tlsa = json['tlsa'] - return "

Domain: " + domain + "


IP: " + publicIP + "


TLSA: " + tlsa + "


Make sure to add the TLSA record to `_443._tcp." + domain + "` or `*." + domain + "`

" - else: - return "

Domain: " + domain + "


IP: " + publicIP + "


TLSA: none


No TLSA record found

" - @app.route('/tlsa', methods=['GET']) def tlsa(): domain = request.args.get('domain') @@ -561,7 +530,10 @@ def success(): elif request.args.get('status') == 'creating': return render_template('success.html') - +@app.route('/info') +def info(): + success() + @app.route('/site-count') def site_count_route(): return str(get_sites_count()) @@ -648,7 +620,7 @@ def admin(): if not site.__contains__(':'): continue domain = site.split(':')[0] - html += "

Domain: " + domain + " | Worker: " + site.split(':')[1].strip('\n') + " | Info

" + html += "

Domain: " + domain + " | Worker: " + site.split(':')[1].strip('\n') + " | Info

" html += "

" # Form to add worker