Merge pull request #120 from zeronet-conservancy/user_agent

reduce fingerprinting of site owner
This commit is contained in:
caryoscelus 2022-07-25 09:43:19 +00:00 committed by GitHub
commit e50558a118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -14,8 +14,9 @@ class Config(object):
def __init__(self, argv):
self.version = "0.7.6+"
self.user_agent = "conservancy"
# DEPRECATED ; replace with git-generated commit
self.rev = 5031
self.rev = 5032
self.argv = argv
self.action = None
self.test_parser = None

View file

@ -362,7 +362,7 @@ class Connection(object):
self.server.log.warning("Unknown target onion address: %s" % self.target_onion)
handshake = {
"version": "conservancy",
"version": config.user_agent,
"protocol": "v2",
"use_bin_type": True,
"peer_id": peer_id,

View file

@ -718,7 +718,8 @@ class ContentManager(object):
new_content["modified"] = int(time.time()) # Add timestamp
if inner_path == "content.json":
new_content["zeronet_version"] = config.version
# add for backward compatibility, but don't expose user version
new_content["zeronet_version"] = config.user_agent
new_content["signs_required"] = content.get("signs_required", 1)
new_content["address"] = self.site.address