Merge pull request #120 from zeronet-conservancy/user_agent
reduce fingerprinting of site owner
This commit is contained in:
commit
e50558a118
3 changed files with 5 additions and 3 deletions
|
@ -14,8 +14,9 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.7.6+"
|
self.version = "0.7.6+"
|
||||||
|
self.user_agent = "conservancy"
|
||||||
# DEPRECATED ; replace with git-generated commit
|
# DEPRECATED ; replace with git-generated commit
|
||||||
self.rev = 5031
|
self.rev = 5032
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.test_parser = None
|
self.test_parser = None
|
||||||
|
|
|
@ -362,7 +362,7 @@ class Connection(object):
|
||||||
self.server.log.warning("Unknown target onion address: %s" % self.target_onion)
|
self.server.log.warning("Unknown target onion address: %s" % self.target_onion)
|
||||||
|
|
||||||
handshake = {
|
handshake = {
|
||||||
"version": "conservancy",
|
"version": config.user_agent,
|
||||||
"protocol": "v2",
|
"protocol": "v2",
|
||||||
"use_bin_type": True,
|
"use_bin_type": True,
|
||||||
"peer_id": peer_id,
|
"peer_id": peer_id,
|
||||||
|
|
|
@ -718,7 +718,8 @@ class ContentManager(object):
|
||||||
|
|
||||||
new_content["modified"] = int(time.time()) # Add timestamp
|
new_content["modified"] = int(time.time()) # Add timestamp
|
||||||
if inner_path == "content.json":
|
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["signs_required"] = content.get("signs_required", 1)
|
||||||
|
|
||||||
new_content["address"] = self.site.address
|
new_content["address"] = self.site.address
|
||||||
|
|
Loading…
Reference in a new issue