feat(network): add selectable privacy-preserving discovery
This commit is contained in:
parent
9cf0c8fc9c
commit
4d31fd1517
26 changed files with 959 additions and 153 deletions
|
|
@ -196,7 +196,7 @@ func record_successful_connection(
|
|||
recent = _make_entry(endpoint, SavedServerEntry.Kind.RECENT)
|
||||
_recent_entries.append(recent)
|
||||
recent["display_name"] = (
|
||||
server_name if not server_name.is_empty() else endpoint.normalized_display
|
||||
server_name if not server_name.is_empty() else "Recent Server"
|
||||
)
|
||||
_apply_result_metadata(
|
||||
recent, now, "SUCCESS", server_name, protocol_version,
|
||||
|
|
@ -358,7 +358,11 @@ func _make_entry(
|
|||
var now: int = int(Time.get_unix_time_from_system())
|
||||
return {
|
||||
"entry_id": Crypto.new().generate_random_bytes(16).hex_encode(),
|
||||
"display_name": endpoint.host,
|
||||
"display_name": (
|
||||
"Saved Server"
|
||||
if kind == SavedServerEntry.Kind.SAVED
|
||||
else "Recent Server"
|
||||
),
|
||||
"route_kind": "DIRECT",
|
||||
"host": endpoint.host,
|
||||
"normalized_host": endpoint.host,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue