upd
Some checks failed
Build GDExtension / Build GDExtension (libgurt_godot.so, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 6m17s
Build Gurty / Build Gurty (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 58s
Build GurtCA / Build GurtCA (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 29m38s
Build Flumi / Build Flumi (Windows Desktop, 4.4.1, windows-latest, windows) (push) Has been cancelled
Build Flumi / Build Flumi (Linux, 4.4.1, ubuntu-latest, linux) (push) Has been cancelled
Build GDExtension / Build GDExtension (gurt_godot.dll, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build GurtCA / Build GurtCA (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build Gurty / Build Gurty (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled

This commit is contained in:
2025-11-07 20:47:41 +08:00
parent f2f63d32e5
commit b503c0adfb
10 changed files with 1062 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
extends RefCounted
class_name GurtProtocol
static var DNS_SERVER_IP: String = "135.125.163.131"
static var DNS_SERVER_IP: String = "10.0.0.138"
static var DNS_SERVER_PORT: int = 4878
static func set_dns_server(ip_port: String):
@@ -67,11 +67,11 @@ static func resolve_gurt_domain(domain: String) -> String:
static func get_error_type(error_message: String) -> Dictionary:
if "DNS server is not responding" in error_message or "Domain not found" in error_message:
return {"code": "ERR_NAME_NOT_RESOLVED", "title": "无法连接站点", "icon": "? :("}
return {"code": "ERR_NAME_NOT_RESOLVED", "title": "连接站点时失败", "icon": "? :("}
elif "timeout" in error_message.to_lower() or "timed out" in error_message.to_lower():
return {"code": "ERR_CONNECTION_TIMED_OUT", "title": "连接网站中超时", "icon": "...?"}
return {"code": "ERR_CONNECTION_TIMED_OUT", "title": "连接站点时失败", "icon": "...?"}
elif "Failed to fetch" in error_message or "No response" in error_message:
return {"code": "ERR_CONNECTION_REFUSED", "title": "连接出现问题", "icon": ">:("}
return {"code": "ERR_CONNECTION_REFUSED", "title": "连接站点时失败", "icon": ">:("}
elif "Invalid domain format" in error_message:
return {"code": "ERR_INVALID_URL", "title": "页面没有在运作", "icon": ":|"}
else:

View File

@@ -8,7 +8,7 @@ var settings_data = {
"startup_url": "",
"search_engine_url": "lw://search.web?q=",
"download_confirmation": true,
"dns_url": "135.125.163.131:4878"
"dns_url": "10.0.0.138:4878"
}
var _loaded = false