diff --git a/README.md b/README.md index 1d387a4b..1ffa6c7b 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Decentralized websites using Bitcoin crypto and the BitTorrent network - http:// other peers. #### [Slideshow about ZeroNet cryptography, site updates, multi-user sites »](https://docs.google.com/presentation/d/1_2qK1IuOKJ51pgBvllZ9Yu7Au2l551t3XBgyTSvilew/pub?start=false&loop=false&delayms=3000) +#### [Frequently asked questions »](http://zeronet.readthedocs.org/en/latest/faq/) diff --git a/src/Config.py b/src/Config.py index 48e425dc..f6002e56 100644 --- a/src/Config.py +++ b/src/Config.py @@ -4,7 +4,7 @@ import ConfigParser class Config(object): def __init__(self): self.version = "0.3.1" - self.rev = 267 + self.rev = 278 self.parser = self.createArguments() argv = sys.argv[:] # Copy command line arguments argv = self.parseConfig(argv) # Add arguments from config file diff --git a/src/Site/Site.py b/src/Site/Site.py index ef735b67..9ea474f3 100644 --- a/src/Site/Site.py +++ b/src/Site/Site.py @@ -327,7 +327,8 @@ class Site: # Copy root content.json if not new_site.storage.isFile("content.json") and not overwrite: # Content.json not exist yet, create a new one from source site content_json = self.storage.loadJson("content.json") - del content_json["domain"] + if "domain" in content_json: + del content_json["domain"] content_json["title"] = "my"+content_json["title"] content_json["cloned_from"] = self.address if address_index: content_json["address_index"] = address_index # Site owner's BIP32 index diff --git a/src/Site/SiteStorage.py b/src/Site/SiteStorage.py index b452bc83..47452206 100644 --- a/src/Site/SiteStorage.py +++ b/src/Site/SiteStorage.py @@ -179,7 +179,11 @@ class SiteStorage: # Get file size def getSize(self, inner_path): - return os.path.getsize(self.getPath(inner_path)) + path = self.getPath(inner_path) + if os.path.isfile(path): + return os.path.getsize(path) + else: + return 0 # File exist diff --git a/src/Test/BenchmarkSsl.py b/src/Test/BenchmarkSsl.py index 112751c8..324beab4 100644 --- a/src/Test/BenchmarkSsl.py +++ b/src/Test/BenchmarkSsl.py @@ -31,7 +31,7 @@ def handle(sock_raw, addr): break elif line == "gotssl\n": sock.sendall("yes\n") - sock = gevent.ssl.wrap_socket(sock_raw, server_side=True, keyfile='data/key-rsa.pem', certfile='data/cert-rsa.pem', ciphers=ciphers) + sock = gevent.ssl.wrap_socket(sock_raw, server_side=True, keyfile='data/key-rsa.pem', certfile='data/cert-rsa.pem', ciphers=ciphers, ssl_version=ssl.PROTOCOL_TLSv1) else: sock.sendall(data) except Exception, err: @@ -54,7 +54,7 @@ server.start() total_num = 0 total_bytes = 0 clipher = None -ciphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDH+AES128:ECDHE-RSA-AES128-GCM-SHA256:AES128-GCM-SHA256:AES128-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DSS:!DES:!RC4:!3DES:!MD5:!PSK" +ciphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDH+AES128:ECDHE-RSA-AES128-GCM-SHA256:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DSS:!DES:!RC4:!3DES:!MD5:!PSK" # ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23) diff --git a/src/Ui/UiWebsocket.py b/src/Ui/UiWebsocket.py index 785b4b70..bb2298b7 100644 --- a/src/Ui/UiWebsocket.py +++ b/src/Ui/UiWebsocket.py @@ -277,7 +277,7 @@ class UiWebsocket(object): if len(site.peers) == 0: if sys.modules["main"].file_server.port_opened: if notification: self.cmd("notification", ["info", "No peers found, but your content is ready to access."]) - self.response(to, "No peers found, but your content is ready to access.") + self.response(to, "ok") else: if notification: self.cmd("notification", ["info", "Your network connection is restricted. Please, open "+str(config.fileserver_port)+" port
on your router to make your site accessible for everyone."]) self.response(to, "Port not opened.")