move server hosting to dns

This commit is contained in:
Face
2025-09-08 18:55:02 +03:00
parent b1ae6fe95f
commit 7bf210357f
4 changed files with 20 additions and 41 deletions

View File

@@ -4,32 +4,6 @@ class_name CertificateManager
static var trusted_ca_certificates: Array[String] = []
static var ca_cache: Dictionary = {}
static func fetch_cert_via_http(url: String) -> String:
var http_request = HTTPRequest.new()
var main_scene = Engine.get_main_loop().current_scene
if not main_scene:
return ""
main_scene.add_child(http_request)
var error = http_request.request(url)
if error != OK:
http_request.queue_free()
return ""
var response = await http_request.request_completed
http_request.queue_free()
var result = response[0]
var response_code = response[1]
var body = response[3]
if result != HTTPRequest.RESULT_SUCCESS or response_code != 200:
return ""
return body.get_string_from_utf8()
static func initialize():
load_builtin_ca()
print("Certificate Manager initialized with ", trusted_ca_certificates.size(), " trusted CAs")