hellozeronet / zeronet Goto Github PK
View Code? Open in Web Editor NEWZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
Home Page: https://zeronet.io
License: Other
ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
Home Page: https://zeronet.io
License: Other
Ran for a while - I browsed some site someone made with images. Suddenly crashed after attempting to post a message. Continues to crash when started. Rolled back entire git repo and started from scratch - continued to crash on load of inital home.
screen: http://gyazo.com/f6e26573a4e8ffd72c738f9ac95a9633
I wish I knew more about the python environment or I'd dig in and trace the stack and debug. Beginning to think whatever I posted as a message is what crashed it.
Visiting these causes crash:
http://127.0.0.1:43110/1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp
http://127.0.0.1:43110/1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr
http://127.0.0.1:43110/16tAyA58u8AiZMMu6tcsCYaM8KXWXMhiaJ
This works:
http://127.0.0.1:43110/1Jr5bnqSnnp94CfC7xrqPh4yYYDRkpzozD/
I'll leave it up overnight to continue seeding.
Zeronet is taking a lot of time to load other website's like the one's present in the Zeroboards messages. I recommend that you should include a website load progress bar with some data in it so that user's can know how much percent the website has been loaded. It is very annoying to look at the connecting page without any estimate of how much data is left to be downloaded. Along with that the ZeroSearch (The search engine for zeronet) is not working. The page says internal server error. And one last thing is that please give some more documentation so that the developers could help you build it better.
Currently only UDP trackers supported. It could allow store TOR peer address by using peerid field.
Reported on redit:
Didn't work:
@util.Noparallel(blocking=False)
AttributeError: 'module' object has no attribute 'Noparallel' -- Error happened, press enter to close --
maybe collision with other python package
To make sure we get the latest updates realtime we have make sure we keep 2-3 active connections per site.
src.File.FileServer UpnpPunch run error: NameError: global name 'SocketError' is not defined in FileServer.py line 50 > UpnpPunch.py line 176 > UpnpPunch.py line 40
replacing SocketError by socket.error gets us to another error :
src.File.FileServer UpnpPunch run error: UnboundLocalError: local variable 'data' referenced before assignment in FileServer.py line 50 > UpnpPunch.py line 176 > UpnpPunch.py line 44
adding return to the except block gets us another error :
src.File.FileServer UpnpPunch run error: TypeError: expected string or buffer in FileServer.py line 50 > UpnpPunch.py line 176 > UpnpPunch.py line 52 > re.py line 177
I gave up there...
This would require adding "allow-same-domain" to iframe sandbox. I somewhat understand the security implications, and this would allow other sites access to each others' localresources, but I wanted to open this ticket to track this request. Ultimately, in an effort to provide a rich user experience, this same domain issue will need to be conquered.
Short term, I'd like to see localresources opened up, maybe with an explicit user permission per site, and an explanation of the risks?
Hi, i believe address should begin with Z
https://en.bitcoin.it/wiki/Base58Check_encoding
chart says 32 is the Z character
My version of miniupnpc doesn't understand "-e ZeroNet" but the rest of the command is right. Maybe there could be a test or a try/except to do it without the -e option.
Torrent like file splitting and distributing
Current timeout is 1sec/peer, it not works well with larger sites or slower connections.
We need to do the publish commands in parallel so we can give it longer timeout. (atm there is 5 sec timeout on receive time, so thats the maximum we can get now)
Creating an issue about an enhancement discussed in irc that I'm working on.
Currently there are some security issues in regards to downloading sites. A good implementation would be to prompt a user prior to downloading a site in which would output metadata such as the site description and directory size, along with an accept or decline. Among the initial download, there is also no prompt to accept or decline the update of a site being published that grows in size.
Suggestions or enhancements to such an idea are of course welcome.
Hi team!
First of all kudos for you project! It's a great tool!
Now I would like to ring a bell about the way we have to use it to browse and found existing site.
I deeply think that if we want decentralized services to be adopted by most of people and not just skilled ones (We work for freedom and liberties for every internet user after all), we should implement some sort of decentralized search/discovery service and human readable URLs.
Search/Discovery service are made to ease the spread and retrieval of information
I'm having a slight problem with trying to add a site, I feel like its due to user error on my part, but nevertheless I'd like to get it working
I've done this in a directory /home/dydx/Development/zeronet-sites/dydx
which contains index.html
and style.css
➜ dydx python /home/dydx/Development/github/ZeroNet/zeronet.py siteCreate
- Generating new privatekey...
- -----------------------------------------------------------
- Site private key: [removed for sake of posting to github issues] (save it, required to modify the site)
- Site address: 1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb
- -----------------------------------------------------------
- Creating directory structure...
- Creating content.json...
Site:1GXtHR..wWhb Site not exits yet, loading default content.json values...
Site:1GXtHR..wWhb Opening site data directory: data/1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb...
Site:1GXtHR..wWhb - data/1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb/index.html (SHA1: 4065b2b27a289cba476a7ffbce11681cbcc9f6f9)
Site:1GXtHR..wWhb Adding timestamp and sha1sums to new content.json...
Site:1GXtHR..wWhb Verifying private key...
Site:1GXtHR..wWhb Signing modified content.json...
Site:1GXtHR..wWhb Saving to data/1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb/content.json...
Site:1GXtHR..wWhb Site signed!
- Site created!
Everything looks good. I try to visit http://127.0.0.1/1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb
and get a message saying there were no peers found, which I suppose is correct given that no one has visited/seeded the page besides me
I post on the message board about trying to see if it works, and a user replied with this:
> Gives me hash failed, try to use siteSign command again
I suppose thats sort of odd, but I try the siteSign command and get notified that it succeeded:
➜ dydx python /home/dydx/Development/github/ZeroNet/zeronet.py siteSign 1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb
- Signing site: 1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb...
Private key (input hidden):
Site:1GXtHR..wWhb Opening site data directory: data/1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb...
Site:1GXtHR..wWhb - [SKIPPED] data/1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb/content.json
Site:1GXtHR..wWhb - data/1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb/index.html (SHA1: 4065b2b27a289cba476a7ffbce11681cbcc9f6f9)
Site:1GXtHR..wWhb Adding timestamp and sha1sums to new content.json...
Site:1GXtHR..wWhb Verifying private key...
Site:1GXtHR..wWhb Signing modified content.json...
Site:1GXtHR..wWhb Saving to data/1GXtHRoh7495zJYLthQ8xPt2dRzm8DwWhb/content.json...
Site:1GXtHR..wWhb Site signed!
I go to check the URL once more and see that I have 3 peers! But, it never seems to load. I get a message saying that content.json download failed
Do I just need to wait for more seeds to propagate, or is there an error in my setup somewhere?
I found a vulnerability in EllipticCurvePoint.SignECDSA. You use random.randint to generate k. random.randint is not a cryptographically secure random number generator.
From Wikipedia:
3. Select a cryptographically secure random integer k from [1, n-1].
Using a weak PRNG for k can result in the compromise of the private key d. For example: "Such failure of RNG caused users of Android Bitcoin Wallet to lose their funds in August 2013."
https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm
Namecoin should be used for publishing sites, which would allow namecoin lookups to the the public key address of a zeronet site. This completely decentralizes the technology that handles name lookups.
I propose zeronet public addresses should go in a value field "zn" or "0net" within a domain name registered with namecoin. More info here: https://wiki.namecoin.info/index.php?title=Domain_Name_Specification#Value_field
My site uses cyrillic characters at title and description http://127.0.0.1:43110/18C5HmyTt5Ua4WdyESp3mgmrCwVMPc4yw2 Cyrillic characters tend to Python's UnicodeEncodeError.
After I've published it once, ZeroNet allows me to publish latin version of this fields, but downloads old version of site from some peer immediately.
Every page loading always reports: UiServer Websocket error, please reload the page
Javascript console shows: http://gyazo.com/f1cee5522fe1516d501b8cea7339deb4
Norton
File blocked: tools\upnpc\upnpc-static.exe
Threat name: Trojan.Gen.2 ( http://www.symantec.com/security_response/writeup.jsp?docid=2011-082216-3542-99 )
Pure python upnp implementation would be nice, but i could not find any good.
Allow clearnet connections
setting: If disabled then standard ipv4 peers is connected using Tor exit-nodes. If its enabled then only Tor peers are connected through the Tor proxy.Problem:
Possible solutions:
Any help/idea/suggestion greatly welcomed. Thanks! :)
Hi team!
First of all kudos for you project! It's a great tool!
Now I would like to ring a bell about the way we have to use it to browse and found existing site.
I deeply think that if we want decentralized services to be adopted by most of people and not just skilled ones (We work for freedom and liberties for every internet user after all), we should implement some sort of decentralized search/discovery service and human readable URLs.
Search/Discovery service are made to ease the spread and retrieval of informations online during a solo browsing.
Human readable URLs are made to ease sharing and references of a previous browsing session.
Two main features that our browsers commonly implements (Of course it perform such a thing using other system services) and that need to be implement to ease the adoption of your project.
I'm not a professional of bitcoin but I know that bittorrent protocol implement resources discovery and advertising.
Sites protected by password or public-key based auth.
content.json modified timestamp should be in UTC, but looks like its not:
1JF4oezBUFMCbbct1uUnXHf4y3W3grUsXP "modified": 1421296119.0,
http://www.unixtimestamp.com/
The Current Unix Timestamp
1421283266
Thu, 15 Jan 2015 00:54:26 +0000
1421296119
Is equivalent to:
Thu, 15 Jan 2015 04:28:39 +0000
Cons:
Possible solutions:
--dont-open-browser
command line parameter-- Press enter to open http://localhost:43110/ in your browser --
This should be added quickly so people won't have to say if they have access to the private key or not.
I2P has bittorrent support, and it works very well (but slow). So suggestion is to use it. There should be an option to use only I2P, only clearnet, or both.
More info:
https://geti2p.net/en/
https://geti2p.net/en/docs/applications/bittorrent
When pause pressed empty current WorkerManager's tasks
In the past I had no content by myself, so it was easy to upgrade => replace
Now I have my own blog, my own sites, ... ZeroBlog changed, do I need to upgrade that also ? Do I need to upgrade MY blog? what's with my data?
BTW, one thing needs improvement: As more sites are coming online as more annoying it is WHERE the sites will get the place in the main screen, since it changes with each restart. Maybe we can add numbers to it, or "bookmark" them to a certain spot. What will be if we get hundreds of sites? Will we get a search button/sort button?
No idea why, but sometimes the getFile command response is lost in space:
[2015-01-29 17:52:32,391] DEBUG src.File.FileServer FileRequest: update 1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp content.json
[2015-01-29 17:52:32,391] DEBUG src.File.FileServer Someone trying to push a file to own site 1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp, reload local content.json first
[2015-01-29 17:52:32,507] DEBUG src.File.FileServer Update for content.json looks valid, saving...
[2015-01-29 17:52:32,512] INFO src.File.FileServer 1Gfey7..fcdp changed files: [u'messages.json']
[2015-01-29 17:52:32,513] DEBUG Peer:104.xxx:15441 sendCmd: ping
[2015-01-29 17:52:32,515] DEBUG Peer:104.xxx:15441 Sent command: ping
[2015-01-29 17:52:32,716] DEBUG Peer:104.xxx:15441 Got response to: ping
[2015-01-29 17:52:32,717] DEBUG Peer:104.xxx:15441 Ping: 0.203
[2015-01-29 17:52:32,717] DEBUG Peer:104.xxx:15441 sendCmd: getFile
[2015-01-29 17:52:32,717] DEBUG Peer:104.xxx:15441 Sent command: getFile
And its stops here, 20s later got the file from other peers, but not from this one
The socket is alive, because the ping command get the response, but the getFile response never arrives.
From server side everythiing looks allright:
[2015-01-29 17:52:31,207] DEBUG src.File.FileServer FileRequest: ping None None
[2015-01-29 17:52:31,408] DEBUG src.File.FileServer FileRequest: getFile 1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp messages.json
[2015-01-29 17:52:31,409] DEBUG src.File.FileServer Opening file: data/1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp/messages.json
[2015-01-29 17:52:31,409] DEBUG src.File.FileServer Sending file data/1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp/messages.json from position 0 to 86470
[2015-01-29 17:52:31,409] DEBUG src.File.FileServer File data/1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp/messages.json sent
I think its mostly happens after my computer wakes from sleep.
Maybe the zeromq server side in not compeltely thread safe maybe its other problem.
Sooner or later i think we have to get rid of the zeromq (too much limitations), but would be nice to know whats the reason of this problem.
After git pull :
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 508, in handle_one_response
self.run_application()
File "/home/arthur/local/ZeroNet/src/Ui/UiServer.py", line 21, in run_application
self.ws_handler.run_application()
File "/home/arthur/local/ZeroNet/src/lib/geventwebsocket/handler.py", line 81, in run_application
self.run_websocket()
File "/home/arthur/local/ZeroNet/src/lib/geventwebsocket/handler.py", line 57, in run_websocket
self.application(self.environ, lambda s, h: [])
File "/home/arthur/local/ZeroNet/src/Ui/UiServer.py", line 49, in handleRequest
return self.ui_request.route(path)
File "/home/arthur/local/ZeroNet/src/Ui/UiRequest.py", line 41, in route
return self.actionWebsocket()
File "/home/arthur/local/ZeroNet/src/Ui/UiRequest.py", line 239, in actionWebsocket
self.log.error("Wrapper key not found: %s" % wraper_key)
NameError: global name 'wraper_key' is not defined
future enhancement. When publishing becomes popular, more security should be allowed at the site key level in the form of multisig or scriptsig of some type.
When navigating a ZeroNet site the top URL in the browser doesn't change. It stays as the address for the top level of the site. This makes creating internal links to sites in ZeroNet difficult.
You can right click on a link and copy/paste it. But this leaves the "/media" path in the URL and when you visit it it displays at the top level, not in the iframe with the Websocket magic around it.
Would it be possible to change the top level URL when navigating? Maybe using a fragment identifier that the top level JS parses to navigate the iframe?
Here is my idea to make it work:
KzJp5B7mDpZ7kMHv67GowQRys9W9Hbaa5Rzj4PCoiyXfTk1fGAvH
. Its never will be displayed again, so please save it now! Ok I saved it, Create user!
or Login
Problems:
http://zeronet.readthedocs.org/
My first try:
I created a test site with and published it, and still get SEEDING UPDATE FAILED.
No real content yet there:
http://127.0.0.1:43110/19u3W1KB8nzzEW3EiQYC1eNfQ6Q53o9Gj7
What kind of files can I use for the site?
Is there a tutorial for that?
What will be ZeroMarket and ZeroBay??? or why is it gray?
I've mostly been using Zeronet in Firefox/Chrome for Mac, and they've been working fine. However, when trying to connect in Safari, there are a few problems. One, the flipping red square is white with a 1px red border (after it drops; as it's dropping it's red), two, dynamic content doesn't work (ZeroBlog is blank). It seems to be a problem with Ghostery (maybe?) but it worked fine with Ghostery in Chrome. Web Console messages:
[Error] Sandbox access violation: Blocked a frame at "http://themacmini09.agrius.feralhosting.com:43110" from accessing a frame at "http://themacmini09.agrius.feralhosting.com:43110". The frame requesting access is sandboxed and lacks the "allow-same-origin" flag. global code (ghostery-min.js, line 8)
[Error] Error: Syntax error, unrecognized expression: .messages .message:not(.template error (all.js, line 7) tokenize (all.js, line 7) select (all.js, line 7) gb (all.js, line 7) find (all.js, line 7) init (all.js, line 7) n (all.js, line 7) (anonymous function) (all.js, line 654) j (all.js, line 7) fireWith (all.js, line 7) x (all.js, line 9) (anonymous function) (all.js, line 9)
I have tried whitelisting the site in Ghostery, and even disabling it (which only removed the first error).
[2015-01-15 18:16:28,936] DEBUG src.File.FileServer FileRequest: update 1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp content.json
...
Workers created, but they stopped with "No task found, stopping" immediately.
If there is a .git
directory inside a site folder, crazy things start to happen with ZeroNet, making sites not update properly.
Ignoring any .git
directory should fix this.
Not every new message reaches all of the peers.
It's related to #43
Already working on new network code without ZeroMQ. It will be released in 1-2 weeks.
Error catched (<type 'exceptions.AssertionError'>, AssertionError("This event is already used by another greenl
et: (<ErrorhookedGreenlet at 0x2a8f958: <bound method Worker.downloader of <Worker.Worker.Worker instance at 0x
2c03f38>>>, timeout('timed out',))",), <traceback object at 0x2abbcb0>)
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/gevent/greenlet.py", line 390, in run
result = self._run(*self.args, **self.kwargs)
File "/home/sumo/p-private/dev1/bin-zeronet/src/Worker/Worker.py", line 47, in downloader
self.manager.doneTask(task)
File "/home/sumo/p-private/dev1/bin-zeronet/src/Worker/WorkerManager.py", line 128, in doneTask
self.site.onFileDone(task["inner_path"])
File "/home/sumo/p-private/dev1/bin-zeronet/src/util/Event.py", line 8, in __call__
f(*args, **kwargs)
File "/home/sumo/p-private/dev1/bin-zeronet/src/Site/Site.py", line 275, in <lambda>
self.onFileDone.append(lambda inner_path: self.fileDone(inner_path))
File "/home/sumo/p-private/dev1/bin-zeronet/src/Site/Site.py", line 307, in fileDone
self.updateWebsocket(file_done=inner_path)
File "/home/sumo/p-private/dev1/bin-zeronet/src/Site/Site.py", line 286, in updateWebsocket
ws.event("siteChanged", self, param)
File "/home/sumo/p-private/dev1/bin-zeronet/src/Ui/UiWebsocket.py", line 50, in event
self.cmd("setSiteInfo", site_info)
File "/home/sumo/p-private/dev1/bin-zeronet/src/Ui/UiWebsocket.py", line 60, in cmd
self.send({"cmd": cmd, "params": params}, cb)
File "/home/sumo/p-private/dev1/bin-zeronet/src/Ui/UiWebsocket.py", line 67, in send
self.ws.send(json.dumps(message))
File "/home/sumo/p-private/dev1/bin-zeronet/src/lib/geventwebsocket/websocket.py", line 345, in send
self.send_frame(message, opcode)
File "/home/sumo/p-private/dev1/bin-zeronet/src/lib/geventwebsocket/websocket.py", line 331, in send_frame
self.raw_write(header + message)
File "/usr/lib/pymodules/python2.7/gevent/socket.py", line 504, in sendall
data_sent += self.send(_get_memory(data, data_sent), flags)
File "/usr/lib/pymodules/python2.7/gevent/socket.py", line 484, in send
wait_write(sock.fileno(), timeout=timeout, event=self._write_event)
File "/usr/lib/pymodules/python2.7/gevent/socket.py", line 188, in wait_write
assert event.arg is None, 'This event is already used by another greenlet: %r' % (event.arg, )
AssertionError: This event is already used by another greenlet: (<ErrorhookedGreenlet at 0x2a8f958: <bound method Worker.downloader of <Worker.Worker.Worker instance at 0x2c03f38>>>, timeout('timed out',))
Where i can set allow ip list for zeronet webui?
Similar to torrent's DHT solution, required features:
Maybe its requred to separate the DHT from Peer Exchange
Please comment if you have other ideas/suggestions.
I think the README should recommend installing upnpc via packages (for example apt-get install miniupnc) and then ZeroNet could check if upnpc is in the path instead of having to explicitly use --upnpc option.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.