├── .gitignore ├── LICENSE ├── README.md ├── docs ├── en │ ├── faq.md │ ├── help_zeronet │ │ ├── coding_conventions.md │ │ ├── contributing.md │ │ ├── donate.md │ │ └── network_protocol.md │ ├── index.md │ ├── site_development │ │ ├── cert_authority.md │ │ ├── content_json.md │ │ ├── dbschema_json.md │ │ ├── getting_started.md │ │ └── zeroframe_api_reference.md │ ├── translation.md │ └── using_zeronet │ │ ├── create_new_site.md │ │ ├── installing.md │ │ └── sample_sites.md ├── fr │ ├── faq.md │ ├── help_zeronet │ │ ├── coding_conventions.md │ │ ├── contributing.md │ │ ├── donate.md │ │ └── network_protocol.md │ ├── index.md │ ├── site_development │ │ ├── cert_authority.md │ │ ├── content_json.md │ │ ├── dbschema_json.md │ │ ├── getting_started.md │ │ └── zeroframe_api_reference.md │ ├── translation.md │ └── using_zeronet │ │ ├── create_new_site.md │ │ ├── installing.md │ │ └── sample_sites.md ├── it │ ├── faq.md │ ├── help_zeronet │ │ ├── coding_conventions.md │ │ ├── contributing.md │ │ ├── donate.md │ │ └── network_protocol.md │ ├── index.md │ ├── site_development │ │ ├── cert_authority.md │ │ ├── content_json.md │ │ ├── dbschema_json.md │ │ ├── getting_started.md │ │ └── zeroframe_api_reference.md │ ├── translation.md │ └── using_zeronet │ │ ├── create_new_site.md │ │ ├── installing.md │ │ └── sample_sites.md ├── resources │ ├── ZeroFrame.js │ ├── bitcoinbar │ │ ├── bitcoinbar.css │ │ └── bitcoinbar.js │ ├── docs.css │ ├── docs.js │ ├── fonts │ │ ├── roboto-mono-v5-latin-ext_latin-regular.woff │ │ ├── roboto-mono-v5-latin-ext_latin-regular.woff2 │ │ ├── roboto-v18-latin-ext_latin-300.woff │ │ ├── roboto-v18-latin-ext_latin-300.woff2 │ │ ├── roboto-v18-latin-ext_latin-700.woff │ │ ├── roboto-v18-latin-ext_latin-700.woff2 │ │ ├── roboto-v18-latin-ext_latin-italic.woff │ │ ├── roboto-v18-latin-ext_latin-italic.woff2 │ │ ├── roboto-v18-latin-ext_latin-regular.woff │ │ └── roboto-v18-latin-ext_latin-regular.woff2 │ ├── img │ │ ├── domain.png │ │ ├── reactiongifs.jpg │ │ ├── zeroblog.png │ │ ├── zeroboard.png │ │ ├── zerochat.png │ │ ├── zerohello-old.png │ │ ├── zerohello.png │ │ ├── zeromail.png │ │ ├── zerome.png │ │ ├── zerotalk-old.png │ │ └── zerotalk.png │ ├── javascripts │ │ └── menu.js │ ├── jquery.min.js │ ├── logo │ │ ├── favicon.ico │ │ └── zeronet_logo.svg │ ├── partials │ │ └── header.html │ └── stylesheets │ │ └── menu.css └── zh │ ├── faq.md │ ├── help_zeronet │ ├── coding_conventions.md │ ├── contributing.md │ ├── donate.md │ └── network_protocol.md │ ├── index.md │ ├── site_development │ ├── cert_authority.md │ ├── content_json.md │ ├── dbschema_json.md │ ├── getting_started.md │ └── zeroframe_api_reference.md │ ├── translation.md │ └── using_zeronet │ ├── create_new_site.md │ ├── installing.md │ └── sample_sites.md ├── example └── ZeroFrame │ ├── content.json │ ├── data │ └── messages.json │ ├── dbschema.json │ ├── index.html │ └── js │ ├── MySite.coffee │ ├── all.js │ └── lib │ └── ZeroFrame.coffee ├── mkdocs-fr.yml ├── mkdocs-it.yml ├── mkdocs-readthedocs.yml ├── mkdocs-zh.yml ├── mkdocs.yml ├── readthedocs.yml ├── requirements.txt ├── start.py └── start.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # Unit test / coverage reports 6 | htmlcov/ 7 | .tox/ 8 | .coverage 9 | .cache 10 | nosetests.xml 11 | coverage.xml 12 | 13 | # Translations 14 | *.mo 15 | *.pot 16 | 17 | # Django stuff: 18 | *.log 19 | 20 | # Sphinx documentation 21 | docs/_build/ 22 | 23 | # Hidden files 24 | .* 25 | 26 | # Built site 27 | site/ 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Available at 2 | https://zeronet.io/docs 3 | 4 | ## Building 5 | 6 | First install the following from pip: 7 | 8 | * mkdocs 9 | * mkdocs-material 10 | * pymdown-extensions 11 | 12 | Then simply run `mkdocs serve` to host a local version of the docs, or `mkdocs 13 | build` to output a static version. 14 | 15 | ## French doc 16 | 17 | Serve: 18 | 19 | `mkdocs serve -f mkdocs-fr.yml` 20 | 21 | Build: 22 | `mkdocs build -f mkdocs-fr.yml -d site-fr` 23 | 24 | ## Create a new translation 25 | 26 | You will need to duplicate the `mkdocs.yml` file and rename it to add the language code according to ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) it is used for. 27 | Example : `mkdocs-fr.yml` 28 | 29 | Modify the default lang for lunr search : 30 | ``` 31 | plugins: 32 | - search: 33 | lang: ['fr'] 34 | ``` 35 | 36 | Modify the language theme to fit the one you translate it for. 37 | Example : 38 | ``` 39 | theme: 40 | language: 'de' 41 | ``` 42 | 43 | Translate the nav is willing language. 44 | 45 | Now in `docs` duplicate the folder `en/` and rename it with appropriate language code. 46 | Example : `fr/` 47 | 48 | Now you can translate the documentation. Thank you. 49 | 50 | ## Generate all the doc files 51 | 52 | ``` 53 | mkdocs build -f mkdocs.yml & mkdocs build -f mkdocs-fr.yml 54 | ``` 55 | -------------------------------------------------------------------------------- /docs/en/help_zeronet/coding_conventions.md: -------------------------------------------------------------------------------- 1 | # Coding standards if you want to collaborate to ZeroNet 2 | - Follow [PEP8](https://www.python.org/dev/peps/pep-0008/) 3 | - Simple is better than complex 4 | - Premature optimization is the root of all evil 5 | 6 | ### Naming 7 | - ClassNames: Capitalized, CamelCased 8 | - functionNames: starts with lowercase, camelCased 9 | - variable_names: lowercased, under_scored 10 | 11 | ### Variables 12 | - file_path: File path realtive to working dir (data/17ib6teRqdVgjB698T4cD1zDXKgPqpkrMg/css/all.css) 13 | - inner_path: File relative to site dir (css/all.css) 14 | - file_name: all.css 15 | - file: Python file object 16 | - privatekey: Private key for the site (without _) 17 | 18 | ### Source files directories and naming 19 | - One class per file is preferred 20 | - Source file name and directory comes from ClassName: WorkerManager class = Worker/WorkerManager.py 21 | -------------------------------------------------------------------------------- /docs/en/help_zeronet/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to ZeroNet 2 | 3 | Thank you for using ZeroNet. ZeroNet is a collaborative effort of 67+ decentralization enthusiasts just like you. We appreciate all users that catch bugs, improve documentation and have good ideas of designing new protocols. Here are a few guidelines we ask you to follow to get started with making your contribution. 4 | 5 | ### You don’t have to contribute source code 6 | 7 | In fact, a majority of contributors do not submit source code. Even if you like to write programs, other types of contribution are also welcomed. 8 | 9 | ### Do you like to write? 10 | 11 | - Write about ZeroNet. 12 | - Write tutorials to help people set things up. 13 | - Help translate ZeroNet. 14 | - Improve this documentation. This documentation is a written by many community members all over the world. 15 | 16 | ### Do you like helping people? 17 | 18 | - Subscribe to our [issue tracker on GitHub](https://github.com/HelloZeroNet/ZeroNet/issues) and help people solve problems. 19 | - Join us on [Gitter](https://gitter.im/HelloZeroNet/ZeroNet) and IRC channel [#zeronet @ freenode](https://kiwiirc.com/client/irc.freenode.net/zeronet) and help answer questions. 20 | - Set up a seed box and help make the network faster. 21 | 22 | ### Do you like to make websites? 23 | 24 | - Create new ZeroNet sites. Go ahead and make your own blog on ZeroNet. [It is easy and costs little.](../using_zeronet/create_new_site.md) 25 | - “Content is king!” as NoFish puts. The network is worth nothing without content, so we need You to make it succeed. 26 | 27 | ### Do you like to do research? 28 | 29 | - Help us investigate our [hard issues](https://github.com/HelloZeroNet/ZeroNet/labels/help%20wanted). 30 | - Join our discussion of designing new features and protocols, such as [I2P support](https://github.com/HelloZeroNet/ZeroNet/issues/45) and [DHT support](https://github.com/HelloZeroNet/ZeroNet/issues/57). 31 | - Do you own a [Raspberry Pi](https://github.com/HelloZeroNet/ZeroNet#linux-terminal), a [C.H.I.P.](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:94:Running+ZeroNet+on+a+$9%C2%A0computer) or an [open router](https://github.com/HelloZeroNet/ZeroNet/issues/783)? Try running ZeroNet on it and tell us how well ZeroNet works on your device. 32 | 33 | ### Do you like to write code? 34 | 35 | - If you know Python, you can pick a task from our [issue tracker on GitHub](https://github.com/HelloZeroNet/ZeroNet/issues). 36 | - You are also welcomed develop your own ideas. Before you start, please [open a new discussion](https://github.com/HelloZeroNet/ZeroNet/issues/new) to let the community know, so you can make sure we can share our ideas to make the best out of it. 37 | - Keep your coding style consistent. We ask you to follow our coding convention below. 38 | 39 | ### Do you like to offer financial support? 40 | 41 | - You can [donate bitcoins](donate.md) to support ZeroNet. 42 | 43 | 44 | ## Coding convention 45 | 46 | - Follow [PEP8](https://www.python.org/dev/peps/pep-0008/) 47 | - Simple is better than complex 48 | - Premature optimization is the root of all evil 49 | 50 | ### Naming 51 | - ClassNames: Capitalized, CamelCased 52 | - functionNames: starts with lowercase, camelCased 53 | - variable_names: lowercased, under_scored 54 | 55 | ### Variables 56 | - file_path: File path relative to working dir (data/17ib6teRqdVgjB698T4cD1zDXKgPqpkrMg/css/all.css) 57 | - inner_path: File relative to site dir (css/all.css) 58 | - file_name: all.css 59 | - file: Python file object 60 | - privatekey: Private key for the site (without `_`) 61 | 62 | ### Source files directories and naming 63 | - One class per file is preferred 64 | - Source file name and directory comes from ClassName: WorkerManager class = Worker/WorkerManager.py 65 | -------------------------------------------------------------------------------- /docs/en/help_zeronet/donate.md: -------------------------------------------------------------------------------- 1 | # Help to keep ZeroNet development alive 2 | 3 | - Bitcoin: [1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX](bitcoin:1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX?Label=ZeroNet+donation) 4 | - PayPal: [https://www.paypal.me/zeronet/0usd](https://www.paypal.me/zeronet/0usd) 5 | 6 | Thanks! 7 | -------------------------------------------------------------------------------- /docs/en/index.md: -------------------------------------------------------------------------------- 1 | ## What is ZeroNet? 2 | 3 | ZeroNet uses Bitcoin cryptography and BitTorrent technology to build a **decentralized censorship-resistant network**. 4 | 5 | Users can publish static or dynamic websites to ZeroNet and visitors can choose to also serve the site themselves. Websites will remain online as long as one peer is still online. 6 | 7 | When a site is updated by its owner, all nodes serving that site (previous visitors) will receive only the incremental updates made to the site content. 8 | 9 | ZeroNet comes with a built-in SQL database. This makes content-heavy site development easy. The DB is then synced to hosting nodes via incremental updates. 10 | 11 | 12 | ## Why? 13 | 14 | * We believe in open, free, and uncensored communication. 15 | * No censorship: After something is published there is no way to remove it. 16 | * No single point of failure: Content remains online even if only one peer is serving it. 17 | * Impossible to shut down: It's nowhere because it's everywhere. Content is served by any user who wishes to. 18 | * Fast: ZeroNet uses BitTorrent technology to deliver content faster than centralised servers. 19 | * Works offline: You can access the site even if your internet is unavailable. 20 | * Secure: Content ownership is secured using the same cryptography that secures your Bitcoin wallet. 21 | 22 | [comment]: <> (I'm unsure about the following bit. Thoughts?) 23 | [comment]: <> (# What problem is ZeroNet solving?) 24 | 25 | [comment]: <> (When Tim Berners-Lee created the internet, he meant for it to be free. Not surveilled nor censored. And [he is still fighting for that](http://edition.cnn.com/2014/03/12/tech/web/tim-berners-lee-web-freedom/).) 26 | 27 | [comment]: <> (The internet is centralized mainly in two places: Content and Domain Names (URLs) are hosted and controlled by central servers. If you control the central servers (and if you are powerful enough you do) you control the network.) 28 | 29 | [comment]: <> (**Decentralized content storage**) 30 | 31 | [comment]: <> (ZeroNet tackles the content storage problem by giving everyone the ability to store content. Site visitors can choose to store a website on their computers, and when they do this they also help to serve the site to other users. The site is online even if only one user is hosting it.) 32 | 33 | [comment]: <> (**Shared DNS cache**) 34 | 35 | [comment]: <> (Site addresses on ZeroNet are cached by all network members. When you type a ZeroNet site URL on your browser this will query other peers connected to you about the site. If one of these peers happen to have the site they will send it to you, if not, they will forward your query along.) 36 | 37 | [comment]: <> (This architecture means that when a site URL is created, as long as one peer is serving it, there is no way to take the URL down.) 38 | 39 | 40 | ## Features 41 | * Easy, zero configuration setup. 42 | * Password-less [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) 43 | based authorization: Your account is protected by the same cryptography as your Bitcoin wallet. 44 | * Sites updated in real-time, no refreshing needed. 45 | * Namecoin .bit domains support. 46 | * SQL Database support: Allows for easier site development and faster page load times. 47 | * Anonymity: Full Tor network support with .onion hidden services instead of ipv4 addresses. 48 | * TLS encrypted connections. 49 | * Automatic, uPnP port opening. 50 | * Plugin for multiuser (openproxy) support. 51 | * Works with any browser/OS. 52 | 53 | 54 | ## How does it work? 55 | 56 | * After you install and run ZeroNet, you open a site by visiting: 57 | `http://127.0.0.1:43110/{zeronet_site_address}` 58 | (e.g. `http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D`). 59 | * ZeroNet will then use the BitTorrent network to find peers that are seeding the site and will download the site content (HTML, CSS, JS...) from these peers. 60 | * Each site visited is then served by your client. Sites can be removed or blacklisted if necessary. 61 | * Every site contains a list of all of its files, each entry containing a SHA512 hash and a signature generated using the site owner's private key. 62 | * If the site owner modifies the site, then he/she signs a new list and publishes it to the peers. 63 | After the peers have verified the files list integrity (using the 64 | signature), they download the modified files and publish the new content to 65 | other peers. 66 | 67 | ##### [Slideshow about ZeroNet cryptography, content updates, multi-user sites »](https://docs.google.com/presentation/d/1_2qK1IuOKJ51pgBvllZ9Yu7Au2l551t3XBgyTSvilew/pub?start=false&loop=false&delayms=3000) 68 | 69 | 70 | ## Screenshots 71 | 72 | ![Screenshot](./img/zerohello.png) 73 | 74 | ![ZeroTalk](./img/zerotalk.png) 75 | 76 | ##### [More screenshots »](using_zeronet/sample_sites/) 77 | 78 | ## Current limitations 79 | 80 | * No torrent-like, file splitting for big file support (BigFile plugin enables this) 81 | * File transactions are not compressed or encrypted yet (TLS encryption added) 82 | * No private sites 83 | 84 | ## Help to keep this project alive 85 | 86 | Bitcoin: 1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX 87 | 88 | [Full donation page](help_zeronet/donate/) 89 | 90 | ### Thank you! 91 | 92 | * More info, help, changelog, zeronet sites: [http://www.reddit.com/r/zeronet/](http://www.reddit.com/r/zeronet/) 93 | * Come, chat with us: [#zeronet @ FreeNode](https://kiwiirc.com/client/irc.freenode.net/zeronet) or on [gitter](https://gitter.im/HelloZeroNet/ZeroNet) 94 | -------------------------------------------------------------------------------- /docs/en/site_development/cert_authority.md: -------------------------------------------------------------------------------- 1 | # Certificate Authority 2 | 3 | An account without password? A certificate for me? You realize the ID system of ZeroNet does not conform to convention. In this section, you are going to learn about how user certificate and certificate authority work in ZeroNet. 4 | 5 | ## What does a certificate authority do? 6 | 7 | In ZeroNet, everything is signed by Bitcoin signing keys. A certificate provides a unique and memorizable name for a Bitcoin address. A certificate authority (or an ID provider) is responsible for proving the relationship between a unique friendly name and a Bitcoin address. 8 | 9 | ## Certificate format 10 | 11 | ### Body 12 | 13 | The body of a certificate contains a Bitcoin address, a portal type, and a memorizable user name. 14 | 15 | ``` 16 | [BitcoinAddress]#[PortalType]/[UserName] 17 | ``` 18 | 19 | **Example:** 20 | 21 | ``` 22 | 1H28iygiKXe3GUMcD77HiifVqtf3858Aft#web/hellozeronet 23 | ``` 24 | 25 | - Bitcoin address: `1H28iygiKXe3GUMcD77HiifVqtf3858Aft` 26 | - Portal type: `web` 27 | - User name: `hellozeronet` 28 | 29 | **General rules:** 30 | 31 | The Bitcoin address, the portal type and the user name **must not** contain the character `#`, `@` or `/` 32 | 33 | Only 0-9 and a-z are allowed in a user name. All English letters in a user name **must** be in lower case. Characters not in the allowed set **must not** be used as parts of a user name. A user name **should not** be too long. A user name **should** be legible and **should not** interfere with user interface rendering. 34 | 35 | A user name **must** be unique in the pool of all registered user names. 36 | 37 | ### Signature 38 | 39 | A certificate signing algorithm loads a secret signing key and generates a deterministic Bitcoin signature for the body. 40 | 41 | **From the source code:** 42 | 43 | ```python 44 | sign = os.popen("python zeronet.py --debug cryptSign %s#bitmsg/%s %s 2>&1" % (auth_address, user_name, config.site_privatekey)).readlines()[-1].strip() 45 | ``` 46 | 47 | ### Certificate 48 | 49 | By looking at the source code of ZeroID, we know how a certificate is stored in its public database. 50 | 51 | ```python 52 | data["users"][user_name] = "bitmsg,%s,%s" % (auth_address, sign) 53 | ``` 54 | 55 | **Example:** 56 | 57 | ``` 58 | "hellozeronet": "web,1H28iygiKXe3GUMcD77HiifVqtf3858Aft,HA2A+iKekECD3hasrsN8IrR86BnXQ63kPH+9A85JLO9hLUpRJTBn62UfnuuF92B9CIc6+EewAIqzIn9UoVq2LPA=" 59 | ``` 60 | 61 | A certificate can be stored in various formats. However, all formats must include: 62 | 63 | - The Bitcoin address: `1H28iygiKXe3GUMcD77HiifVqtf3858Aft` 64 | - The portal type: `web` 65 | - The user name: `hellozeronet` 66 | - The signature from authority: `HA2A+iKekECD3hasrsN8IrR86BnXQ63kPH+9A85JLO9hLUpRJTBn62UfnuuF92B9CIc6+EewAIqzIn9UoVq2LPA=` 67 | 68 | ## Usage in `content.json` 69 | 70 | Site owners can choose which certificate authorities to trust. 71 | 72 | The Blue Hub, for example, accepts certificates signed by ZeroID. This rule is defined in its `data/users/content.json` 73 | 74 | - The ID provider has a friendly name: `zeroid.bit` 75 | - The public key digest of the ID provider is: `1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz` 76 | 77 | ```json 78 | "user_contents": { 79 | "cert_signers": { 80 | "zeroid.bit": [ 81 | "1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz" 82 | ] 83 | } 84 | } 85 | ``` 86 | 87 | Every user presents his certificate in the manifest file in his Bitcoin folder. For example, `data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json` says: 88 | 89 | ```json 90 | { 91 | "address": "1BLueGvui1GdbtsjcKqCf4F67uKfritG49", 92 | "cert_auth_type": "web", 93 | "cert_sign": "HPiZsWEJ5eLnspUj8nQ75WXbSanLz0YhQf5KJDq+4bWe6wNW98Vv9PXNyPDNu2VX4bCEXhRC65pS3CM7cOrjjik=", 94 | "cert_user_id": "nofish@zeroid.bit", 95 | "files": { 96 | "data.json": { 97 | "sha512": "8e597412a2bc2726ac9a1ee85428fb3a94b09f4e7a3f5f589119973231417b15", 98 | "size": 21422 99 | } 100 | }, 101 | "inner_path": "data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json", 102 | "modified": 1492458379, 103 | "signs": { 104 | "1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj": "G8kaZIGAstsiWLVY20e2ogJQi4OO+QuwqJ9GTj3gz7YleST/jst7RQH7hDn0uf8BJMBjFs35H3LPhNHHj4jueh8=" 105 | } 106 | } 107 | ``` 108 | 109 | Site specific: 110 | 111 | - Expected site URL: `"address": "1BLueGvui1GdbtsjcKqCf4F67uKfritG49"` 112 | - Expected file path: `"inner_path": "data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json"` 113 | 114 | Certificate information: 115 | 116 | - ID provider: `zeroid.bit` 117 | - User name: `nofish` 118 | - User Bitcoin address: `1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj` 119 | - Portal type: `web` 120 | - Signature from ID provider: `HPiZsWEJ5eLnspUj8nQ75WXbSanLz0YhQf5KJDq+4bWe6wNW98Vv9PXNyPDNu2VX4bCEXhRC65pS3CM7cOrjjik=` 121 | 122 | ### The verifying process 123 | 124 | 1. The verifying algorithm reads `data/users/content.json` to determine what is the expected site for the user content. 125 | 126 | 2. The verifying algorithm reads `data/users/content.json` to look up the public key digest of the ID provider. 127 | 128 | 3. Given a user Bitcoin address, a portal type and a user name, the verifying algorithm reconstructs the body of the certificate. 129 | 130 | 4. The verifying algorithm checks the signature from the ID provider, with the public key defined in `data/users/content.json`, to ensure the authenticity of the certificate body. 131 | 132 | 5. The verifying algorithm loads the user public key and checks the authenticity of the user content. 133 | 134 | ## Features and limitations of certificate authorities 135 | 136 | - A certificate authority provides memorizable names for user public key digests. It also helps mitigate spam and unsolicited content. 137 | 138 | - A user does not have to give away secret information such as passwords. In addition, a user only has to authenticate once. 139 | 140 | - A certificate authority does not have to be approved by any ZeroNet developers. A site owner can choose which certificate authorities to trust for the sake of user content quality. 141 | 142 | - A certificate authority is responsible for maintaining its user name pool. 143 | 144 | - ZeroID does not revoke or renew certificates. 145 | 146 | ## Can I live without certificate authorities? 147 | 148 | Generally, a certificate is required when you add things to someone else's site. You do not need a certificate when you are modifying your own site. 149 | -------------------------------------------------------------------------------- /docs/en/site_development/dbschema_json.md: -------------------------------------------------------------------------------- 1 | # Structure of dbschema.json 2 | 3 | [Example dbschema.json file](https://github.com/HelloZeroNet/ZeroTalk/blob/master/dbschema.json) 4 | 5 | The code below will do the following: 6 | 7 | - If an updated data/users/*/data.json file is received (eg.: a user posted something): 8 | - Every row in `data["topics"]` is loaded to the `topic` table 9 | - Every key in `data["comment_votes"]` is loaded to the `comment_vote` table as `comment_hash` col and the values stored in same line as `vote` 10 | - If an updated data/users/content.json file is received (eg.: new user created): 11 | - The `"user_id", "user_name", "max_size", "added"` key in value of `content["include"]` is loaded into the `user` table and the key is stored as `path` 12 | 13 | > Note: [Some restriction](content_json/#regular-expressions-limitations) apply to regular expressions to avoid possible ReDoS vulnerability. 14 | 15 | ```json 16 | 17 | { 18 | "db_name": "ZeroTalk", # Database name (only used for debugging) 19 | "db_file": "data/users/zerotalk.db", # Database file relative to site's directory 20 | "version": 2, # 1 = Json table has path column that includes directory and filename 21 | # 2 = Json table has separate directory and file_name column 22 | # 3 = Same as version 2, but also has site column (for merger sites) 23 | "maps": { # Json to database mappings 24 | ".*/data.json": { # Regex pattern of file relative to db_file 25 | "to_table": [ # Load values to table 26 | { 27 | "node": "topics", # Reading data.json[topics] key value 28 | "table": "topic" # Feeding data to topic table 29 | }, 30 | { 31 | "node": "comment_votes", # Reading data.json[comment_votes] key value 32 | "table": "comment_vote", # Feeding data to comment_vote table 33 | "key_col": "comment_hash", 34 | # data.json[comment_votes] is a simple dict, the keys of the 35 | # dict are loaded to comment_vote table comment_hash column 36 | 37 | "val_col": "vote" 38 | # The data.json[comment_votes] dict values loaded to comment_vote table vote column 39 | 40 | } 41 | ], 42 | "to_keyvalue": ["next_message_id", "next_topic_id"] 43 | # Load data.json[next_topic_id] to keyvalue table 44 | # (key: next_message_id, value: data.json[next_message_id] value) 45 | 46 | }, 47 | "content.json": { 48 | "to_table": [ 49 | { 50 | "node": "includes", 51 | "table": "user", 52 | "key_col": "path", 53 | "import_cols": ["user_id", "user_name", "max_size", "added"], 54 | # Only import these columns to user table 55 | "replaces": { 56 | "path": {"content.json": "data.json"} 57 | # Replace content.json to data.json in the 58 | # value of path column (required for joining) 59 | } 60 | } 61 | ], 62 | "to_json_table": [ "cert_auth_type", "cert_user_id" ] # Save cert_auth_type and cert_user_id directly to json table (easier and faster data queries) 63 | } 64 | }, 65 | "tables": { # Table definitions 66 | "topic": { # Define topic table 67 | "cols": [ # Cols of the table 68 | ["topic_id", "INTEGER"], 69 | ["title", "TEXT"], 70 | ["body", "TEXT"], 71 | ["type", "TEXT"], 72 | ["parent_topic_hash", "TEXT"], 73 | ["added", "DATETIME"], 74 | ["json_id", "INTEGER REFERENCES json (json_id)"] 75 | ], 76 | "indexes": ["CREATE UNIQUE INDEX topic_key ON topic(topic_id, json_id)"], 77 | # Indexes automatically created 78 | 79 | "schema_changed": 1426195822 80 | # Last time of the schema changed, if the client's version is different then 81 | # automatically destroy the old, create the new table then reload the data into it 82 | 83 | }, 84 | "comment_vote": { 85 | "cols": [ 86 | ["comment_hash", "TEXT"], 87 | ["vote", "INTEGER"], 88 | ["json_id", "INTEGER REFERENCES json (json_id)"] 89 | ], 90 | "indexes": ["CREATE UNIQUE INDEX comment_vote_key ON comment_vote(comment_hash, json_id)", "CREATE INDEX comment_vote_hash ON comment_vote(comment_hash)"], 91 | "schema_changed": 1426195826 92 | }, 93 | "user": { 94 | "cols": [ 95 | ["user_id", "INTEGER"], 96 | ["user_name", "TEXT"], 97 | ["max_size", "INTEGER"], 98 | ["path", "TEXT"], 99 | ["added", "INTEGER"], 100 | ["json_id", "INTEGER REFERENCES json (json_id)"] 101 | ], 102 | "indexes": ["CREATE UNIQUE INDEX user_id ON user(user_id)", "CREATE UNIQUE INDEX user_path ON user(path)"], 103 | "schema_changed": 1426195825 104 | }, 105 | "json": { # Json table format only required if you have specified to_json_table pattern anywhere 106 | "cols": [ 107 | ["json_id", "INTEGER PRIMARY KEY AUTOINCREMENT"], 108 | ["directory", "TEXT"], 109 | ["file_name", "TEXT"], 110 | ["cert_auth_type", "TEXT"], 111 | ["cert_user_id", "TEXT"] 112 | ], 113 | "indexes": ["CREATE UNIQUE INDEX path ON json(directory, site, file_name)"], 114 | "schema_changed": 4 115 | } 116 | } 117 | } 118 | ``` 119 | 120 | ## Example for data.json file 121 | ```json 122 | { 123 | "next_topic_id": 2, 124 | "topics": [ 125 | { 126 | "topic_id": 1, 127 | "title": "Newtopic", 128 | "body": "Topic!", 129 | "added": 1426628540, 130 | "parent_topic_hash": "5@2" 131 | } 132 | ], 133 | "next_message_id": 19, 134 | "comments": { 135 | "1@2": [ 136 | { 137 | "comment_id": 1, 138 | "body": "New user test!", 139 | "added": 1423442049 140 | } 141 | ], 142 | "1@13": [ 143 | { 144 | "comment_id": 2, 145 | "body": "hello", 146 | "added": 1424653288 147 | }, 148 | { 149 | "comment_id": 13, 150 | "body": "test 123", 151 | "added": 1426463715 152 | } 153 | ] 154 | }, 155 | "topic_votes": { 156 | "1@2": 1, 157 | "4@2": 1, 158 | "2@2": 1, 159 | "1@5": 1, 160 | "1@6": 1, 161 | "3@2": 1, 162 | "1@13": 1, 163 | "4@5": 1 164 | }, 165 | "comment_votes": { 166 | "5@5": 1, 167 | "2@12": 1, 168 | "1@12": 1, 169 | "33@2": 1, 170 | "45@2": 1, 171 | "12@5": 1, 172 | "34@2": 1, 173 | "46@2": 1 174 | } 175 | } 176 | ``` 177 | 178 | ## Example for content.json file 179 | 180 | ```json 181 | { 182 | "files": {}, 183 | "ignore": ".*/.*", 184 | "includes": { 185 | "13v1FwKcq7dx2UPruFcRcqd8s7VBjvoWJW/content.json": { 186 | "added": 1426683897, 187 | "files_allowed": "data.json", 188 | "includes_allowed": false, 189 | "max_size": 10000, 190 | "signers": [ 191 | "13v1FwKcq7dx2UPruFcRcqd8s7VBjvoWJW" 192 | ], 193 | "signers_required": 1, 194 | "user_id": 15, 195 | "user_name": "meginthelloka" 196 | }, 197 | "15WGMVViswrF13sAKb7je6oX3UhXavBxxQ/content.json": { 198 | "added": 1426687209, 199 | "files_allowed": "data.json", 200 | "includes_allowed": false, 201 | "max_size": 10000, 202 | "signers": [ 203 | "15WGMVViswrF13sAKb7je6oX3UhXavBxxQ" 204 | ], 205 | "signers_required": 1, 206 | "user_id": 18, 207 | "user_name": "habla" 208 | } 209 | } 210 | } 211 | ``` 212 | -------------------------------------------------------------------------------- /docs/en/site_development/getting_started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ZeroNet allows you to publish static and dynamic websites on a distributed web platform. 4 | 5 | In ZeroNet there is no concept of servers. Thus, server-side languages like PHP or Ruby are not needed. Instead, one can create dynamic content using ZeroNet's API (called ZeroFrame), JavaScript (or CoffeeScript) and the SQL database provided to all websites. 6 | 7 | ## Tutorials 8 | 9 | ### ZeroChat tutorial 10 | 11 | In this tutorial we are going to build a P2P, decentralized, server-less chat site in less then 100 lines of code. 12 | 13 | * [Read on ZeroBlog](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:99:ZeroChat+tutorial) 14 | * [Read on Medium.com](https://decentralize.today/decentralized-p2p-chat-in-100-lines-of-code-d6e496034cd4) 15 | 16 | ## Useful Information 17 | 18 | ### ZeroNet Debug mode 19 | 20 | ZeroNet comes with a `--debug` flag that will make site development easier. 21 | 22 | To run ZeroNet in debug mode use: `python zeronet.py --debug` 23 | 24 | If you are using compiled/bundled version of ZeroNet: 25 | 26 | * On Windows: `lib\ZeroNet.cmd --debug` 27 | * On Linux: `./ZeroNet.sh --debug` 28 | * On Mac: `./ZeroNet.app/Contents/MacOS/ZeroNet --debug` 29 | 30 | #### Debug mode features: 31 | 32 | - Automatic [CoffeeScript](http://coffeescript.org/) -> JavaScript conversion (if a coffeescript compiler is installed) 33 | - Debug messages will appear in the console 34 | - Auto reload of some source files (UiRequest, UiWebsocket, FileRequest) on modification to prevent restarting (Requires [PyFilesystem](http://pyfilesystem.org/) on GNU/Linux) 35 | - `http://127.0.0.1:43110/Debug` Traceback and interactive Python console at the last error position (using the wonderful Werkzeug debugger - Requires [Werkzeug](http://werkzeug.pocoo.org/)) 36 | - `http://127.0.0.1:43110/Console` Spawns an interactive Python console (Requires [Werkzeug](http://werkzeug.pocoo.org/)) 37 | 38 | ### Writing in CoffeeScript 39 | 40 | To aid in writing CoffeeScript-based ZeroNet sites and to make use of ZeroNet's 41 | built-in CoffeeScript -> JavaScript converter, first enable debug mode as 42 | described in [Debug](#zeronet-debug-mode). Additionally, ensure the site you 43 | wish to work on is marked as one you own by enabling "This is my site" via 44 | the site sidebar. 45 | 46 | 47 | ZeroNet will compile all CoffeeScript files it can find into a file called `all.js`, and deposit it in a `js/` folder at the top level of your site. This file will also include all your JavaScript code as well. Then you can simply import all your dynamic code into your HTML with the following before the `` tag: 48 | 49 | ```html 50 | 51 | ``` 52 | 53 | 54 | !!! info "Note" 55 | 56 | `{lang}` is a *placeholder variable*, and will be automatically replaced by the appropriate value by ZeroNet when the site is loaded. 57 | 58 | 59 | ### Disable HTTP Browser Caching 60 | 61 | In addition to Debug Mode, disabling HTTP Caching in the browser is an essential part of ZeroNet site development. Modern web browsers attempt to cache web content whenever they can. As all ZeroNet sites run in an iframe, web browsers cannot detect when a ZeroNet site's content changes, and thus site changes are often not reflected if HTTP Caching is enabled. 62 | 63 | To disable, open your browser's devtools, navigate to the devtools settings and check the option along the lines of 'Disable HTTP Cache (when toolbox is open)'. As the setting suggests, make sure to keep devtools open when testing new changes to your site! 64 | 65 | ### Extra features (works only for sites that you own) 66 | 67 | - Merged CSS files: All CSS files inside the site folder will be merged into one file called `all.css`. You can choose to include only this file to your site. If you want to keep the other CSS files to make the development easier, you can add them to the ignore key of your `content.json`. This way, they won't be published with your site. (eg: add to your `content.json` `"ignore": "(js|css)/(?!all.(js|css))"` this will ignore all CSS and JS files except `all.js` and `all.css`) 68 | - Merged JS files: All JS files inside the site folder will be merged into one file called `all.js`. If a CoffeeScript compiler is present (bundled for Windows) it will convert `.coffee` to `.js`. 69 | - Order in which files are merged into all.css/all.js: Files inside subdirectories of the css/js folder comes first; Files in the css/js folder will be merged according to file name ordering (01_a.css, 02_a.css, etc) 70 | 71 | ## Need Help? 72 | 73 | ZeroNet has a growing community of developers who hang out in various spaces. If you would like to ask for help, advice or just want to hang out, feel free to connect in to the following services: 74 | 75 | ### Forums 76 | 77 | * [ZeroExchange](http://127.0.0.1:43110/zeroexchange.bit/), a p2p StackOverflow clone 78 | * [ZeroTalk](http://127.0.0.1:43110/Talk.ZeroNetwork.bit/), a p2p Reddit-like forum 79 | 80 | ### Chat 81 | 82 | * [#zeronet-dev:matrix.org](https://riot.im/app/#/room/#zeronet-dev:matrix.org) on Matrix 83 | * IRC at #zeronet on Freenode 84 | -------------------------------------------------------------------------------- /docs/en/translation.md: -------------------------------------------------------------------------------- 1 | # Translation HowTo 2 | 3 | Instructions goes here. 4 | -------------------------------------------------------------------------------- /docs/en/using_zeronet/create_new_site.md: -------------------------------------------------------------------------------- 1 | # Create new ZeroNet site 2 | 3 | ## Easy way: Using the web interface 4 | 5 | * Click on **⋮** > **"Create new, empty site"** menu item on the site [ZeroHello](http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D). 6 | * You will be **redirected** to a completely new site that is only modifiable by you! 7 | * You can find and modify your site's content in **data/[yoursiteaddress]** directory 8 | * After the modifications open your site, drag the topright "0" button to left, then press **sign** and **publish** buttons on the bottom 9 | 10 | ## Manual way: Using the command line 11 | 12 | > __Note:__ 13 | > If you are using pre-boundled ZeroNet distribution, then in place of `zeronet.py` you need to use `./ZeroNet.sh` (Linux), `lib/ZeroNet.cmd` (Windows), `ZeroNet.app/Contents/MacOS/ZeroNet` (macOS) 14 | 15 | ### 1. Create site structure 16 | 17 | * Shut down ZeroNet if it is running 18 | * Browse to the folder where ZeroNet is installed and run: 19 | 20 | ```bash 21 | $ zeronet.py siteCreate 22 | ... 23 | - Site private key: 23DKQpzxhbVBrAtvLEc2uvk7DZweh4qL3fn3jpM3LgHDczMK2TtYUq 24 | - Site address: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 25 | ... 26 | - Site created! 27 | $ zeronet.py 28 | ... 29 | ``` 30 | 31 | - This will create the initial files for your site inside ```data/13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2```. 32 | 33 | ### 2. Build/Modify site 34 | 35 | * Update the site files located in ```data/[your site address key]``` (eg: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2). 36 | * When your site is ready run: 37 | 38 | ```bash 39 | $ zeronet.py siteSign 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 40 | - Signing site: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2... 41 | Private key (input hidden): 42 | ``` 43 | 44 | * Enter the private key you got when you created the site. This will sign all files so peers can verify that the site owner is who made the changes. 45 | 46 | ### 3. Publish site changes 47 | 48 | * In order to inform peers about the changes you made you need to run: 49 | 50 | ```bash 51 | $ zeronet.py sitePublish 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 52 | ... 53 | Site:13DNDk..bhC2 Publishing to 3/10 peers... 54 | Site:13DNDk..bhC2 Successfuly published to 3 peers 55 | - Serving files.... 56 | ``` 57 | 58 | * That's it! You've successfully signed and published your modifications. 59 | * Your site will be accessible from: ```http://localhost:43110/13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2``` 60 | 61 | 62 | **Next steps:** [ZeroNet Developer Documentation](../../site_development/getting_started/) 63 | -------------------------------------------------------------------------------- /docs/en/using_zeronet/installing.md: -------------------------------------------------------------------------------- 1 | # Installing ZeroNet 2 | 3 | * Download ZeroBundle package: [Microsoft Windows](https://github.com/HelloZeroNet/ZeroNet-win/archive/dist/ZeroNet-win.zip), [Apple macOS](https://github.com/HelloZeroNet/ZeroNet-mac/archive/dist/ZeroNet-mac.zip), [Linux 64bit](https://github.com/HelloZeroNet/ZeroBundle/raw/master/dist/ZeroBundle-linux64.tar.gz), [Linux 32bit](https://github.com/HelloZeroNet/ZeroBundle/raw/master/dist/ZeroBundle-linux32.tar.gz) 4 | * Unpack anywhere 5 | * Run `ZeroNet.exe` (win), `ZeroNet(.app)` (macOS), `ZeroNet.sh` (linux) 6 | 7 | ### Manual install for Debian Linux 8 | 9 | * `sudo apt-get update` 10 | * `sudo apt-get install msgpack-python python-gevent` 11 | * `wget https://github.com/HelloZeroNet/ZeroNet/archive/master.tar.gz` 12 | * `tar xvpfz master.tar.gz` 13 | * `cd ZeroNet-master` 14 | * Start with `python zeronet.py` 15 | * Open http://127.0.0.1:43110/ in your browser 16 | 17 | ### [Vagrant](https://www.vagrantup.com/) 18 | 19 | * `vagrant up` 20 | * Access VM with `vagrant ssh` 21 | * `cd /vagrant` 22 | * Run `python zeronet.py --ui_ip 0.0.0.0` 23 | * Open http://127.0.0.1:43110/ in your browser 24 | 25 | ### [Docker](https://www.docker.com/) 26 | * `docker run -d -v :/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 nofish/zeronet` 27 | * This Docker image includes the Tor proxy, which is disabled by default. Beware that some 28 | hosting providers may not allow you running Tor in their servers. If you want to enable it, 29 | set `ENABLE_TOR` environment variable to `true` (Default: `false`). E.g.: 30 | 31 | `docker run -d -e "ENABLE_TOR=true" -v :/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 nofish/zeronet` 32 | * Open http://127.0.0.1:43110/ in your browser 33 | 34 | ### [Virtualenv](https://virtualenv.readthedocs.org/en/latest/) 35 | 36 | * `virtualenv env` 37 | * `source env/bin/activate` 38 | * `pip install msgpack-python gevent` 39 | * `python zeronet.py` 40 | * Open http://127.0.0.1:43110/ in your browser 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/en/using_zeronet/sample_sites.md: -------------------------------------------------------------------------------- 1 | # Sample ZeroNet sites 2 | 3 | ## ZeroHello 4 | 5 | The homepage of ZeroNet 6 | 7 | - Lists all added sites: Title, Peer number, Modification date, etc. 8 | - Site actions: Update, Pause, Resume, Delete, Check Files and Save as .zip 9 | - Clone sites to have your own blog / forum 10 | - ZeroNet Statistics 11 | - If an update is available, ZeroNet can be updated with one click 12 | 13 | ![ZeroHello](../img/zerohello.png) 14 | 15 | Address: [1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D](http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D) 16 | 17 | [Source code](https://github.com/HelloZeroNet/ZeroHello) 18 | 19 | --- 20 | 21 | ## ZeroBlog 22 | 23 | Self publishing blog demo 24 | 25 | - Inline content editor 26 | - Markdown syntax 27 | - Code syntax highlighting 28 | - Site signing & publishing through the web interface 29 | 30 | How does it work? 31 | 32 | - `data.json` contained within site files contain blog posts and comments. Each user has their own. 33 | - Upon pressing `Sign & Publish new content`, the blogger is asked for the site private key (displayed when [creating a new site using zeronet.py siteCreate command](create_new_site/)) 34 | - Your ZeroNet client signs the new/modified files and publishes directly to other peers 35 | - The site will then be accessible until to other peers to view 36 | 37 | ![ZeroBlog](../img/zeroblog.png) 38 | 39 | Address: [1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8](http://127.0.0.1:43110/1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8) or [blog.zeronetwork.bit](http://127.0.0.1:43110/blog.zeronetwork.bit) 40 | 41 | [Source code](https://github.com/HelloZeroNet/ZeroBlog) 42 | 43 | 44 | --- 45 | 46 | ## ZeroTalk 47 | 48 | Decentralized, P2P forum demo 49 | 50 | - Post and comment creation, modification, deletion and upvoting 51 | - Commenting and content modifications pushed directly to other peers 52 | - Only you can sign and modify your own files 53 | - Real time display of new comments 54 | 55 | How does it work? 56 | 57 | - To post and comment you have to request a certificate of registration (a cryptographic sign) from a ZeroID provider 58 | - After you have the certificate you can publish your content (messages, posts, upvotes) directly to other peers 59 | 60 | ![ZeroTalk](../img/zerotalk.png) 61 | 62 | Address: [1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT](http://127.0.0.1:43110/1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT) or [talk.zeronetwork.bit](http://127.0.0.1:43110/talk.zeronetwork.bit) 63 | 64 | [Source code](https://github.com/HelloZeroNet/ZeroTalk) 65 | 66 | --- 67 | 68 | ## ZeroMail 69 | 70 | End-to-end encrypted, distributed, P2P messaging site. To improve privacy it uses a BitMessage-like solution and will not expose the message recipient. 71 | 72 | - Using ECIES for secret exchange, AES256 for message encoding 73 | - When you first visit the site, it adds your public key to your data file. At that point anyone is able to send a message to you 74 | - Everyone tries to decrypt every message, this improves privacy by making it impossible to find the message recipient 75 | - To reduce per message overhead and increase decryption speed, we re-use the AES key, but a new IV is generated every time 76 | 77 | ![ZeroTalk](../img/zeromail.png) 78 | 79 | Address: [1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27](http://127.0.0.1:43110/1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27) or [mail.zeronetwork.bit](http://127.0.0.1:43110/mail.zeronetwork.bit) 80 | 81 | [Source code](https://github.com/HelloZeroNet/ZeroMail) 82 | 83 | --- 84 | 85 | ## ZeroMe 86 | 87 | Decentralized, Twitter-like P2P social network. 88 | 89 | - Stores user information in ZeroMe user registry 90 | - Stores posts and comments in MergerSites called Hubs 91 | - Upload images as optional files 92 | - Real time display of feed activity 93 | 94 | ![ZeroMe](../img/zerome.png) 95 | 96 | Address: [1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH](http://127.0.0.1:43110/1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH) 97 | 98 | [Source code](https://github.com/HelloZeroNet/ZeroMe) 99 | 100 | --- 101 | 102 | ## ReactionGIFs 103 | 104 | Demo for optional files, files which only download from other peers if your browser requests them. 105 | 106 | ![ReactionGIFs](../img/reactiongifs.jpg) 107 | 108 | Address: [1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h](http://127.0.0.1:43110/1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h) 109 | 110 | [Source code](https://github.com/HelloZeroNet/ReactionGIFs) 111 | 112 | --- 113 | 114 | ## ZeroChat 115 | 116 | The finished site for the tutorial of creating a server-less, SQL backed, real-time updated P2P chat application using ZeroNet in less than 100 lines of code. 117 | 118 | - Uses ZeroID certificate for authentication 119 | - Stores messages in a SQLite database 120 | - Posts messages and distribute directly to other users in real-time 121 | - Real-time update the messages as they arrive 122 | 123 | ![ZeroChat](../img/zerochat.png) 124 | 125 | Address of finished site: [1AvF5TpcaamRNtqvN1cnDEWzNmUtD47Npg](http://127.0.0.1:43110/1AvF5TpcaamRNtqvN1cnDEWzNmUtD47Npg) 126 | 127 | Tutorial on ZeroBlog: 128 | [Part1](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:43:ZeroNet+site+development+tutorial+1), 129 | [Part2](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:46:ZeroNet+site+development+tutorial+2) 130 | -------------------------------------------------------------------------------- /docs/fr/help_zeronet/coding_conventions.md: -------------------------------------------------------------------------------- 1 | # Les standards de programmation pour contribuer à ZeroNet 2 | - Suivre [PEP8](https://www.python.org/dev/peps/pep-0008/) 3 | - Simple est mieux que complexe 4 | - L'optimisation prématurée est la racine du mal 5 | 6 | ### Nommage 7 | - NomDeClasse: Capital, CamelCased 8 | - nomDeFonction: commence avec une minuscule, camelCased 9 | - nom_de_variable: en minuscule, avec un under_score 10 | 11 | ### Variables 12 | - file_path: chemin relative au répertoire de travail (data/17ib6teRqdVgjB698T4cD1zDXKgPqpkrMg/css/all.css) 13 | - inner_path: fichier relative au répertoire du site (css/all.css) 14 | - file_name: all.css 15 | - file: Objet fichier en python 16 | - privatekey: Clef privée du site (sans _) 17 | 18 | ### Fichiers sources, répertoires et nommage 19 | - Une classe par fichier de préférénce 20 | - Nom du fichier et du répertoire vient du NomDeClasse : 21 | WorkerManager class = Worker/WorkerManager.py 22 | -------------------------------------------------------------------------------- /docs/fr/help_zeronet/contributing.md: -------------------------------------------------------------------------------- 1 | # Contribuer à ZeroNet 2 | 3 | Merci à vous d'utiliser ZeroNet. ZeroNet est un effort collaborative de 67+ enthousiastes juste comme vous. Nous avons besoin d'utilisateurs qui reportent des bugs, améliorent la documentation et partagent leurs idées/expériences en dévelopement de protocole. Voici quelques informations sur comment vous pouvez contribuer au projet. 4 | 5 | 6 | ### Vous n'avez pas besoin d'écrire du code 7 | 8 | En réalité, la majorité des contributeurs ne soumettent pas de code source. Même si vous pouvez écrire en language de programmations, tout autre forme de contribution est la bienvenue. 9 | 10 | ### Est-ce que vous aimez écrire ? 11 | 12 | - Ecrivez sur ZeroNet. 13 | - Ecrivez des tutoriels pour aider les gens à commencer. 14 | - Aidez à traduire ZeroNet. 15 | - Améliorez cette documentation. Cette page a été rédigé par de nombreux membres de la communauté partout dans le monde. 16 | 17 | ### Est-ce que vous aimez aider les gens ? 18 | 19 | - Abonnez-vous à notre [issue tracker sur Github](https://github.com/HelloZeroNet/ZeroNet/issues) et aider à résoudre les problèmes. 20 | - Rejoignez-nous sur [Gitter](https://gitter.im/HelloZeroNet/ZeroNet) et notre IRC [#zeronet @ freenode](https://kiwiirc.com/client/irc.freenode.net/zeronet) et aidez à répondre aux questions. 21 | - Mettez en place une seed box et aider à rendre le réseau plus performant. 22 | 23 | ### Est-ce que vous aimez créer des sites ? 24 | 25 | - Créez un nouveau site. Essayez et créez votre propre blog sur ZeroNet. [C'est facile et ça coûte presque rien.](../using_zeronet/create_new_site.md) 26 | - “Le contenu est roi !” comme le dit NoFish. Le réseau ne sert à rien sans contenu, c'est maintenant à vous d'en faire un super réseau. 27 | 28 | ### Est-ce que vous aimez faire des recherches ? 29 | 30 | - Aidez nous à résoudre [les problèmes les plus difficiles](https://github.com/HelloZeroNet/ZeroNet/labels/help%20wanted). 31 | - Rejoignez les discussions sur comment apporter de nouvelles fonctionalitées comme [I2P](https://github.com/HelloZeroNet/ZeroNet/issues/45) et [l'ajout de DHT](https://github.com/HelloZeroNet/ZeroNet/issues/57). 32 | - Est-ce que vous détenez un [Raspberry Pi](https://github.com/HelloZeroNet/ZeroNet#linux-terminal), un [C.H.I.P.](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:94:Running+ZeroNet+on+a+$9%C2%A0computer) ou un [un router](https://github.com/HelloZeroNet/ZeroNet/issues/783)? 33 | Essayez de faire tourner ZeroNet dessus et partagez votre expérience avec les autres. 34 | 35 | ### Vous aimez programmer ? 36 | 37 | - Si vous connaissez Python, vous pouvez choisir une tâche sur [le Github du projet](https://github.com/HelloZeroNet/ZeroNet/issues). 38 | - Vous êtes aussi inviter à déveloper votre propre idée. Avant de commencer, [ouvrez une nouvelle discussion](https://github.com/HelloZeroNet/ZeroNet/issues/new) pour partager votre idée, être sure d'aller dans la bonne direction et collaborer avec d'autres membres. 39 | - Gardez votre style consistant. Pour faciliter la collaboration veillez à suivre les conventions décritent ci-dessous. 40 | 41 | ### Est-ce que vous souhaiter offrir votre soutien financier ? 42 | 43 | - Vous pouvez [donner des bitcoins](donate.md) pour supporter ZeroNet. 44 | 45 | 46 | ## Les standards de programmation 47 | 48 | - Suivre [PEP8](https://www.python.org/dev/peps/pep-0008/) 49 | - Simple est mieux que complexe 50 | - L'optimisation prématurée est la racine du mal 51 | 52 | ### Nommage 53 | - NomDeClasse: Capital, CamelCased 54 | - nomDeFonction: commence avec une minuscule, camelCased 55 | - nom_de_variable: en minuscule, avec un under_score 56 | 57 | ### Variables 58 | - file_path: chemin relative au répertoire de travail (data/17ib6teRqdVgjB698T4cD1zDXKgPqpkrMg/css/all.css) 59 | - inner_path: fichier relative au répertoire du site (css/all.css) 60 | - file_name: all.css 61 | - file: Objet fichier en python 62 | - privatekey: Clef privée du site (sans _) 63 | 64 | ### Fichiers sources, répertoires et nommage 65 | - Une classe par fichier de préférénce 66 | - Nom du fichier et du répertoire vient du NomDeClasse : 67 | WorkerManager class = Worker/WorkerManager.py 68 | -------------------------------------------------------------------------------- /docs/fr/help_zeronet/donate.md: -------------------------------------------------------------------------------- 1 | # Contribution financière 2 | 3 | 4 | ## ZeroNet 5 | 6 | 7 | * Donation général pour le dévelopment de ZeroNet 8 | 9 |
ou avec PayPal: 10 | 11 | 12 | 13 |
14 | 15 | --- 16 | 17 | 18 | ## Bitmessage intégration 19 | 20 | 21 | 22 | * Envoyer et recevoir des messages Bitmessage 23 | 24 | Avantages : 25 | 26 | * Envoyer votre requète de permission au propriétaire du site via bitmessage 27 | * Possibilité d'intégrer un webui privée pour les messages/commentaires sur les sites 28 | 29 | [Github issue](https://github.com/HelloZeroNet/ZeroNet/issues/65) 30 | 31 | 32 | 33 | --- 34 | 35 | 36 | ## Intégration Namecoin (done in version 0.2.8) 37 | 38 | * Utiliser les noms de domaines Namecoin pour accéder aux sites 39 | 40 | Avantages : 41 | 42 | * Adresses lisible et facile à retenir 43 | 44 | [Github issue](https://github.com/HelloZeroNet/ZeroNet/issues/31) 45 | 46 | 47 | --- 48 | 49 | 50 | ## DHT Intégration 51 | 52 | 53 | 54 | * Découverte de pair via DHT (comme pour BitTorrent) 55 | 56 | Avantages : 57 | 58 | * La découverte de pair ne dépendra plus du réseau torrent 59 | * Ipv6 et découverte de pair Tor 60 | 61 | [Github issue](https://github.com/HelloZeroNet/ZeroNet/issues/57) 62 | 63 | 64 | --- 65 | 66 | 67 | ## Sites privés 68 | 69 | 70 | 71 | * Site avec authorization utilisant un mot de passe ou basé sur un système de clé publique 72 | 73 | Avantages : 74 | 75 | * Contrôle sur quel pair a accès à votre site 76 | 77 | [Github issue](https://github.com/HelloZeroNet/ZeroNet/issues/62) 78 | 79 | 80 | --- 81 | 82 | 83 | ## Tor intégration (done in version 0.3.5) 84 | 85 | * Allow to seed sites and connect other peers using Tor network (Probably depends on DHT support) 86 | 87 | Benefits: 88 | 89 | * Hiding your IP when distributing new content or downloading site 90 | 91 | [Github issue](https://github.com/HelloZeroNet/ZeroNet/issues/60) 92 | 93 | 94 | 95 | --- 96 | 97 | 98 | ## Multiuser proxy support (done in version 0.2.7) 99 | 100 | * User login/logout using bip32 master seed 101 | 102 | Benefits: 103 | 104 | * Makes open ZeroNet proxies usable 105 | * Use local ZeroNet more than one user 106 | 107 | [Github issue](https://github.com/HelloZeroNet/ZeroNet/issues/58) 108 | 109 | 110 | --- 111 | 112 | 113 | ## Where does the donation go? 114 | 115 | The task's received donation goes directly to the developer(s) who successfully and properly integrates the feature (please add your plans and ideas to the issue before you start working on anything big). 116 | 117 | 118 | 119 | # Sponsors 120 | 121 | * Better OSX/Safari compatibility made possible by [BrowserStack.com](https://www.browserstack.com/) 122 | -------------------------------------------------------------------------------- /docs/fr/index.md: -------------------------------------------------------------------------------- 1 | ## Qu'est ce que ZeroNet ? 2 | 3 | ZeroNet utilise Bitcoin cryptographie et BitTorrent technologie afin de créer un **réseau décentralisé résistant à la censure**. 4 | 5 | Les utilisateurs peuvent publier des sites statiques ou dynamiques sur ZeroNet et les visiteurs peuvent choisir s'ils souhaitent ou pas distribuer le site eux-même. Les sites internet resteront en ligne tant qu'un pair sera toujours en ligne. 6 | 7 | Quand un site est mis à jour par son propriétaire, tous les noeuds distribuant ce site (précédents visiteurs) receveront seulement les mises à jour faite au contenu du site. 8 | 9 | ZeroNet est distribué avec une base de donnée SQL prête à l'utilisation. Cela rend les sites avec beaucoup de contenus facile à déveloper. La base de donnée est ensuite synchronisée avec les noeuds hôtes à chaque mise à jour incrémentale. 10 | 11 | ## Pourquoi ? 12 | 13 | * Nous croyons dans la communication ouvert, libre et non censurée. 14 | * Aucune censure: Après que quelque chose soit publié il n'y a aucun moyen de le supprimé. 15 | * Aucun point unique de défaillance: Le contenu reste en ligne même si seulement un pair le distribue. 16 | * Impossible à arréter: C'est nulle part parce que c'est partout. Le contenu est distribué par n'importe quel utilisateur qui souhaite contribuer. 17 | * Rapide: ZeroNet utilise BitTorrent technologie pour délivrer le contenu rapidement sans serveur centrale. 18 | * Fonctionne hors-ligne: Vous pourvez accéder aux sites même si votre internet n'est pas disponible. 19 | * Secure: Le contenu posté est sécurisé avec la même cryptographie utilisé par votre porte-feuille Bitcoin. 20 | 21 | [comment]: <> (I'm unsure about the following bit. Thoughts?) 22 | [comment]: <> (# What problem is ZeroNet solving?) 23 | 24 | [comment]: <> (When Tim Berners-Lee created the internet, he meant for it to be free. Not surveilled nor censored. And [he is still fighting for that](http://edition.cnn.com/2014/03/12/tech/web/tim-berners-lee-web-freedom/).) 25 | 26 | [comment]: <> (The internet is centralized mainly in two places: Content and Domain Names (URLs) are hosted and controlled by central servers. If you control the central servers (and if you are powerful enough you do) you control the network.) 27 | 28 | [comment]: <> (**Decentralized content storage**) 29 | 30 | [comment]: <> (ZeroNet tackles the content storage problem by giving everyone the ability to store content. Site visitors can choose to store a website on their computers, and when they do this they also help to serve the site to other users. The site is online even if only one user is hosting it.) 31 | 32 | [comment]: <> (**Shared DNS cache**) 33 | 34 | [comment]: <> (Site addresses on ZeroNet are cached by all network members. When you type a ZeroNet site URL on your browser this will query other peers connected to you about the site. If one of these peers happen to have the site they will send it to you, if not, they will forward your query along.) 35 | 36 | [comment]: <> (This architecture means that when a site URL is created, as long as one peer is serving it, there is no way to take the URL down.) 37 | 38 | ## Avantages 39 | 40 | * Facile, zero configuration nécessaire pour commencer. 41 | * Pas de mots de passe mais un système d'authorization base sur [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). Votre compte est protégé avec la même cryptographie utilisé dans votre portefeuille Bitcoin. 42 | * Site mis à jour en temps réel, pas besoin de refraîchir votre page. 43 | * Supporte les noms de domaine en .bit de Namecoin. 44 | * Base de donnée SQL supportée : Facilite de dévelopment de site et permet un chargement de page plus rapide. 45 | * Anonymat : Supporte Tor réseau avec .onion service caché à la place des addresses ipv4. 46 | * Connection chiffrées TLS. 47 | * Ouverture des ports via uPnP automatiquement. 48 | * Plugin pour multi-utilisateur service (openproxy). 49 | * Fonctionne avec n'import quel navigateurs/OS. 50 | 51 | ## Comment ça fonctionne ? 52 | 53 | * Après avoir installé et lancé ZeroNet, vous pouvez visiter un site en tapant l'url : 54 | `http://127.0.0.1:43110/{zeronet_site_address}` 55 | (exemple - `http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D`) 56 | * ZeroNet utilisera le réseau BitTorrent pour trouver des pairs qui partage le site et commencera à télécharger son contenu (HTML, CSS, JS...) depuis ces pairs. 57 | * Chaque site visité sera ensuite distribué depuis votre ordinateur/serveur. Ces sites peuvent effacer ou blacklister si nécessaire. 58 | * Tous les sites contiennent une liste de tous ses fichiers, chaque entrée étant assigné un hash SHA512 et une signature générée à partir de la clé privée du propriétaire du site. 59 | * Si le propriétaire du site modifie celui-ci, alors la personne signe la nouvelle liste et la publie aux pairs. Après avoir vérifié l'intégrité de la liste (utilisant la signature), ils peuvent télécharger les fichiers modifiés an publié le nouveau contenu à d'autres pairs. 60 | 61 | ##### [Slideshow about ZeroNet cryptography, content updates, multi-user sites »](https://docs.google.com/presentation/d/1_2qK1IuOKJ51pgBvllZ9Yu7Au2l551t3XBgyTSvilew/pub?start=false&loop=false&delayms=3000) 62 | 63 | ## Capture d'écrans 64 | 65 | ![Screenshot](img/zerohello.png) 66 | 67 | ![ZeroTalk](img/zerotalk.png) 68 | 69 | ##### [Plus de capture d'écrans »](/using_zeronet/sample_sites/) 70 | 71 | ## Limites 72 | 73 | * Pas de découpement des gros fichiers à la Torrent (BigFile plugin ajouté) 74 | * Transfert de fichier non compressé ou chiffré (chiffrement TLS ajouté) 75 | * Pas de sites privés 76 | 77 | ## Contribution financière 78 | 79 | Bitcoin: 1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX 80 | 81 | [Page de donation](help_zeronet/donate/) 82 | 83 | ### Merci ! 84 | 85 | * Plus d'info, aide, changelog, sites zeronet : [http://www.reddit.com/r/zeronet/](http://www.reddit.com/r/zeronet/) 86 | * Viens ! Regarde comme on est bien. Discuter avec nous : [#zeronet @ FreeNode](https://kiwiirc.com/client/irc.freenode.net/zeronet) or on [gitter](https://gitter.im/HelloZeroNet/ZeroNet) 87 | -------------------------------------------------------------------------------- /docs/fr/site_development/cert_authority.md: -------------------------------------------------------------------------------- 1 | # Autorité de certification 2 | 3 | Un compte sans mot de passe ? Un certificat pour moi ? On peut noter que le système d'identification de ZeroNet est éloigné des conventions. Dans cette section, nous allons parler de comment les comptes utilisateurs et les autorités de certification fonctionnent dans ZeroNet. 4 | 5 | ## Qu'est ce qu'une autorité de certification fait ? 6 | 7 | Dans ZeroNet, tout est signé avec des clefs Bitcoin. Un certificat offre un nom lisible et unique pour une adresse Bitcoin. Une autorité de certification (ou un ) 8 | 9 | ## Format du certificat 10 | 11 | ### Corps 12 | 13 | Le corps d'un certificat contiens une adresse Bitcoin, un type de portail, et un nom d'utilisateur humainement lisible. 14 | 15 | ``` 16 | [BitcoinAddress]#[PortalType]/[UserName] 17 | ``` 18 | 19 | **Exemple:** 20 | 21 | ``` 22 | 1H28iygiKXe3GUMcD77HiifVqtf3858Aft#web/hellozeronet 23 | ``` 24 | 25 | - Adresse Bitcoin: `1H28iygiKXe3GUMcD77HiifVqtf3858Aft` 26 | - Type de portail: `web` 27 | - Nom d'utilisateur: `hellozeronet` 28 | 29 | **Règles générales:** 30 | 31 | L'adresse Bitcoin, le type de portail et le nom d'utilisateur **ne doit pas** contenir les caractères `#`, `@` ou `/`. 32 | 33 | Seul les chiffres de 0-9 et les lettres a-z sont autorisés dans le nom d'utilisateur. Toute les lettre anglaises dans le nom d'utilisateur **doivent** être en minuscule. Les caractères non autorisés **ne doivent pas** être utilisé dans le nom d'utilisateur. Un nom d'utilisateur **ne devrait pas** être trop long. Un nom d'utilisateur **devrait** être lisible et **ne devrait pas** intéreférer avec le rendu de l'interface. 34 | 35 | Un nom d'utilisateur **doit** être unique. 36 | 37 | ### Signature 38 | 39 | Un algorithm de signature de certificat utilise une clef secrète et génère une signature Bitcoin déterministique pour le corps. 40 | 41 | **Code source :** 42 | 43 | ```python 44 | sign = os.popen("python zeronet.py --debug cryptSign %s#bitmsg/%s %s 2>&1" % (auth_address, user_name, config.site_privatekey)).readlines()[-1].strip() 45 | ``` 46 | 47 | ### Certificat 48 | 49 | En regardant le code source de ZeroID, on note comment le certificat est stocké dans la base de donnée. 50 | 51 | ```python 52 | data["users"][user_name] = "bitmsg,%s,%s" % (auth_address, sign) 53 | ``` 54 | 55 | **Exemple:** 56 | 57 | ``` 58 | "hellozeronet": "web,1H28iygiKXe3GUMcD77HiifVqtf3858Aft,HA2A+iKekECD3hasrsN8IrR86BnXQ63kPH+9A85JLO9hLUpRJTBn62UfnuuF92B9CIc6+EewAIqzIn9UoVq2LPA=" 59 | ``` 60 | 61 | Un certficat peut être stocké sous de multiple formats. Cependant, tout les formats doivent inclure : 62 | 63 | - L'adresse Bitcoin : `1H28iygiKXe3GUMcD77HiifVqtf3858Aft` 64 | - Le type de portail : `web` 65 | - Le nomo d'utilisateur : `hellozeronet` 66 | - La signature de l'autorité: `HA2A+iKekECD3hasrsN8IrR86BnXQ63kPH+9A85JLO9hLUpRJTBn62UfnuuF92B9CIc6+EewAIqzIn9UoVq2LPA=` 67 | 68 | ## Utilisation dans `content.json` 69 | 70 | Les propriétaires des sites peuvent choisir quel autorité de certificat utilisé. 71 | 72 | Le Blue Hub, par exemple, accepte les certificats signés par ZeroId. La règle est définis dans son `data/users/content.json` 73 | 74 | - L'émetteur d'ID a un nom lisible : `zeroid.bit` 75 | - La clef publiaue de l'émetteur d'ID est : `1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz` 76 | 77 | ```json 78 | "user_contents": { 79 | "cert_signers": { 80 | "zeroid.bit": [ 81 | "1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz" 82 | ] 83 | } 84 | } 85 | ``` 86 | 87 | Chaque utilisateur présente son certificat dans le fichier manifest de répertoire utilisateur (nommé après son adresse Bitcoin). Par exemple, `data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json` dit : 88 | 89 | ```json 90 | { 91 | "address": "1BLueGvui1GdbtsjcKqCf4F67uKfritG49", 92 | "cert_auth_type": "web", 93 | "cert_sign": "HPiZsWEJ5eLnspUj8nQ75WXbSanLz0YhQf5KJDq+4bWe6wNW98Vv9PXNyPDNu2VX4bCEXhRC65pS3CM7cOrjjik=", 94 | "cert_user_id": "nofish@zeroid.bit", 95 | "files": { 96 | "data.json": { 97 | "sha512": "8e597412a2bc2726ac9a1ee85428fb3a94b09f4e7a3f5f589119973231417b15", 98 | "size": 21422 99 | } 100 | }, 101 | "inner_path": "data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json", 102 | "modified": 1492458379, 103 | "signs": { 104 | "1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj": "G8kaZIGAstsiWLVY20e2ogJQi4OO+QuwqJ9GTj3gz7YleST/jst7RQH7hDn0uf8BJMBjFs35H3LPhNHHj4jueh8=" 105 | } 106 | } 107 | ``` 108 | 109 | Site : 110 | 111 | - Url du site requis: `"address": "1BLueGvui1GdbtsjcKqCf4F67uKfritG49"` 112 | - Chemin du fichier requis: `"inner_path": "data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json"` 113 | 114 | Information certificat : 115 | 116 | - Fournisseur d'ID: `zeroid.bit` 117 | - Nom d'utilisateur: `nofish` 118 | - Adresse Bitcoin de l'utilisateur: `1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj` 119 | - Type de portail: `web` 120 | - Signature du fournisseur d'ID: `HPiZsWEJ5eLnspUj8nQ75WXbSanLz0YhQf5KJDq+4bWe6wNW98Vv9PXNyPDNu2VX4bCEXhRC65pS3CM7cOrjjik=` 121 | 122 | ### La procédure de vérification 123 | 124 | 1. L'algorithme qui vérifie la signature lit le contenu du fichier `data/users/content.json` pour déterminer les spécifités pour le contenus utilisateur. 125 | 126 | 2. L'algorithme lit ensuite `data/users/content.json` pour rechercher la clef publique du fournisseur de l'ID. 127 | 128 | 3. Avec une adresse Bitcoin d'utilisateur, un type de portail et un nom d'utilisateur, l'algorithme reconstruit le corps du certificat. 129 | 130 | 4. L'algorithme vérifie la signature du fournisseur d'ID, avec la clef publique définit dans `data/users/content.json`, pour s'assurer de l'authenticité du corps du certificat. 131 | 132 | 5. L'algorithme utilise la clef publique de l'utilisateur pour vérifier l'authencité du contenu de l'utilisateur. 133 | 134 | ## Avantages et limites des autorités de certifications 135 | 136 | - Une autorité de certification fournit un nom humainement lisible pour la clef publique d'un utilisateur. Cela aide aussi à diminuer les spams et le contenu non-solicité. 137 | 138 | - Un utilisateur ne doit pas divilguer des informations secrètes comme un mot de passe (système actuel). De plus, l'utilisateur doit seulement s'authentifier une fois. 139 | 140 | - Une autorité de certificaion n'a pas à être approuvé par aucun développeur ZeroNet. Un propriétaire de site peut chosir quelle autorité il/elle souhaite utiliser pour son site afin d'améliorer la qualité de son service pour l'utilisateur. 141 | 142 | - Une autorité de certification est responsable de la maintenance de son groupe d'utilisateur. 143 | 144 | - ZeroID ne supprime pas et ne renouvelle pas les certifcats lui-même. 145 | 146 | ## Est-ce que je peux utiliser ZeroNet sans un certificat ? 147 | 148 | Généralement, un certificat est demandé lorsque vous souhaitez poster du contenu sur le site de quelqu'un d'autre. Vous n'avez pas besoin de certificat lorsque vous mettez à jour le contenu de votre propre site. 149 | -------------------------------------------------------------------------------- /docs/fr/site_development/dbschema_json.md: -------------------------------------------------------------------------------- 1 | # Structure du fichier dbschema.json 2 | 3 | [Exemple de fichier dbschema.json](https://github.com/HelloZeroNet/ZeroTalk/blob/master/dbschema.json) 4 | 5 | Le code ci-dessous éxécutera les actions suivantes : 6 | 7 | - Si un fichier data/users/*/data.json est reçu (eg.: un utilisateur a posté quelque chose): 8 | - Toute les lignes dans `data["topics"]` seront ajoutées dans la table `topic` 9 | - Tous les noeuds in `data["comment_votes"]` seront ajoutés dans la table `comment_vote` comme la colonne `comment_hash` et les valeurs stockés dans la même ligne que `vote` 10 | - Si une mise à jour du fichier data/users/content.json est reçu (eg.: un nouvel utilisateur): 11 | - Les valeurs `"user_id", "user_name", "max_size", "added"` dans le noeud `content["include"]` seront ajoutées dans la table `user` et la clé est ajouté à `path` 12 | 13 | > Note: [Quelques restrictions](content_json/#regular-expressions-limitations) s'appliquent pour éviter de potentiel vulnérabilité ReDoS. 14 | 15 | ```json 16 | 17 | { 18 | "db_name": "ZeroTalk", # Nom de la base de donnée (utiliser seulement pour debugger) 19 | "db_file": "data/users/zerotalk.db", # Le chemin relative du fichier de la base de donnée dans le répertoire du site 20 | "version": 2, # 1 = la table possède des colonnes qui inclut des répertoires et nom de fichier 21 | # 2 = la table a des répertoires séparés et des colonnes file_name 22 | # 3 = Pareil que version 2, mais possède aussi des colones sites (pour la fonction MergerSite) 23 | "maps": { # Relation json à base de donnée 24 | ".*/data.json": { # Regex (expression réguilière) du fichier 25 | "to_table": [ # Enregistré les valeurs à la table 26 | { 27 | "node": "topics", # Lecture de data.json[topics] key value 28 | "table": "topic" # Enregistre dans la table topic 29 | }, 30 | { 31 | "node": "comment_votes", # Lecture data.json[comment_votes] key value 32 | "table": "comment_vote", # Enregistre data dans la table comment_vote 33 | "key_col": "comment_hash", 34 | # data.json[comment_votes] est une 'dict' dont les clés de la 35 | # 'dict' seront enregistrés dans la table comment_vote dans la colonne comment_hash 36 | 37 | "val_col": "vote" 38 | # Les valeurs de la 'dict' data.json[comment_votes] seront enregistrés dans la colonne vote de la table comment_vote 39 | 40 | } 41 | ], 42 | "to_keyvalue": ["next_message_id", "next_topic_id"] 43 | # Enregistre data.json[next_topic_id] dans la table keyvalue 44 | # (key: next_message_id, value: data.json[next_message_id] value) 45 | 46 | }, 47 | "content.json": { 48 | "to_table": [ 49 | { 50 | "node": "includes", 51 | "table": "user", 52 | "key_col": "path", 53 | "import_cols": ["user_id", "user_name", "max_size", "added"], 54 | # Importe seulement ces colonnes 55 | "replaces": { 56 | "path": {"content.json": "data.json"} 57 | # remplace content.json par data.json dans la valeur de la colonne 'path' (nécessaire pour les jointures) 58 | } 59 | } 60 | ], 61 | "to_json_table": [ "cert_auth_type", "cert_user_id" ] # Sauvegarde cert_auth_type et cert_user_id directement dans la table json (plus facile et rapide pour le query des données) 62 | } 63 | }, 64 | "tables": { # Definition des tables 65 | "topic": { # Définit la structure de la table topic 66 | "cols": [ # Colonnes de la table 67 | ["topic_id", "INTEGER"], 68 | ["title", "TEXT"], 69 | ["body", "TEXT"], 70 | ["type", "TEXT"], 71 | ["parent_topic_hash", "TEXT"], 72 | ["added", "DATETIME"], 73 | ["json_id", "INTEGER REFERENCES json (json_id)"] 74 | ], 75 | "indexes": ["CREATE UNIQUE INDEX topic_key ON topic(topic_id, json_id)"], 76 | # Indexes créés automatiquement 77 | 78 | "schema_changed": 1426195822 79 | # Timestamp de la dernière modification, si le client a une version différente, 80 | # détruit automatiquement la version actuelle, créé une nouvelle et re-engistre des données 81 | 82 | }, 83 | "comment_vote": { 84 | "cols": [ 85 | ["comment_hash", "TEXT"], 86 | ["vote", "INTEGER"], 87 | ["json_id", "INTEGER REFERENCES json (json_id)"] 88 | ], 89 | "indexes": ["CREATE UNIQUE INDEX comment_vote_key ON comment_vote(comment_hash, json_id)", "CREATE INDEX comment_vote_hash ON comment_vote(comment_hash)"], 90 | "schema_changed": 1426195826 91 | }, 92 | "user": { 93 | "cols": [ 94 | ["user_id", "INTEGER"], 95 | ["user_name", "TEXT"], 96 | ["max_size", "INTEGER"], 97 | ["path", "TEXT"], 98 | ["added", "INTEGER"], 99 | ["json_id", "INTEGER REFERENCES json (json_id)"] 100 | ], 101 | "indexes": ["CREATE UNIQUE INDEX user_id ON user(user_id)", "CREATE UNIQUE INDEX user_path ON user(path)"], 102 | "schema_changed": 1426195825 103 | }, 104 | "json": { # Json table format only required if you have specified to_json_table pattern anywhere 105 | "cols": [ 106 | ["json_id", "INTEGER PRIMARY KEY AUTOINCREMENT"], 107 | ["directory", "TEXT"], 108 | ["file_name", "TEXT"], 109 | ["cert_auth_type", "TEXT"], 110 | ["cert_user_id", "TEXT"] 111 | ], 112 | "indexes": ["CREATE UNIQUE INDEX path ON json(directory, site, file_name)"], 113 | "schema_changed": 4 114 | } 115 | } 116 | } 117 | ``` 118 | 119 | ## Exemple de fichier data.json 120 | ```json 121 | { 122 | "next_topic_id": 2, 123 | "topics": [ 124 | { 125 | "topic_id": 1, 126 | "title": "Newtopic", 127 | "body": "Topic!", 128 | "added": 1426628540, 129 | "parent_topic_hash": "5@2" 130 | } 131 | ], 132 | "next_message_id": 19, 133 | "comments": { 134 | "1@2": [ 135 | { 136 | "comment_id": 1, 137 | "body": "New user test!", 138 | "added": 1423442049 139 | } 140 | ], 141 | "1@13": [ 142 | { 143 | "comment_id": 2, 144 | "body": "hello", 145 | "added": 1424653288 146 | }, 147 | { 148 | "comment_id": 13, 149 | "body": "test 123", 150 | "added": 1426463715 151 | } 152 | ] 153 | }, 154 | "topic_votes": { 155 | "1@2": 1, 156 | "4@2": 1, 157 | "2@2": 1, 158 | "1@5": 1, 159 | "1@6": 1, 160 | "3@2": 1, 161 | "1@13": 1, 162 | "4@5": 1 163 | }, 164 | "comment_votes": { 165 | "5@5": 1, 166 | "2@12": 1, 167 | "1@12": 1, 168 | "33@2": 1, 169 | "45@2": 1, 170 | "12@5": 1, 171 | "34@2": 1, 172 | "46@2": 1 173 | } 174 | } 175 | ``` 176 | 177 | ## Exemple de fichier content.json 178 | 179 | ```json 180 | { 181 | "files": {}, 182 | "ignore": ".*/.*", 183 | "includes": { 184 | "13v1FwKcq7dx2UPruFcRcqd8s7VBjvoWJW/content.json": { 185 | "added": 1426683897, 186 | "files_allowed": "data.json", 187 | "includes_allowed": false, 188 | "max_size": 10000, 189 | "signers": [ 190 | "13v1FwKcq7dx2UPruFcRcqd8s7VBjvoWJW" 191 | ], 192 | "signers_required": 1, 193 | "user_id": 15, 194 | "user_name": "meginthelloka" 195 | }, 196 | "15WGMVViswrF13sAKb7je6oX3UhXavBxxQ/content.json": { 197 | "added": 1426687209, 198 | "files_allowed": "data.json", 199 | "includes_allowed": false, 200 | "max_size": 10000, 201 | "signers": [ 202 | "15WGMVViswrF13sAKb7je6oX3UhXavBxxQ" 203 | ], 204 | "signers_required": 1, 205 | "user_id": 18, 206 | "user_name": "habla" 207 | } 208 | } 209 | } 210 | ``` 211 | -------------------------------------------------------------------------------- /docs/fr/site_development/getting_started.md: -------------------------------------------------------------------------------- 1 | # Commencer 2 | 3 | ZeroNet permet de publier des sites statiques mais aussi dynamique. 4 | 5 | Avec ZeroNet, il n'y a aucun concept de serveur. Nous n'avons donc pas besoin de language comme PHP ou Ruby. Il est par contre possible de créer du contenus dynamique en utilisant l'API ZeroNet (appellé ZeroFrame), JavaScript (ou CoffeeScript) et la base de donée SQL fournit à chaque site. 6 | 7 | ## Tutoriels 8 | 9 | ### ZeroChat tutoriel 10 | 11 | Dans ce tutoriel, nous allons créer un site de chat en P2P, décentralizé, sans serveur en moins de 100 lignes de codes. 12 | 13 | * [Lire l'article sur ZeroBlog (en)](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:99:ZeroChat+tutorial) 14 | * [Lire l'article sur Medium.com (en)](https://decentralize.today/decentralized-p2p-chat-in-100-lines-of-code-d6e496034cd4) 15 | 16 | ## Information utile 17 | 18 | ### ZeroNet Debug mode 19 | 20 | ZeroNet vient avec un flag `--debug` qui rend le développement de site plus facile. 21 | 22 | Pour lancer ZeroNet en mode debug, utilisé : `python zeronet.py --debug` 23 | 24 | Si vous utilisez une version compilé/bundle de ZeroNet : 25 | 26 | * On Windows: `lib\ZeroNet.cmd --debug` 27 | * On Linux: `./ZeroNet.sh --debug` 28 | * On Mac: `./ZeroNet.app/Contents/MacOS/ZeroNet --debug` 29 | 30 | #### Les fonctions en debug mode : 31 | 32 | - Automatique [CoffeeScript](http://coffeescript.org/) -> JavaScript conversion (si un compiler coffeescript est disponible) 33 | - Les messages de debug apparaîtront dans la console 34 | - Reload automatique des fichiers sources (UiRequest, UiWebsocket, FileRequest) si modifiés pour ne pas avoir à redémarrer (Nécessite [PyFilesystem](http://pyfilesystem.org/) sur GNU/Linux) 35 | - `http://127.0.0.1:43110/Debug` Python debugger (utilise le debugger Werkzeug - Nécessite [Werkzeug](http://werkzeug.pocoo.org/)) 36 | - `http://127.0.0.1:43110/Console` Console Python interactive (Nécessite [Werkzeug](http://werkzeug.pocoo.org/)) 37 | 38 | ### CoffeeScript sites 39 | 40 | Pour faciliter le développement de site en CoffeeScript, assurez vous d'avoir lancer ZeroNet en debug mode. Ce mode activera la conversion automatique de CoffeeScript -> JavaScript comme décrit dans [Debug](#zeronet-debug-mode). Il est important aussi que votre site soit marqué comme le votre. Pour cela, assurez vous que dans la bar de menu vertical du site "This is my site" soit coché. 41 | 42 | 43 | ZeroNet va compiler tous les fichiers CoffeeScript qu'il va trouver en un seul fichier nommé `all.js`, et le placer dans le répertoire `js/` au plus haut niveau de votre site. Ce fichier va aussi inclure tout le code JavaScript. Vous pouvez ensuite l'importer dans votre HTML à l'intérieur du tag ``: 44 | 45 | ```html 46 | 47 | ``` 48 | 49 | 50 | !!! info "Note" 51 | 52 | `{lang}` est une *variable*, et il sera automatiquement remplacé par la valeur approprié par ZeroNet lorsque le site charge. 53 | 54 | ### Désactiver le cache HTTP 55 | 56 | Additionnellement, lorsque l'on est en Debug Mode, le cache de votre navigateur doit être désactivé, ce qui est un indispensable lorsque vous souhaitez développer un site ZeroNet. Les navigateurs modernes tentent de cacher le contenus du site web lorsqu'ils le peuvent. Comme tout les sites ZeroNet sont chargés dans un iframe, le navigateur bien souvent ne peut détecter que le contenus a été modifié et ne va donc pas chercher les nouveaux changements si le caching est activé. 57 | 58 | Pour désactiver le caching, ouvrez votre navigateur "devtool", dans le menu de configuration de celui-ci veillez coché 'Disable HTTP Cache (when toolbox is open)'. Comme suggérer par l'option veuillez à garder le "devtool" ouvert pour que la désactivation du cache fonctionne lorsque le vous tester votre site. 59 | 60 | ### Extra fonctionalités (fonctionne seulement si le site vous appartient) 61 | 62 | - Fichiers CSS mergés: Tous les fichiers CSS à l'intérieur du répertoire du site seront mergés en un seul fichier nommé `all.css`. Vous pouvez choisir d'inclure seulement ce fichier dans votre site. Si vous souhaitez garder les fichiers CSS sans les publiier, il est possible de les ajouter dans la section `ignore` dans votre `content.json`. Cela facilite le développement. (example : `"ignore": "(js|css)/(?!all.(js|css))"` cela va ignorer tous les fichiers CSS et JS sauf `all.js` et `all.css`) 63 | - Fichiers JS mergés : Tous les fichiers JS contenu dans un répertoire pour un site sera mergé en un seul fichier appelé `all.js`. Si un compilateur CoffeeScript est présent (c'est le cas avec windows) il convertira les fichier `.coffee` to `.js`. 64 | - Ordre dans lequel les fichiers sont mergés dans all.css/all.js: Fichiers à l'intérieur des sous-répertoires du répertoire css/js sont mergés en premier; puis osnt ajoutés les fichiers du répertoire css/js par ordre alphanumérique (01_a.css, 02_a.css, etc) 65 | 66 | 67 | ## Besoin d'aide 68 | 69 | ZeroNet a une communauté grandissante de dévelopeurs qui sont présents dans différents espaces. Si vous avez besoin d'aide, de conseils ou souhaiter juste discuter, venez nous rejoindre sur l'un de ces services : 70 | 71 | ### Forums 72 | 73 | * [ZeroExchange](http://127.0.0.1:43110/zeroexchange.bit/), un clone p2p de StackOverflow 74 | * [ZeroTalk](http://127.0.0.1:43110/Talk.ZeroNetwork.bit/), un p2p forum similaire à Reddit 75 | 76 | ### Chat 77 | 78 | * [#zeronet-dev:matrix.org](https://riot.im/app/#/room/#zeronet-dev:matrix.org) sur Matrix 79 | * via IRC #zeronet sur freenode 80 | -------------------------------------------------------------------------------- /docs/fr/translation.md: -------------------------------------------------------------------------------- 1 | # Traduction documentation 2 | 3 | Ici les instructions pour aider à la traduction. 4 | -------------------------------------------------------------------------------- /docs/fr/using_zeronet/create_new_site.md: -------------------------------------------------------------------------------- 1 | # Create new ZeroNet site 2 | 3 | ## Easy way: Using the web interface 4 | 5 | * Click on **⋮** > **"Create new, empty site"** menu item on the site [ZeroHello](http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D). 6 | * You will be **redirected** to a completely new site that is only modifiable by you! 7 | * You can find and modify your site's content in **data/[yoursiteaddress]** directory 8 | * After the modifications open your site, drag the topright "0" button to left, then press **sign** and **publish** buttons on the bottom 9 | 10 | ## Manual way: Using the command line 11 | 12 | ### 1. Create site structure 13 | 14 | * Shut down ZeroNet if it is running 15 | * Browse to the folder where ZeroNet is installed and run: 16 | 17 | ```bash 18 | $ zeronet.py siteCreate 19 | ... 20 | - Site private key: 23DKQpzxhbVBrAtvLEc2uvk7DZweh4qL3fn3jpM3LgHDczMK2TtYUq 21 | - Site address: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 22 | ... 23 | - Site created! 24 | $ zeronet.py 25 | ... 26 | ``` 27 | 28 | - This will create the initial files for your site inside ```data/13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2```. 29 | 30 | > __Note:__ 31 | > Windows users using the bundle version must browse into the ZeroBundle/ZeroNet folder and run `"../Python/python.exe" zeronet.py siteCreate` 32 | 33 | ### 2. Build/Modify site 34 | 35 | * Update the site files located in ```data/[your site address key]``` (eg: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2). 36 | * When your site is ready run: 37 | 38 | ```bash 39 | $ zeronet.py siteSign 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 40 | - Signing site: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2... 41 | Private key (input hidden): 42 | ``` 43 | 44 | * Enter the private key you got when you created the site. This will sign all files so peers can verify that the site owner is who made the changes. 45 | 46 | ### 3. Publish site changes 47 | 48 | * In order to inform peers about the changes you made you need to run: 49 | 50 | ```bash 51 | $ zeronet.py sitePublish 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 52 | ... 53 | Site:13DNDk..bhC2 Publishing to 3/10 peers... 54 | Site:13DNDk..bhC2 Successfuly published to 3 peers 55 | - Serving files.... 56 | ``` 57 | 58 | * That's it! You've successfully signed and published your modifications. 59 | * Your site will be accessible from: ```http://localhost:43110/13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2``` 60 | 61 | 62 | **Next steps:** [ZeroNet Developer Documentation](../../site_development/getting_started/) 63 | -------------------------------------------------------------------------------- /docs/fr/using_zeronet/installing.md: -------------------------------------------------------------------------------- 1 | # Installing ZeroNet 2 | 3 | * Download ZeroBundle package: [Microsoft Windows](https://github.com/HelloZeroNet/ZeroNet-win/archive/dist/ZeroNet-win.zip), [Apple macOS](https://github.com/HelloZeroNet/ZeroNet-mac/archive/dist/ZeroNet-mac.zip), [Linux 64bit](https://github.com/HelloZeroNet/ZeroBundle/raw/master/dist/ZeroBundle-linux64.tar.gz), [Linux 32bit](https://github.com/HelloZeroNet/ZeroBundle/raw/master/dist/ZeroBundle-linux32.tar.gz) 4 | * Unpack anywhere 5 | * Run `ZeroNet.exe` (win), `ZeroNet(.app)` (macOS), `ZeroNet.sh` (linux) 6 | 7 | ### Manual install for Debian Linux 8 | 9 | * `sudo apt-get update` 10 | * `sudo apt-get install msgpack-python python-gevent` 11 | * `wget https://github.com/HelloZeroNet/ZeroNet/archive/master.tar.gz` 12 | * `tar xvpfz master.tar.gz` 13 | * `cd ZeroNet-master` 14 | * Start with `python zeronet.py` 15 | * Open http://127.0.0.1:43110/ in your browser 16 | 17 | ### [Vagrant](https://www.vagrantup.com/) 18 | 19 | * `vagrant up` 20 | * Access VM with `vagrant ssh` 21 | * `cd /vagrant` 22 | * Run `python zeronet.py --ui_ip 0.0.0.0` 23 | * Open http://127.0.0.1:43110/ in your browser 24 | 25 | ### [Docker](https://www.docker.com/) 26 | * `docker run -d -v :/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 nofish/zeronet` 27 | * This Docker image includes the Tor proxy, which is disabled by default. Beware that some 28 | hosting providers may not allow you running Tor in their servers. If you want to enable it, 29 | set `ENABLE_TOR` environment variable to `true` (Default: `false`). E.g.: 30 | 31 | `docker run -d -e "ENABLE_TOR=true" -v :/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 nofish/zeronet` 32 | * Open http://127.0.0.1:43110/ in your browser 33 | 34 | ### [Virtualenv](https://virtualenv.readthedocs.org/en/latest/) 35 | 36 | * `virtualenv env` 37 | * `source env/bin/activate` 38 | * `pip install msgpack-python gevent` 39 | * `python zeronet.py` 40 | * Open http://127.0.0.1:43110/ in your browser 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/fr/using_zeronet/sample_sites.md: -------------------------------------------------------------------------------- 1 | # Sample ZeroNet sites 2 | 3 | ## ZeroHello 4 | 5 | The homepage of ZeroNet 6 | 7 | - Lists all added sites: Title, Peer number, Modification date, etc. 8 | - Site actions: Update, Pause, Resume, Delete, Check Files and Save as .zip 9 | - Clone sites to have your own blog / forum 10 | - ZeroNet Statistics 11 | - If an update is available, ZeroNet can be updated with one click 12 | 13 | ![ZeroHello](../img/zerohello.png) 14 | 15 | Address: [1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D](http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D) 16 | 17 | [Source code](https://github.com/HelloZeroNet/ZeroHello) 18 | 19 | --- 20 | 21 | ## ZeroBlog 22 | 23 | Self publishing blog demo 24 | 25 | - Inline content editor 26 | - Markdown syntax 27 | - Code syntax highlighting 28 | - Site signing & publishing through the web interface 29 | 30 | How does it work? 31 | 32 | - `data.json` contained within site files contain blog posts and comments. Each user has their own. 33 | - Upon pressing `Sign & Publish new content`, the blogger is asked for the site private key (displayed when [creating a new site using zeronet.py siteCreate command](create_new_site/)) 34 | - Your ZeroNet client signs the new/modified files and publishes directly to other peers 35 | - The site will then be accessible until to other peers to view 36 | 37 | ![ZeroBlog](../img/zeroblog.png) 38 | 39 | Address: [1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8](http://127.0.0.1:43110/1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8) or [blog.zeronetwork.bit](http://127.0.0.1:43110/blog.zeronetwork.bit) 40 | 41 | [Source code](https://github.com/HelloZeroNet/ZeroBlog) 42 | 43 | 44 | --- 45 | 46 | ## ZeroTalk 47 | 48 | Decentralized, P2P forum demo 49 | 50 | - Post and comment creation, modification, deletion and upvoting 51 | - Commenting and content modifications pushed directly to other peers 52 | - Only you can sign and modify your own files 53 | - Real time display of new comments 54 | 55 | How does it work? 56 | 57 | - To post and comment you have to request a certificate of registration (a cryptographic sign) from a ZeroID provider 58 | - After you have the certificate you can publish your content (messages, posts, upvotes) directly to other peers 59 | 60 | ![ZeroTalk](../img/zerotalk.png) 61 | 62 | Address: [1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT](http://127.0.0.1:43110/1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT) or [talk.zeronetwork.bit](http://127.0.0.1:43110/talk.zeronetwork.bit) 63 | 64 | [Source code](https://github.com/HelloZeroNet/ZeroTalk) 65 | 66 | --- 67 | 68 | ## ZeroMail 69 | 70 | End-to-end encrypted, distributed, P2P messaging site. To improve privacy it uses a BitMessage-like solution and will not expose the message recipient. 71 | 72 | - Using ECIES for secret exchange, AES256 for message encoding 73 | - When you first visit the site, it adds your public key to your data file. At that point anyone is able to send a message to you 74 | - Everyone tries to decrypt every message, this improves privacy by making it impossible to find the message recipient 75 | - To reduce per message overhead and increase decryption speed, we re-use the AES key, but a new IV is generated every time 76 | 77 | ![ZeroTalk](../img/zeromail.png) 78 | 79 | Address: [1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27](http://127.0.0.1:43110/1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27) or [mail.zeronetwork.bit](http://127.0.0.1:43110/mail.zeronetwork.bit) 80 | 81 | [Source code](https://github.com/HelloZeroNet/ZeroMail) 82 | 83 | --- 84 | 85 | ## ZeroMe 86 | 87 | Decentralized, Twitter-like P2P social network. 88 | 89 | - Stores user information in ZeroMe user registry 90 | - Stores posts and comments in MergerSites called Hubs 91 | - Upload images as optional files 92 | - Real time display of feed activity 93 | 94 | ![ZeroMe](../img/zerome.png) 95 | 96 | Address: [1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH](http://127.0.0.1:43110/1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH) 97 | 98 | [Source code](https://github.com/HelloZeroNet/ZeroMe) 99 | 100 | --- 101 | 102 | ## ReactionGIFs 103 | 104 | Demo for optional files, files which only download from other peers if your browser requests them. 105 | 106 | ![ReactionGIFs](../img/reactiongifs.jpg) 107 | 108 | Address: [1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h](http://127.0.0.1:43110/1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h) 109 | 110 | [Source code](https://github.com/HelloZeroNet/ReactionGIFs) 111 | 112 | --- 113 | 114 | ## ZeroChat 115 | 116 | The finished site for the tutorial of creating a server-less, SQL backed, real-time updated P2P chat application using ZeroNet in less than 100 lines of code. 117 | 118 | - Uses ZeroID certificate for authentication 119 | - Stores messages in a SQLite database 120 | - Posts messages and distribute directly to other users in real-time 121 | - Real-time update the messages as they arrive 122 | 123 | ![ZeroChat](../img/zerochat.png) 124 | 125 | Address of finished site: [1AvF5TpcaamRNtqvN1cnDEWzNmUtD47Npg](http://127.0.0.1:43110/1AvF5TpcaamRNtqvN1cnDEWzNmUtD47Npg) 126 | 127 | Tutorial on ZeroBlog: 128 | [Part1](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:43:ZeroNet+site+development+tutorial+1), 129 | [Part2](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:46:ZeroNet+site+development+tutorial+2) 130 | -------------------------------------------------------------------------------- /docs/it/help_zeronet/coding_conventions.md: -------------------------------------------------------------------------------- 1 | # Standard di programmazione per collaborare a ZeroNet 2 | - Seguire [PEP8](https://www.python.org/dev/peps/pep-0008/) 3 | - Semplice è meglio che complesso 4 | - L'ottimizzazione prematura è la strada verso la perdizione 5 | 6 | ### Nomenclatura 7 | - NomiDelleClassi: iniziali delle parole maiuscole (CamelCased) 8 | - nomiDelleFunzioni: iniziale minuscola, le altre parole con inziale maiuscola (camelCased) 9 | - nomi_delle_variabili: minuscolo con parole separate da underscore (under_scored o snaked_name) 10 | 11 | ### Variabili 12 | - percorso_file: percorso dei file relativo alla cartella di lavoro (data/17ib6teRqdVgjB698T4cD1zDXKgPqpkrMg/css/all.css) 13 | - percorsi_interni: percorsi relativi alle cartelle del sito (css/all.css) 14 | - nomi_file: all.css 15 | - file: oggetti Python 16 | - privatekey: chiave privata per il sito (senza _) 17 | 18 | ### Cartelle file sorgenti e nomenclatura 19 | - É preferibile un file per classe 20 | - I nomi dei file sorgenti e delle cartelle derivano dal NomeClasse: WorkerManager class = Worker/WorkerManager.py 21 | -------------------------------------------------------------------------------- /docs/it/help_zeronet/contributing.md: -------------------------------------------------------------------------------- 1 | # Contribuire a ZeroNet 2 | 3 | Grazie di utilizzare ZeroNet. ZeroNet è un impegno collaborativo di più di 67 entusiasti decentralizzati come te. Apprezziamo tutti gli utenti che trovano errori, migliorano la documentazione e hanno buone idee per progettare nuovi protocolli. Qui ci sono alcune linee guida che chiediamo di seguire per iniziare a contribuire. 4 | 5 | ### Non serve contribuire con il codice sorgente 6 | 7 | In fatti, la maggior parte dei contributori non invia codice. Anche se ti piace scrivere codice sono apprezzati altri tipi di contribuzione. 8 | 9 | ### Ti piace scrivere? 10 | 11 | - Racconta ZeroNet. 12 | - Scrivi tutorial per aiutare le persone ad impostare le cose. 13 | - Aiuta a tradurre ZeroNet. 14 | - Migliora la documentazione. Questa documentazione è composta da diversi membri della comunità provenienti da tutto il mondo. 15 | 16 | ### Ti piace aiutare le persone? 17 | 18 | - Iscriviti sul nostro [gestore di argomenti su GitHub](https://github.com/HelloZeroNet/ZeroNet/issues) e aiuta le persone a risolvere i problemi. 19 | - Unisciti a noi su [Gitter](https://gitter.im/HelloZeroNet/ZeroNet) e canale IRC [#zeronet @ freenode](https://kiwiirc.com/client/irc.freenode.net/zeronet) e aiuta a risposndere ai quesiti. 20 | - Attiva una condivisione e aiuta a mantenere veloce la rete. 21 | 22 | ### Ti piace realizzare siti Web? 23 | 24 | - Crea nuovi siti ZeroNet. Crea il tuo blog su ZeroNet. [É semplice e costa poco.](../using_zeronet/create_new_site.md) 25 | - “Il contenuto è re!” come dice NoFish. La rete non vale nulla senza contnuti, quindi ci servi TU per avere successo. 26 | 27 | ### Ti piace la ricerca? 28 | 29 | - Aiutaci ad investigare i nostri [problemi difficili](https://github.com/HelloZeroNet/ZeroNet/labels/help%20wanted). 30 | - Unisciti alle nostre discussioni sul progeto di nuove funzionalità e protocolli, come il [supporto a I2P](https://github.com/HelloZeroNet/ZeroNet/issues/45) e [il supporto a DHT](https://github.com/HelloZeroNet/ZeroNet/issues/57). 31 | - Possiedi un [Raspberry Pi](https://github.com/HelloZeroNet/ZeroNet#linux-terminal), un [C.H.I.P.](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:94:Running+ZeroNet+on+a+$9%C2%A0computer) o un [open router](https://github.com/HelloZeroNet/ZeroNet/issues/783)? Prova a farlo funzionare con ZeroNet e raccontaci come lavora ZeroNet sul tuo dispositivo. 32 | 33 | ### Ti piace scrivere codice? 34 | 35 | - Se conosci Python, puoi sceglere un lavoro dal nostro [gestore di argomenti su GitHub](https://github.com/HelloZeroNet/ZeroNet/issues). 36 | - Sono apprezzate anche le tue idee di sviluppo. Prima di iniziare, perfavore [apri una nuova discussione](https://github.com/HelloZeroNet/ZeroNet/issues/new) per farlo sapere alla comunità, così sarai sicuro che condivideremo le tue idee per farle rendere al meglio. 37 | - Mantieni il tuo stile coerente. Ti chiediamo di seguire le convenzioni riportare più avanti. 38 | 39 | ### Vorresti offrire supporto finanziario? 40 | 41 | - Puoi [donare Bitcoins](donate.md) per supportare ZeroNet. 42 | 43 | 44 | ## Convenzioni di sviluppo codice 45 | 46 | - Seguire [PEP8](https://www.python.org/dev/peps/pep-0008/) 47 | - Semplice è meglio che complesso 48 | - L'ottimizzazione prematura è la strada per la perdizione 49 | 50 | ### Nomenclatura 51 | - NomiDelleClassi: iniziali delle parole maiuscole (CamelCased) 52 | - nomiDelleFunzioni: iniziale minuscola, le altre parole con inziale maiuscola (camelCased) 53 | - nomi_delle_variabili: minuscolo con parole separate da underscore (under_scored o snaked_name) 54 | 55 | ### Variabili 56 | - percorso_file: percorso dei file relativo alla cartella di lavoro (data/17ib6teRqdVgjB698T4cD1zDXKgPqpkrMg/css/all.css) 57 | - percorsi_interni: percorsi relativi alle cartelle del sito (css/all.css) 58 | - nomi_file: all.css 59 | - file: oggetti Python 60 | - privatekey: chiave privata per il sito (senza _) 61 | 62 | ### Cartelle file sorgenti e nomenclatura 63 | - É preferibile un file per classe 64 | - I nomi dei file sorgenti e delle cartelle derivano dal NomeClasse: WorkerManager class = Worker/WorkerManager.py 65 | -------------------------------------------------------------------------------- /docs/it/help_zeronet/donate.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Contribuisci a mantenere vivo lo sviluppo di ZeroNet 5 | 6 | 7 | ## Sviluppo generale di ZeroNet 8 | 9 | 10 |
o usando PayPal: 11 | 12 | 13 | 14 |
15 | 16 | --- 17 | 18 | 19 | ## Supporto Bitmessage 20 | 21 | 22 | 23 | * Invia e ricevi messaggi Bitmessage utilizzando l'interfaccia XMLRPC API del client locale 24 | 25 | Benefici: 26 | 27 | * Invia la richiesta di accesso al proprietario del sito via Bitmessage 28 | * Possibilità di integrare con l'interfaccia web i messaggi/commenti privati 29 | 30 | [Segnalazione Github ](https://github.com/HelloZeroNet/ZeroNet/issues/65) 31 | 32 | 33 | 34 | --- 35 | 36 | 37 | ## Supporto dominio Namecoin (dalla versione 0.2.8) 38 | 39 | * Utilizzare i nomi di dominio Namecoin per accedere ai siti 40 | 41 | Benefici: 42 | 43 | * Indirizzi dei siti facili da ricordare 44 | 45 | [Segnalazione Github](https://github.com/HelloZeroNet/ZeroNet/issues/31) 46 | 47 | 48 | --- 49 | 50 | 51 | ## Supporto DHT 52 | 53 | 54 | 55 | * Trovare i peer utilizzando DHT 56 | 57 | Benefici: 58 | 59 | * La ricerca dei peer non si appoggia più alla rete Torrent 60 | * Ricerca dei peer Ipv6 e Tor 61 | 62 | [Segnalazione Github](https://github.com/HelloZeroNet/ZeroNet/issues/57) 63 | 64 | 65 | --- 66 | 67 | 68 | ## Siti privati 69 | 70 | 71 | 72 | * Autenticazione dei peer ai siti con password o chiave pubblica 73 | 74 | Benefici: 75 | 76 | * Controllo sicuro dei peer cha hanno accesso al tuo sito 77 | 78 | [Segnalazione Github ](https://github.com/HelloZeroNet/ZeroNet/issues/62) 79 | 80 | 81 | --- 82 | 83 | 84 | ## Completo supporto Tor (dalla versione 0.3.5) 85 | 86 | * Consente di condividere i siti e connettere altri peer utilizzando la rete Tor (Probabilmente dipende dal supporto DHT) 87 | 88 | Benefici: 89 | 90 | * Nascondere il proprio IP nella distribuzione di nuovi contenuti o scaricando i siti 91 | 92 | [Segnalazione Github](https://github.com/HelloZeroNet/ZeroNet/issues/60) 93 | 94 | 95 | 96 | --- 97 | 98 | 99 | ## Supporto proxy multiutente (dalla versione 0.2.7) 100 | 101 | * Login/logout utente utilizzando la chiave principale bip32 102 | 103 | Benefici: 104 | 105 | * Rende i proxy aperti ZeroNet utilizzabili 106 | * Utilizzare ZeroNet locale per più utenti 107 | 108 | [Segnalazione Github](https://github.com/HelloZeroNet/ZeroNet/issues/58) 109 | 110 | 111 | --- 112 | 113 | 114 | ## Dove finiscono le donazioni? 115 | 116 | Le donazioni ricevute da un lavoro vanno direttamente agli sviluppatori che realizzano con successo la nuova funzione (per favore aggiungere i piani e le idee alla segnalazione prima di iniziare a lavorare su progetti rilevanti). 117 | 118 | 119 | 120 | # Sponsors 121 | 122 | * Migliore compatibilità OSX/Safari resa possibile da [BrowserStack.com](https://www.browserstack.com/) 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /docs/it/index.md: -------------------------------------------------------------------------------- 1 | ## Cos'è ZeroNet? 2 | 3 | ZeroNet utilizza la crittografia Bitcoin e la tecnologia BitTorrent per realizzare una **rete decentralizzata resistente alla censura**. 4 | 5 | Gli utenti possono pubblicare siti web statici o dinamici su ZeroNet e i visitatori possono scelglere a loro volta di ospitare i siti. I siti rimarranno online finché almeno un peer (distributore, un server ospitante) è online. 6 | 7 | Quando un sito viene aggiornato dal proprietario, tutti i nodi che offrono il sito (precedenti visitatori) ricevono solo gli aggiornamenti aggiuntivi fatti al contenuto del sito. 8 | 9 | ZeroNet ha un proprio database SQL. Questo rende semplice lo sviluppo di siti con contenuti rilevanti. Il DB è sincronizzato per ospitare i nodi con aggiornamenti incrementali. 10 | 11 | 12 | ## Perché? 13 | 14 | * Crediamo nella comunicazione aperta, libera e non censurata. 15 | * Nessuna censura: quando qualcosa è pubblicato non c'è modo per rimuoverlo. 16 | * Non c'è un unico punto debole: il contenuto rimane online finché c'è almeno un peer che lo ospita. 17 | * Impossiblile da chiudere: non è da nessuna parte perché è ovunque. Il contenuto è offerto da ogni utente che lo desidera. 18 | * Veloce: ZeroNet utilizza la tecnologia BitTorrent per distribuire i contenuti più velocemente di un server centralizzato. 19 | * Funziona offline: è possibile accedere al sito anche se la connessione ad Internet è assente. 20 | * Sicura: la proprietà dei contenuti è garantita utilizzando la stessa crittografia che garantisce i portafogli Bitcoin. 21 | 22 | [commento]: <> (Non sono sicuro di quello che segue. Idee?) 23 | 24 | [commento]: <> (# What problem is ZeroNet solving?) 25 | 26 | [commento]: <> (Quando Tim Berners-Lee creò internet, la intendeva libera. Non sorvegliata e non censurata. E [sta ancora lottando per questo](http://edition.cnn.com/2014/03/12/tech/web/tim-berners-lee-web-freedom/).) 27 | 28 | [commento]: <> (Internet è centralizzata principalmente in due modi: contenuti e nomi di dominio (URL) sono ospitati e controllati da server centrali. Se controlli i server centrali (e se sei abbastanza potente lo fai) controlli la rete.) 29 | 30 | [commento]: <> (**Archivio contenuti decentralizzato**) 31 | 32 | [commento]: <> (ZeroNet affronta il problema della conservazione dei contenuti dando ad ognuno l'abilità di conservare contenuti. I visitatori dei siti possono scegliere di ospitare un sito sui loro computer, e quando lo fanno aiutano ad offrire il sito ad altri utenti. Il sito è online finché un utente lo ospita.) 33 | 34 | [commento]: <> (**Cache DNS condivisa**) 35 | 36 | [commento]: <> (Gli indirizzi dei siti su ZeroNet sono memorizzati da tutti i membri della rete. Quando si richiama l'URL di un sito ZeroNet sul browser questo chiede ad altri peer connessi informazioni. Se uno dei peer ha il sito a disposizione invierà i contenuti, altrimenti inoltrerà la richiesta ad altri peer.) 37 | 38 | [commento]: <> (Questa architettura comporta che quando viene creato l'URL di un sito finché un peer lo mantiene non c'è modo di chiudere l'URL.) 39 | 40 | 41 | ## Caratteristiche 42 | * Setup semplice senza configurazione. 43 | * Autorizzazione senza password basata su [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki): l'account è protetto dalla stessa crittografia dei portafogli Bitcoin. 44 | * I siti sono aggiornati in tempo reale, non serve aggiornarli. 45 | * Supporto domini Namecoin .bit. 46 | * Supporto database SQL: consente un facile sviluppo dei siti e tempi rapidi di caricamento delle pagine. 47 | * Anonimo: completo supporto della rete Tor con servizio nascosto .onion al posto di indirizzi IPv4. 48 | * Connessioni criptate TLS. 49 | * Apertura automatica porte uPnP. 50 | * Plugin per il supporto multi utente (openproxy). 51 | * Funziona con qualsiasi browser/SO. 52 | 53 | 54 | ## Come funziona? 55 | 56 | * Dopo l'installazione e l'avvio di ZeroNet, aprire un sito accedendo a: 57 | `http://127.0.0.1:43110/{zeronet_site_address}` 58 | (es. `http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D`). 59 | * ZeroNet utilizzerà la rete BitTorrent per trovare peer che ospitano il sito e scaricarne il contenuto (HTML, CSS, JS...). 60 | * Ogni sito visitato viene ospitato dal tuo client. I siti possono essere rimossi o esclusi (blacklist) se necessario. 61 | * Ogni sito contiene un elenco di tutti i suoi file, ogni elemento contiene una chiave SHA512 e una firma generata utilizzando la chiave privata del proprietario del sito. 62 | * Se il proprietario del sito modifica il sito, allora firma una nuovo elenco e lo pubblica ai peer. 63 | Dopo che i peer hanno verificato l'integrità della lista (utilizzando la firma), scaricano i file modificati e pubblicano il contenuto ad altri peer. 64 | 65 | ##### [Presentazione sulla crittografia ZeroNet, aggiornamenti contenuti, siti multi utente »](https://docs.google.com/presentation/d/1_2qK1IuOKJ51pgBvllZ9Yu7Au2l551t3XBgyTSvilew/pub?start=false&loop=false&delayms=3000) 66 | 67 | 68 | ## Screenshots 69 | 70 | ![Screenshot](./img/zerohello.png) 71 | 72 | ![ZeroTalk](./img/zerotalk.png) 73 | 74 | ##### [Altri screenshots »](/using_zeronet/sample_sites/) 75 | 76 | ## Limitazioni attuali 77 | 78 | * Mancanza divisione grandi file come Torrent (Abilitato con il plugin BigFile) 79 | * Le transizioni dei file non sono compresse o criptate ancora (Aggiunta criptazione TLS) 80 | * Mancanza siti privati 81 | 82 | ## Aiutare a mantenere il progetto attivo 83 | 84 | Bitcoin: 1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX 85 | 86 | [Pagina completa donazioni](help_zeronet/donate/) 87 | 88 | ### Grazie! 89 | 90 | * Ulteriori informazioni, aiuto, modifiche, siti zeronet: [http://www.reddit.com/r/zeronet/](http://www.reddit.com/r/zeronet/) 91 | * Vieni, parla con noi: [#zeronet @ FreeNode](https://kiwiirc.com/client/irc.freenode.net/zeronet) o su [gitter](https://gitter.im/HelloZeroNet/ZeroNet) 92 | -------------------------------------------------------------------------------- /docs/it/site_development/cert_authority.md: -------------------------------------------------------------------------------- 1 | # Autorità di certificazione 2 | 3 | Un account senza password? Serve avere un certificato? Si comprende che il sistema di ID di ZeroNet non segue le convenzioni. In questa sezione, si comprenderà come funzionano i certificati utente e le autorità di certificazione in ZeroNet. 4 | 5 | ## Cosa fa una autorità di certificazione? 6 | 7 | In ZeroNet, tutto è firmato da una chiave Bitcoin. Un certificato fornisce un nome univoco e memorizzabile per un indirizzo Bitcoin. Una autorità di certificazione (o fornitore di ID) è responsabile di fornire la relazione tra un nome facile e un indirizzo Bitcoin. 8 | 9 | ## Formato del certificato 10 | 11 | ### Corpo 12 | 13 | Il corpo di un certificato contiene un indirizzo Bitcoin, un tipo di portale, e un nome utente ricordabile. 14 | 15 | ``` 16 | [IndirizzoBitcoin]#[TipoPortale]/[NomeUtente] 17 | ``` 18 | 19 | **Esempio:** 20 | 21 | ``` 22 | 1H28iygiKXe3GUMcD77HiifVqtf3858Aft#web/hellozeronet 23 | ``` 24 | 25 | - Indirizzo Bitcoin: `1H28iygiKXe3GUMcD77HiifVqtf3858Aft` 26 | - Tipo portale: `web` 27 | - Nome utente: `hellozeronet` 28 | 29 | **Regole generali:** 30 | 31 | L'indirizzo Bitcoin, il tipo di portale e il nome utente **non devono** contenere i caratteri `#`, `@` o `/` 32 | 33 | Sono ammessi solo 0-9 e a-z nel nome utente. Tutte le lettere nel nome utente **devono** essere minuscole. I caratteri non consentiti **non devono** essere utilizzati nel nome utente. Un nome utente **non dovrebbe** essere troppo lungo. Un nome utente **dovrebbe** essere leggibile e **non dovrebbe** interferire il rendering dell'intercaccia utente. 34 | 35 | Un nome utente **deve** essere univoco nell'insieme dei nomi registrati. 36 | 37 | ### Firma 38 | 39 | Un algoritmo di firma dei certificati carica una chiave di firma segreta e crea una firma Bitcoin deterministica per il corpo. 40 | 41 | **Dal codice sorgente:** 42 | 43 | ```python 44 | sign = os.popen("python zeronet.py --debug cryptSign %s#bitmsg/%s %s 2>&1" % (auth_address, user_name, config.site_privatekey)).readlines()[-1].strip() 45 | ``` 46 | 47 | ### Certificato 48 | 49 | Guardando il codice sorgente di ZeroID, si comprende come un certificato è registrato nel suo database pubblico. 50 | 51 | ```python 52 | data["users"][user_name] = "bitmsg,%s,%s" % (auth_address, sign) 53 | ``` 54 | 55 | **Esempio:** 56 | 57 | ``` 58 | "hellozeronet": "web,1H28iygiKXe3GUMcD77HiifVqtf3858Aft,HA2A+iKekECD3hasrsN8IrR86BnXQ63kPH+9A85JLO9hLUpRJTBn62UfnuuF92B9CIc6+EewAIqzIn9UoVq2LPA=" 59 | ``` 60 | 61 | Un certificato può essere archiviato in diversi formati. Comunque tutti i formati devono includere: 62 | 63 | - L'indirizzo Bitcoin: `1H28iygiKXe3GUMcD77HiifVqtf3858Aft` 64 | - Il tipo portale: `web` 65 | - Il nome utente: `hellozeronet` 66 | - La firma dell'autorità: `HA2A+iKekECD3hasrsN8IrR86BnXQ63kPH+9A85JLO9hLUpRJTBn62UfnuuF92B9CIc6+EewAIqzIn9UoVq2LPA=` 67 | 68 | ## Utilizzo in `content.json` 69 | 70 | Il proprietario del sito può scelgliere l'autorità di certificazione da usare. 71 | 72 | Blue Hub, per esempio, accetta certificati firmati da ZeroID. Questa regola è definita nel suo `data/users/content.json` 73 | 74 | - Il provider di ID ha come nome: `zeroid.bit` 75 | - La chiave pubblica sintetica del provider ID è: `1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz` 76 | 77 | ```json 78 | "user_contents": { 79 | "cert_signers": { 80 | "zeroid.bit": [ 81 | "1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz" 82 | ] 83 | } 84 | } 85 | ``` 86 | 87 | Ogni utente mostra il suo certificato nel file manifesto nella sua cartella Bitcoin. Per esempio, `data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json` contiene: 88 | 89 | ```json 90 | { 91 | "address": "1BLueGvui1GdbtsjcKqCf4F67uKfritG49", 92 | "cert_auth_type": "web", 93 | "cert_sign": "HPiZsWEJ5eLnspUj8nQ75WXbSanLz0YhQf5KJDq+4bWe6wNW98Vv9PXNyPDNu2VX4bCEXhRC65pS3CM7cOrjjik=", 94 | "cert_user_id": "nofish@zeroid.bit", 95 | "files": { 96 | "data.json": { 97 | "sha512": "8e597412a2bc2726ac9a1ee85428fb3a94b09f4e7a3f5f589119973231417b15", 98 | "size": 21422 99 | } 100 | }, 101 | "inner_path": "data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json", 102 | "modified": 1492458379, 103 | "signs": { 104 | "1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj": "G8kaZIGAstsiWLVY20e2ogJQi4OO+QuwqJ9GTj3gz7YleST/jst7RQH7hDn0uf8BJMBjFs35H3LPhNHHj4jueh8=" 105 | } 106 | } 107 | ``` 108 | 109 | Specifico del sito: 110 | 111 | - URL atteso del sito: `"address": "1BLueGvui1GdbtsjcKqCf4F67uKfritG49"` 112 | - percorso del file atteso: `"inner_path": "data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json"` 113 | 114 | Informazioni del certificato: 115 | 116 | - Provider ID: `zeroid.bit` 117 | - Nome utente: `nofish` 118 | - Indirizzo Bitcoin utente: `1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj` 119 | - Tipo portale: `web` 120 | - Firma del provider ID: `HPiZsWEJ5eLnspUj8nQ75WXbSanLz0YhQf5KJDq+4bWe6wNW98Vv9PXNyPDNu2VX4bCEXhRC65pS3CM7cOrjjik=` 121 | 122 | ### Il processo di verifica 123 | 124 | 1. L'algoritmo di verifica legge `data/users/content.json` per determinare qual'è il sito previsto per il contenuto dell'utente. 125 | 126 | 2. L'algoritmo di verifica legge `data/users/content.json` per estrarre la sintesi della chiave pubblica del provider ID. 127 | 128 | 3. Fornendo un indirizzo utente Bitcoin, un tipo di portale e un nome utente, l'algoritmo di verifica ricostruisce il corpo del certificato. 129 | 130 | 4. L'algoritmo di verifica controlla la firma dal provider ID, con la chiave pubblica definita in `data/users/content.json`, per verificare l'autenticità del corpo del certificato. 131 | 132 | 5. L'algoritmo di verifica carica la chiave pubblica dell'utente e verifica l'autenticità del contenuto dell'utente. 133 | 134 | ## Caratteristiche e limitazioni delle autorità di certificazione 135 | 136 | - Una atuorità di certificazione fornisce nomi memorizzabili per sintesi di chiavi pubbiche degli utenti. Inoltre aiuta a limitare spam e contenuti non richiesti. 137 | 138 | - L'utente non deve comunicare informazioni segrete come le password. In aggiunta l'utente si deve autenticare una sola volta. 139 | 140 | - Un'autorità di certificazione non deve essere approvata da nessun sviluppatore ZeroNet. Il proprietario di un sito può scegliere quale autorità di certificazione usare per definire la qualità dei contenuti di un utente. 141 | 142 | - Un'autorità di certificazione è responsabile del mantenimento dell'insieme dei suoi nomi utente. 143 | 144 | - ZeroID non rimuove o rinnova certificati. 145 | 146 | ## Si può rimanere senza autorità di certificazione? 147 | 148 | In generale, un certificato è necessario quando si aggiungono elementi al sito di qualcun'altro. Non è necessario avere un certificato per modificare i propri siti. 149 | -------------------------------------------------------------------------------- /docs/it/site_development/dbschema_json.md: -------------------------------------------------------------------------------- 1 | # Struttuda di dbschema.json 2 | 3 | [Esempio file dbschema.json](https://github.com/HelloZeroNet/ZeroTalk/blob/master/dbschema.json) 4 | 5 | Il codice sottostante fa quanto segue: 6 | 7 | - Se viene ricevuto un file data/users/*/data.json aggiornato (es.: un utente ha inviato qualcosa): 8 | - Ogni riga in `data["topics"]` viene caricata nella tabella `topic` 9 | - Ogni chiave in `data["comment_votes"]` viene caricata nella tabella `comment_vote` come colonna `comment_hash` e il valore salvato nella stessa riga come `vote` 10 | - Se viene ricevuto un file data/users/content.json aggiornato (es.: è stato creato un nuovo utente): 11 | - Le chiavi `"user_id", "user_name", "max_size", "added"` per valore di `content["include"]` vengono salvate nella tabella `user` e la chiave è salvata come `path` 12 | 13 | > Nota: [Alcune restrizioni](content_json/#limitazioni-espressioni-regolari) si applicano alle espressioni regolari per evitare la vulnerabilità ReDoS. 14 | 15 | ```json 16 | 17 | { 18 | "db_name": "ZeroTalk", # nome del database (utilizzato solo per ricerca errori) 19 | "db_file": "data/users/zerotalk.db", # file database relativo alla cartella del sito 20 | "version": 2, # 1 = la tabella json ha una colonna path che include cartella e nome del file 21 | # 2 = la tabella json ha colonne separate per la cartella e il nome del file 22 | # 3 = Come la versione 2 ma ha anche una colonna per il sito (per unione di siti) 23 | "maps": { # mappa da json a database 24 | ".*/data.json": { # modello regex dei file relativi al file del database 25 | "to_table": [ # carica i valori nella tabella 26 | { 27 | "node": "topics", # lettura del valore della chiave data.json[argomenti] 28 | "table": "topic" # alimentazione dati alla tabella degli argomenti 29 | }, 30 | { 31 | "node": "comment_votes", # lettura del valore della chiave data.json[comment_votes] 32 | "table": "comment_vote", # alimentazione dei dati nella tabella comment_vote 33 | "key_col": "comment_hash", 34 | # data.json[comment_votes] è un semplice dizionario, le chiavi del dizionario 35 | # sono caricate nella tabella comment_vote, colonna comment_hash 36 | 37 | "val_col": "vote" 38 | # dizionario dei valori data.json[comment_votes] caricato nella colonna vote della tabella comment_vote 39 | 40 | } 41 | ], 42 | "to_keyvalue": ["next_message_id", "next_topic_id"] 43 | # Carica data.json[next_topic_id] nella tabella keyvalue 44 | # (key: next_message_id, value: data.json[next_message_id]) 45 | 46 | }, 47 | "content.json": { 48 | "to_table": [ 49 | { 50 | "node": "includes", 51 | "table": "user", 52 | "key_col": "path", 53 | "import_cols": ["user_id", "user_name", "max_size", "added"], 54 | # importa solo queste colonne nella tabella user 55 | "replaces": { 56 | "path": {"content.json": "data.json"} 57 | # sostituisce content.json con data.json nel valore 58 | # della colonna del path (richiesta per le unioni) 59 | } 60 | } 61 | ], 62 | "to_json_table": [ "cert_auth_type", "cert_user_id" ] # Salva cert_auth_type e cert_user_id direttamente nella tabella json (quey semplici e veloci) 63 | } 64 | }, 65 | "tables": { # definizione tabella 66 | "topic": { # definisce la tabella topic 67 | "cols": [ # colonne della tabella 68 | ["topic_id", "INTEGER"], 69 | ["title", "TEXT"], 70 | ["body", "TEXT"], 71 | ["type", "TEXT"], 72 | ["parent_topic_hash", "TEXT"], 73 | ["added", "DATETIME"], 74 | ["json_id", "INTEGER REFERENCES json (json_id)"] 75 | ], 76 | "indexes": ["CREATE UNIQUE INDEX topic_key ON topic(topic_id, json_id)"], 77 | # indice creato automaticamente 78 | 79 | "schema_changed": 1426195822 80 | # ultima modifica dello schema, se la versione del client è diversa allora la 81 | # vecchia viene distrutta atomaticamente, crea la nuova tabella e ricarica in essa i dati 82 | 83 | }, 84 | "comment_vote": { 85 | "cols": [ 86 | ["comment_hash", "TEXT"], 87 | ["vote", "INTEGER"], 88 | ["json_id", "INTEGER REFERENCES json (json_id)"] 89 | ], 90 | "indexes": ["CREATE UNIQUE INDEX comment_vote_key ON comment_vote(comment_hash, json_id)", "CREATE INDEX comment_vote_hash ON comment_vote(comment_hash)"], 91 | "schema_changed": 1426195826 92 | }, 93 | "user": { 94 | "cols": [ 95 | ["user_id", "INTEGER"], 96 | ["user_name", "TEXT"], 97 | ["max_size", "INTEGER"], 98 | ["path", "TEXT"], 99 | ["added", "INTEGER"], 100 | ["json_id", "INTEGER REFERENCES json (json_id)"] 101 | ], 102 | "indexes": ["CREATE UNIQUE INDEX user_id ON user(user_id)", "CREATE UNIQUE INDEX user_path ON user(path)"], 103 | "schema_changed": 1426195825 104 | }, 105 | "json": { # formato tabella json richiesto solo se è stato specificato il modello to_json_table 106 | "cols": [ 107 | ["json_id", "INTEGER PRIMARY KEY AUTOINCREMENT"], 108 | ["directory", "TEXT"], 109 | ["file_name", "TEXT"], 110 | ["cert_auth_type", "TEXT"], 111 | ["cert_user_id", "TEXT"] 112 | ], 113 | "indexes": ["CREATE UNIQUE INDEX path ON json(directory, site, file_name)"], 114 | "schema_changed": 4 115 | } 116 | } 117 | } 118 | ``` 119 | 120 | ## Esempio di data.json file 121 | ```json 122 | { 123 | "next_topic_id": 2, 124 | "topics": [ 125 | { 126 | "topic_id": 1, 127 | "title": "Newtopic", 128 | "body": "Topic!", 129 | "added": 1426628540, 130 | "parent_topic_hash": "5@2" 131 | } 132 | ], 133 | "next_message_id": 19, 134 | "comments": { 135 | "1@2": [ 136 | { 137 | "comment_id": 1, 138 | "body": "New user test!", 139 | "added": 1423442049 140 | } 141 | ], 142 | "1@13": [ 143 | { 144 | "comment_id": 2, 145 | "body": "hello", 146 | "added": 1424653288 147 | }, 148 | { 149 | "comment_id": 13, 150 | "body": "test 123", 151 | "added": 1426463715 152 | } 153 | ] 154 | }, 155 | "topic_votes": { 156 | "1@2": 1, 157 | "4@2": 1, 158 | "2@2": 1, 159 | "1@5": 1, 160 | "1@6": 1, 161 | "3@2": 1, 162 | "1@13": 1, 163 | "4@5": 1 164 | }, 165 | "comment_votes": { 166 | "5@5": 1, 167 | "2@12": 1, 168 | "1@12": 1, 169 | "33@2": 1, 170 | "45@2": 1, 171 | "12@5": 1, 172 | "34@2": 1, 173 | "46@2": 1 174 | } 175 | } 176 | ``` 177 | 178 | ## Esempio di content.json file 179 | 180 | ```json 181 | { 182 | "files": {}, 183 | "ignore": ".*/.*", 184 | "includes": { 185 | "13v1FwKcq7dx2UPruFcRcqd8s7VBjvoWJW/content.json": { 186 | "added": 1426683897, 187 | "files_allowed": "data.json", 188 | "includes_allowed": false, 189 | "max_size": 10000, 190 | "signers": [ 191 | "13v1FwKcq7dx2UPruFcRcqd8s7VBjvoWJW" 192 | ], 193 | "signers_required": 1, 194 | "user_id": 15, 195 | "user_name": "meginthelloka" 196 | }, 197 | "15WGMVViswrF13sAKb7je6oX3UhXavBxxQ/content.json": { 198 | "added": 1426687209, 199 | "files_allowed": "data.json", 200 | "includes_allowed": false, 201 | "max_size": 10000, 202 | "signers": [ 203 | "15WGMVViswrF13sAKb7je6oX3UhXavBxxQ" 204 | ], 205 | "signers_required": 1, 206 | "user_id": 18, 207 | "user_name": "habla" 208 | } 209 | } 210 | } 211 | ``` 212 | -------------------------------------------------------------------------------- /docs/it/site_development/getting_started.md: -------------------------------------------------------------------------------- 1 | # Per iniziare 2 | 3 | ZeroNet consente di pubblicare siti web statici e dinamici in una piattaforma web distribuita. 4 | 5 | In ZeroNet non c'è il concetto di server. Pertanto, linguaggi lato server come PHP o Ruby non servono. Invece, si possono creare contenuti dinamici utilizzando le API ZeroNet (chiamate ZeroFrame), JavaScript (o CoffeeScript) e il database SQL database fornito a tutti i siti web. 6 | 7 | ## Tutorial 8 | 9 | ### Tutorial ZeroChat 10 | 11 | In questo tutorial si svilupperà un sito di chat P2P, decentralizzato, senza-server in meno di 100 righe di codice. 12 | 13 | * [Leggi su ZeroBlog](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:99:ZeroChat+tutorial) 14 | * [Leggi su Medium.com](https://decentralize.today/decentralized-p2p-chat-in-100-lines-of-code-d6e496034cd4) 15 | 16 | ## Informazioni utili 17 | 18 | ### Modalità debug ZeroNet 19 | 20 | ZeroNet presenta una opzione `--debug` che consente di sviluppare siti facilmente. 21 | 22 | Per avviare ZeroNet in modalità debug usare: `python zeronet.py --debug` 23 | 24 | Se si sta usando una versione compilata/bundled di ZeroNet: 25 | 26 | * Su Windows: `lib\ZeroNet.cmd --debug` 27 | * Su Linux: `./ZeroNet.sh --debug` 28 | * Su Mac: `./ZeroNet.app/Contents/MacOS/ZeroNet --debug` 29 | 30 | #### Funzionalità modalità debug: 31 | 32 | - Conversione automatica [CoffeeScript](http://coffeescript.org/) -> JavaScript (se è installato un compilatore coffeescript) 33 | - I messaggi di debug compaiono nella console 34 | - Auto ricarica di alcuni file sorgenti (UiRequest, UiWebsocket, FileRequest) su modifica per prevenire il riavvio (Richiede [PyFilesystem](http://pyfilesystem.org/) su GNU/Linux) 35 | - `http://127.0.0.1:43110/Debug` Tracciamento e console Python interattiva all'ultima posizione di errore (utilizzando il meraviglioso debugger Werkzeug - Richiede [Werkzeug](http://werkzeug.pocoo.org/)) 36 | - `http://127.0.0.1:43110/Console` Visualizza una cponsole interattiva Python (Richiede [Werkzeug](http://werkzeug.pocoo.org/)) 37 | 38 | ### Scrivere in CoffeeScript 39 | 40 | Per aiutare nella scrittura di siti ZeroNet basati su CoffeeScript-based e per utilizzare il convertitore ZeroNet 41 | incluso CoffeeScript -> JavaScript, abilitare per prima cosa la modalità debug come descritto 42 | in [Debug](#modalità-debug-zeronet). Inoltre, assicurarsi che il sito su cui si vuole lavorare 43 | sia marcato come di proprietà abilitando "Questo è il mio sito" attraverso 44 | la barra laterale. 45 | 46 | 47 | ZeroNet compilerà tutti i file CoffeeScript che troverà all'interno del file `all.js`, e li depositerà in una cartella `js/` al livello principale del sito. Questo file incliderà anche tutto il codice JavaScript. Quindi è possibile importare tutto il codice dinamico nell'HTML con la seguente riga prima del tag ``: 48 | 49 | ```html 50 | 51 | ``` 52 | 53 | 54 | !!! info "Nota" 55 | 56 | `{lang}` è una *variabile segnaposto* e verrà sostituita automaticamente dal valore opportuno da ZeroNet quando il sito viene caricato. 57 | 58 | 59 | ### Disabilitare la chache HTTP del browser 60 | 61 | In aggiunta alla modalità debug, disabilitare la cache HTTP nel browser è una parte essenziale nello sviluppo di siti ZeroNet. I moderni browser tentano di memorizzare in cache i conentuti web quando possono. Siccome tutti i siti ZeroNet funzionano all'interno di un iframe, i web browser non si accorgono quando il contenuto di un sito ZeroNet cambia e pertanto le modifiche dei siti non vengono visualizzate se è attiva la cache HTTP. 62 | 63 | Per disabilitarla, aprire gli strumenti sviluppatori del browser, spostarsi sulle impostazioni è settare l'opzione vicino alla riga di 'Disabilitare cache HTTP (quando gli strumenti sviluppatore sono aperti)'. Come suggeriscono le impostazioni, assicurarsi di mantenere aperti gli strumenti sviluppatori quando si testano nuove modifiche del sito! 64 | 65 | ### Funzionalità aggiuntive (funzionano folo sui siti di proprietà) 66 | 67 | - File CSS uniti: tutti i file CSS all'interno della cartella del sito vengono uniti in uno chiamato `all.css`. Si può scegliere di includere solo questo file nel sito. Se si vogliono mantenere gli altri file CSS per sviluppare con facilità, si possono aggiungere alla chiave ignore del relativo file `content.json`. In questo modo, non verranno pubblicati con il sito. (es.: aggiungere a `content.json` `"ignore": "(js|css)/(?!all.(js|css))"` per ignorare tutti i file CSS e JS eccetto `all.js` e `all.css`) 68 | - File JS uniti: tutti i file JS all'interno della cartella del sito vegono uniti in uno chiamato `all.js`. Se è presente un compilatore CoffeeScript (fornito per Windows) convertirà `.coffee` in `.js`. 69 | - L'ordine in cui i file vengono uniti in all.css/all.js: i file all'interno delle sotto cartelle delle cartelle css/js sono i primi; i file nella cartella css/js verranno uniti seguendo l'ordinamento per nome (01_a.css, 02_a.css, etc) 70 | 71 | ## Serve aiuto? 72 | 73 | ZeroNet ha una comunità in crescita di sviluppatori con diverse specializzazioni. Se serve aiuto, notizie o semplicemente restare in contatto, connettetevi liberamente ai seguenti servizi: 74 | 75 | ### Forum 76 | 77 | * [ZeroExchange](http://127.0.0.1:43110/zeroexchange.bit/), un clone p2p StackOverflow 78 | * [ZeroTalk](http://127.0.0.1:43110/Talk.ZeroNetwork.bit/), un forum p2p Reddit-like 79 | 80 | ### Chat 81 | 82 | * [#zeronet-dev:matrix.org](https://riot.im/app/#/room/#zeronet-dev:matrix.org) su Matrix 83 | * IRC a #zeronet su Freenode 84 | -------------------------------------------------------------------------------- /docs/it/translation.md: -------------------------------------------------------------------------------- 1 | # Come tradurre 2 | 3 | Inserire qui le istruzioni per la traduzione. 4 | -------------------------------------------------------------------------------- /docs/it/using_zeronet/create_new_site.md: -------------------------------------------------------------------------------- 1 | # Creare un nuovo sito ZeroNet 2 | 3 | ## Modo semplice: utilizzare l'interfaccia web 4 | 5 | * Fare clic su **⋮** > voce di menu **"Creare un nuovo sito vuoto"** sul sito [ZeroHello](http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D). 6 | * Si verrà **rediretti** in un sito completamente nuovo modificabile solo da voi! 7 | * Si può accedere e modificare il contenuto del proprio sito nella cartella **data/[indirizzodeltuosito]** 8 | * Dopo le modifiche aprire il sito, trascinare a sinistra l'icona "0" in alto a destra, quindi fare clic sui bottoni **firma** e **pubblica** nella parte bassa 9 | 10 | ## Modo manuale: utilizzando la riga di comando 11 | 12 | ### 1. Creare la struttura del sito 13 | 14 | * Spegnere ZeroNet se attivo 15 | * Navicare nella cartella dove è installato ZeroNet ed eseguire: 16 | 17 | ```bash 18 | $ zeronet.py siteCreate 19 | ... 20 | - Chiave privata del sito: 23DKQpzxhbVBrAtvLEc2uvk7DZweh4qL3fn3jpM3LgHDczMK2TtYUq 21 | - Indirizzo del sito: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 22 | ... 23 | - Sito creato! 24 | $ zeronet.py 25 | ... 26 | ``` 27 | 28 | - Questo creerà i file iniziali dentro ```data/13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2```. 29 | 30 | > __Nota:__ 31 | > Gli utenti Windows che utilizzano la versione pachettizata devono navigare nella cartella ZeroBundle/ZeroNet ed eseguire `"../Python/python.exe" zeronet.py siteCreate` 32 | 33 | ### 2. Costruire/modificare un sito 34 | 35 | * Aggiornare i file del sito posizionati in ```data/[chiave dell'indirizzo del sito]``` (es.: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2). 36 | * Quando il sito è pronto eseguire: 37 | 38 | ```bash 39 | $ zeronet.py siteSign 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 40 | - Sito in firma: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2... 41 | Chiave privata (inserimento nascosto): 42 | ``` 43 | 44 | * Inserire la chiave privata ottenuta quando si è creato il sito. Questo applicherà la firma a tutti i file così i peer potranno verificare che chi effettua le modifiche è il proprietario del sito. 45 | 46 | ### 3. Pubblicare le modifiche del sito 47 | 48 | * Per informare i peer delle modifiche effettuate bisogna eseguire: 49 | 50 | ```bash 51 | $ zeronet.py sitePublish 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 52 | ... 53 | SiSitote:13DNDk..bhC2 Publishing to 3/10 peers... 54 | Sito:13DNDk..bhC2 Pubblicato con successo da 3 peer 55 | - File distribuiti.... 56 | ``` 57 | 58 | * Questo è tutto! Le modifiche sono state firmate e pubblicate con successo. 59 | * Il sito sarà accessibile da: ```http://localhost:43110/13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2``` 60 | 61 | 62 | **Passi successivi:** [Documentazione sviluppatori ZeroNet](../../site_development/getting_started/) 63 | -------------------------------------------------------------------------------- /docs/it/using_zeronet/installing.md: -------------------------------------------------------------------------------- 1 | # Installazione ZeroNet 2 | 3 | * Scaricare il pacchetto ZeroBundle: [Microsoft Windows](https://github.com/HelloZeroNet/ZeroNet-win/archive/dist/ZeroNet-win.zip), [Apple macOS](https://github.com/HelloZeroNet/ZeroNet-mac/archive/dist/ZeroNet-mac.zip), [Linux 64bit](https://github.com/HelloZeroNet/ZeroBundle/raw/master/dist/ZeroBundle-linux64.tar.gz), [Linux 32bit](https://github.com/HelloZeroNet/ZeroBundle/raw/master/dist/ZeroBundle-linux32.tar.gz) 4 | * Estrarre in una qualsiasi cartella 5 | * Eseguire `ZeroNet.exe` (win), `ZeroNet(.app)` (macOS), `ZeroNet.sh` (linux) 6 | 7 | ### Installazione manuale per Linux Debian 8 | 9 | * `sudo apt-get update` 10 | * `sudo apt-get install msgpack-python python-gevent` 11 | * `wget https://github.com/HelloZeroNet/ZeroNet/archive/master.tar.gz` 12 | * `tar xvpfz master.tar.gz` 13 | * `cd ZeroNet-master` 14 | * Avviare con `python zeronet.py` 15 | * Aprire http://127.0.0.1:43110/ nel browser 16 | 17 | ### [Vagrant](https://www.vagrantup.com/) 18 | 19 | * `vagrant up` 20 | * Accedere alla VM con `vagrant ssh` 21 | * `cd /vagrant` 22 | * Eseguire `python zeronet.py --ui_ip 0.0.0.0` 23 | * Aprire http://127.0.0.1:43110/ nel browser 24 | 25 | ### [Docker](https://www.docker.com/) 26 | * `docker run -d -v :/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 nofish/zeronet` 27 | * Questa immagine Docker include il proxy Tor, che è disabilitato di default. Fare attenzione che alcuni provider di hosting non consentono di eseguire Tor nei loro server. Se lo si vuole abilitare, impostare la variabile d'ambiente `ENABLE_TOR` a `true` (Predefinito: `false`). Es.: 28 | 29 | `docker run -d -e "ENABLE_TOR=true" -v :/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 nofish/zeronet` 30 | * Aprire http://127.0.0.1:43110/ nel browser 31 | 32 | ### [Virtualenv](https://virtualenv.readthedocs.org/en/latest/) 33 | 34 | * `virtualenv env` 35 | * `source env/bin/activate` 36 | * `pip install msgpack-python gevent` 37 | * `python zeronet.py` 38 | * Aprire http://127.0.0.1:43110/ nel browser 39 | -------------------------------------------------------------------------------- /docs/it/using_zeronet/sample_sites.md: -------------------------------------------------------------------------------- 1 | # Siti ZeroNet di esempio 2 | 3 | ## ZeroHello 4 | 5 | La pagina principale di ZeroNet 6 | 7 | - Elenca tutti i siti seguiti: titolo, numero peer, data modifica, etc. 8 | - Azioni sui siti: aggiorna, pausa, riavvia, cancella, controlla file e salva come .zip 9 | - Duplicare siti per avere il proprio blog / forum 10 | - Statistiche ZeroNet 11 | - Se è disponibile un aggiornamento, ZeroNet può essere aggiornato con un clic 12 | 13 | ![ZeroHello](../img/zerohello.png) 14 | 15 | Indirizzo: [1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D](http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D) 16 | 17 | [Codice sorgente](https://github.com/HelloZeroNet/ZeroHello) 18 | 19 | --- 20 | 21 | ## ZeroBlog 22 | 23 | Demo di un blog con pubblicazione automatica 24 | 25 | - Modifica dei contenuti in linea 26 | - Sintassi Markdown 27 | - Evidenza sintassi del codice 28 | - Firma e pubblicazione del sito attraverso l'interfaccia web 29 | 30 | Come funziona? 31 | 32 | - `data.json` all'interno dei file del sito contiene i messaggi e i commenti del blog. Ogni utente ha i propri. 33 | - Con l'elaborazione `Firma & Pubblica nuovi contenuti`, viene richiesta al bloggher la chiave privata del sito (visualizzata [creando un nuovo sito utilizzando il comando zeronet.py siteCreate](create_new_site/)) 34 | - Il vostro client ZeroNet firma i file nuovo/modificati e li pubblica direttamente agli altri peer 35 | - Il sito sarà quindi accessibile finché altri peer lo pubblicano 36 | 37 | ![ZeroBlog](../img/zeroblog.png) 38 | 39 | Indirizzo: [1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8](http://127.0.0.1:43110/1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8) o [blog.zeronetwork.bit](http://127.0.0.1:43110/blog.zeronetwork.bit) 40 | 41 | [Codice sorgente](https://github.com/HelloZeroNet/ZeroBlog) 42 | 43 | 44 | --- 45 | 46 | ## ZeroTalk 47 | 48 | Demo di forum P2P decentralizzato 49 | 50 | - Creazione di messaggi e commenti, modifica, cancellazione e votazioni 51 | - Commenti e contenuti pubblicati direttamente agli altri peer 52 | - Solo l'autore può firmare e modificare i prorpi file 53 | - Visualizzazione in tempo reale di nuovi commenti 54 | 55 | Come funziona? 56 | 57 | - Per inserire e commentare messaggi serve richiedere un certificato di registrazione (una firma criprografica) da un provider ZeroID 58 | - Ottenuto il certificato si può pubblicare il contenuto (messaggi, argomenti, voti) direttamente ad altri peer 59 | 60 | ![ZeroTalk](../img/zerotalk.png) 61 | 62 | Indirizzo: [1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT](http://127.0.0.1:43110/1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT) o [talk.zeronetwork.bit](http://127.0.0.1:43110/talk.zeronetwork.bit) 63 | 64 | [Codice sorgente](https://github.com/HelloZeroNet/ZeroTalk) 65 | 66 | --- 67 | 68 | ## ZeroMail 69 | 70 | Sito di messaggistica end-to-end criptato, distribuito, P2P. Per aumentare la riservatezza uilizza una soluzione simile a BitMessage e non espone il contenitore del messaggio. 71 | 72 | - Utilizza ECIES per scambi segreti, AES256 per la codifica dei messaggi 73 | - Quando si visita il sito per la prima volta, viene aggiunta la chiave pubblica dell'utente ai suoi file dati. Da questo momento chiunque può inviare messaggi all'utente 74 | - Ognuno tenta di decifrare ogni messaggio, questo migliora la riservatezza rendendo impossibile trovare il contenitore del messaggio 75 | - Per ridurre il sovraccarico del messaggio e aumentare la velocità di decodifica, si riutilizza la chiave AES, ma viene generato un nuovo IV ogni volta 76 | 77 | ![ZeroTalk](../img/zeromail.png) 78 | 79 | Indirizzo: [1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27](http://127.0.0.1:43110/1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27) o [mail.zeronetwork.bit](http://127.0.0.1:43110/mail.zeronetwork.bit) 80 | 81 | [Codice sorgente](https://github.com/HelloZeroNet/ZeroMail) 82 | 83 | --- 84 | 85 | ## ZeroMe 86 | 87 | Social network decentralizzata, simil-Twitter, P2P. 88 | 89 | - Archivia le informazioni utente nel registro utente ZeroMe 90 | - Archivia messaggi e commenti in SitiUnione chiamati Hub 91 | - Carica le immagini come file opzionali 92 | - Visualizza in tempo reale le attività dei collegamenti 93 | 94 | ![ZeroMe](../img/zerome.png) 95 | 96 | Indirizzo: [1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH](http://127.0.0.1:43110/1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH) 97 | 98 | [SoCodice sorgente](https://github.com/HelloZeroNet/ZeroMe) 99 | 100 | --- 101 | 102 | ## ReactionGIFs 103 | 104 | Demo per i file opzionali, file che vengono scaricati dagli altri peer solo se il browser li richiede. 105 | 106 | ![ReactionGIFs](../img/reactiongifs.jpg) 107 | 108 | Indirizzo: [1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h](http://127.0.0.1:43110/1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h) 109 | 110 | [SouCodice sorgente](https://github.com/HelloZeroNet/ReactionGIFs) 111 | 112 | --- 113 | 114 | ## ZeroChat 115 | 116 | Il sito tutorial completo per la creazione di una applicazione di chat P2P, server-less, abilitata da SQL, aggiornata in tempo reale utilizzando ZeroNet in meno di 100 righe di codice. 117 | 118 | - Utilizza i certificati ZeroID per l'autenticazione 119 | - Salva i messaggi in un database SQLite 120 | - Invia messaggi e li distribuisce direttamente agli altri utenti in tempo reale 121 | - Aggiorna i messaggi in tempo reale al loro arrivo 122 | 123 | ![ZeroChat](../img/zerochat.png) 124 | 125 | Indirizzo del sito completato: [1AvF5TpcaamRNtqvN1cnDEWzNmUtD47Npg](http://127.0.0.1:43110/1AvF5TpcaamRNtqvN1cnDEWzNmUtD47Npg) 126 | 127 | Tutorial su ZeroBlog: 128 | [Parte 1](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:43:ZeroNet+site+development+tutorial+1), 129 | [Parte 2](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:46:ZeroNet+site+development+tutorial+2) 130 | -------------------------------------------------------------------------------- /docs/resources/ZeroFrame.js: -------------------------------------------------------------------------------- 1 | // Version 1.0.0 - Initial release 2 | // Version 1.1.0 (2017-08-02) - Added cmdp function that returns promise instead of using callback 3 | // Version 1.2.0 (2017-08-02) - Added Ajax monkey patch to emulate XMLHttpRequest over ZeroFrame API 4 | // Version 1.3.0 (2018-12-05) - Added monkey patch for fetch API 5 | 6 | const CMD_INNER_READY = 'innerReady' 7 | const CMD_RESPONSE = 'response' 8 | const CMD_WRAPPER_READY = 'wrapperReady' 9 | const CMD_PING = 'ping' 10 | const CMD_PONG = 'pong' 11 | const CMD_WRAPPER_OPENED_WEBSOCKET = 'wrapperOpenedWebsocket' 12 | const CMD_WRAPPER_CLOSE_WEBSOCKET = 'wrapperClosedWebsocket' 13 | 14 | class ZeroFrame { 15 | constructor(url) { 16 | this.url = url 17 | this.waiting_cb = {} 18 | this.wrapper_nonce = document.location.href.replace(/.*wrapper_nonce=([A-Za-z0-9]+).*/, "$1") 19 | this.connect() 20 | this.next_message_id = 1 21 | this.init() 22 | } 23 | 24 | init() { 25 | return this 26 | } 27 | 28 | connect() { 29 | this.target = window.parent 30 | window.addEventListener('message', e => this.onMessage(e), false) 31 | this.cmd(CMD_INNER_READY) 32 | } 33 | 34 | onMessage(e) { 35 | let message = e.data 36 | let cmd = message.cmd 37 | if (cmd === CMD_RESPONSE) { 38 | if (this.waiting_cb[message.to] !== undefined) { 39 | this.waiting_cb[message.to](message.result) 40 | } 41 | else { 42 | this.log("Websocket callback not found:", message) 43 | } 44 | } else if (cmd === CMD_WRAPPER_READY) { 45 | this.cmd(CMD_INNER_READY) 46 | } else if (cmd === CMD_PING) { 47 | this.response(message.id, CMD_PONG) 48 | } else if (cmd === CMD_WRAPPER_OPENED_WEBSOCKET) { 49 | this.onOpenWebsocket() 50 | } else if (cmd === CMD_WRAPPER_CLOSE_WEBSOCKET) { 51 | this.onCloseWebsocket() 52 | } else { 53 | this.onRequest(cmd, message) 54 | } 55 | } 56 | 57 | onRequest(cmd, message) { 58 | this.log("Unknown request", message) 59 | } 60 | 61 | response(to, result) { 62 | this.send({ 63 | cmd: CMD_RESPONSE, 64 | to: to, 65 | result: result 66 | }) 67 | } 68 | 69 | cmd(cmd, params={}, cb=null) { 70 | this.send({ 71 | cmd: cmd, 72 | params: params 73 | }, cb) 74 | } 75 | 76 | cmdp(cmd, params={}) { 77 | return new Promise((resolve, reject) => { 78 | this.cmd(cmd, params, (res) => { 79 | if (res && res.error) { 80 | reject(res.error) 81 | } else { 82 | resolve(res) 83 | } 84 | }) 85 | }) 86 | } 87 | 88 | send(message, cb=null) { 89 | message.wrapper_nonce = this.wrapper_nonce 90 | message.id = this.next_message_id 91 | this.next_message_id++ 92 | this.target.postMessage(message, '*') 93 | if (cb) { 94 | this.waiting_cb[message.id] = cb 95 | } 96 | } 97 | 98 | log(...args) { 99 | console.log.apply(console, ['[ZeroFrame]'].concat(args)) 100 | } 101 | 102 | onOpenWebsocket() { 103 | this.log('Websocket open') 104 | } 105 | 106 | onCloseWebsocket() { 107 | this.log('Websocket close') 108 | } 109 | 110 | monkeyPatchAjax() { 111 | var page = this 112 | XMLHttpRequest.prototype.realOpen = XMLHttpRequest.prototype.open 113 | this.cmd("wrapperGetAjaxKey", [], (res) => { this.ajax_key = res }) 114 | var newOpen = function (method, url, async) { 115 | url += "?ajax_key=" + page.ajax_key 116 | return this.realOpen(method, url, async) 117 | } 118 | XMLHttpRequest.prototype.open = newOpen 119 | 120 | window.realFetch = window.fetch 121 | var newFetch = function (url) { 122 | url += "?ajax_key=" + page.ajax_key 123 | return window.realFetch(url) 124 | } 125 | window.fetch = newFetch 126 | } 127 | } -------------------------------------------------------------------------------- /docs/resources/bitcoinbar/bitcoinbar.css: -------------------------------------------------------------------------------- 1 | .bitcoinbar { 2 | width: 150px; margin-top: 5px; display: inline-block; height: 22px; border-radius: 20px; position: relative; overflow: hidden; 3 | background-color: #DDD; vertical-align: bottom; text-decoration: none; z-index: 1; margin-right: 10px; 4 | } 5 | .bitcoinbar .text { 6 | text-align: center; display: block; position: relative; transition: all 0.3s; padding-bottom: 5px; 7 | font-size: 11px; vertical-align: middle; line-height: 22px; color: rgba(152, 109, 16, 0.8); top: 0px; font-family: Segoe UI, Lucida Grande, Consolas, Monospace; font-weight: bold; 8 | } 9 | .bitcoinbar .goal { color: rgba(0,0,0,0.4); } 10 | .bitcoinbar:hover .text { top: -2.0em; color: #C0392B; } 11 | .bitcoinbar.focus .text { top: -4.0em; background-color: #3498DB; color: white; } 12 | .bitcoinbar .heart { font-size: 16px; vertical-align: -2px; color: #E74C3C; } 13 | 14 | .bitcoinbar .bar { 15 | background: linear-gradient(#FFD734, #E1AE27); width: 0%; height: 22px; display: block; content: ""; 16 | position: absolute; transition: all 0.3s; 17 | } 18 | .bitcoinbar.done .bar { background: linear-gradient(#2ECC71, #28B564); } 19 | .bitcoinbar.done .text { color: white } 20 | .bitcoinbar:hover .bar { width: 100% !important; background: linear-gradient(#FFD734, #E1AE27); } 21 | 22 | /* Address bar to show QRcode and bitcoin address in an input */ 23 | .bitcoinbar-addressbar { border: 0px; vertical-align: bottom; margin: 0px; padding: 0px; width: 0px; opacity: 0; transition: all 0.3s; display: inline-block; perspective: 900px; -moz-perspective: 900px; } 24 | .bitcoinbar-addressbar.visible { width: 240px; opacity: 1; } 25 | .bitcoinbar-addressbar input { font-family: Consolas, monospace; font-size: 11px; width: 230px; background-color: #eee; text-align: center; border: 0px; height: 22px; cursor: default; color: black; } 26 | .bitcoinbar-addressbar img { 27 | position: absolute; padding: 20px 52px; background-color: #F1C40F; margin: 0px; padding-right: 53px; width: 125px; height: 125px !important; box-sizing: content-box; 28 | transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: left top; max-width: initial; opacity: 0; 29 | } 30 | .bitcoinbar-addressbar input:focus { outline: 0; } -------------------------------------------------------------------------------- /docs/resources/bitcoinbar/bitcoinbar.js: -------------------------------------------------------------------------------- 1 | function applyBitcoinbarData(elem, data) { 2 | // var balance_btc = data.totalReceivedValue/100000000 3 | var balance_btc = parseFloat(data.available_balance)+parseFloat(data.pending_received_balance) 4 | var percent = balance_btc / parseFloat(elem.data("goal")) * 100 5 | 6 | // Set the text and create html elements 7 | if (elem.data("goal")) 8 | goal_html = "of "+elem.data("goal")+"BTC"; 9 | else { 10 | goal_html = "received"; 11 | percent = 100 12 | } 13 | elem.html("
"+balance_btc.toFixed(3)+" BTC " + goal_html + "
Donate bitcoin
Thank you! :)
") 14 | 15 | // Set anim later to get anim 16 | setTimeout(function() { 17 | $(".bar", elem).css("width", Math.round(percent)+"%") 18 | if (percent >= 100) elem.addClass("done") 19 | }, 10) 20 | 21 | elem.on("click", function() { 22 | $(".bitcoinbar-addressbar").remove() // Remove previous addressbars 23 | 24 | // Create addressbar after bitcoinbar 25 | var addressbar = $("

") 26 | elem.after(addressbar) 27 | 28 | // Set address to input 29 | $("input", addressbar).val(elem.data("address")) 30 | 31 | // Init QRcode anim 32 | $("img", addressbar).css("transform", "rotateX(-90deg)").css("opacity", 0) 33 | 34 | // Focus the input 35 | setTimeout(function() { 36 | addressbar.addClass("visible") 37 | $("input", addressbar).focus() 38 | },1) 39 | 40 | $("input", addressbar).on("focus", function() { // Select all and show QRcode on focus 41 | elem.addClass("focus") 42 | setTimeout(function() { 43 | $("input", addressbar).select() 44 | $("img", addressbar).css("transform", "rotateX(0deg)").css("opacity", 1) 45 | }, 100) 46 | }) 47 | $("*").on("click", function(e) { // Hide QRcode on outside click 48 | if ($(e.target).parents(".bitcoinbar-addressbar").length) return // Has .bitcoinbar-addressbar in clicked elem parents, do nothing 49 | elem.removeClass("focus") 50 | $("img", addressbar).css("transform", "rotateX(-90deg)").css("opacity", 0) 51 | }) 52 | return false; 53 | }) 54 | } 55 | 56 | function updateBitcoinbars() { 57 | // Query all address balance in one query 58 | /* 59 | helloblock.io down 60 | var addresses = [] 61 | $(".bitcoinbar").each(function() { 62 | addresses.push("addresses="+$(this).data("address")) 63 | }) 64 | $.get("https://mainnet.helloblock.io/v1/addresses?"+addresses.join("&"), function(res) { 65 | for (var i=0;i 14 |

Documentation moved!

15 |

16 | You're currently reading outdated documentation.
17 | View the new docs at ` + currentDocsURL + ` 18 |

19 | 20 | ` 21 | document.querySelector(".wy-nav-content, .md-content").insertAdjacentHTML("afterbegin", notice); 22 | } 23 | 24 | // modify the redirect link to more specific one if it's still exists in new docs 25 | function checkPageExists() { 26 | if (isRedirectChecked) return false; 27 | isRedirectChecked = true 28 | let newDocsURL = currentDocsURL + window.location.pathname.slice('/en/latest'.length); 29 | var request = new XMLHttpRequest; 30 | request.open('GET', newDocsURL); 31 | request.send(); 32 | request.onload = function() { 33 | if (request.status == 200) { 34 | document.querySelector("#link_redirect").href = newDocsURL; 35 | } 36 | } 37 | } 38 | 39 | function applyZeroNetPatches() { 40 | console.log("applyZeroNetPatches") 41 | 42 | // Fix hashtag links 43 | let base_href = document.location.href.replace("index.html", "").replace(/[&?]wrapper_nonce=[A-Za-z0-9]+/, "") 44 | let base_tag = $("") 45 | base_tag.attr("href", base_href) 46 | $(document.head).append(base_tag) 47 | 48 | // Fix apply hashtag scroll positions 49 | var page = new ZeroFrame() 50 | page.cmd("innerLoaded") 51 | 52 | // Fix cookie error 53 | document.__defineGetter__("cookie", function() { return "" }) 54 | 55 | // Fix search button in small screens 56 | $(".md-header").css("padding-right", "70px") 57 | 58 | // Fix ajax 59 | page.monkeyPatchAjax() 60 | } 61 | 62 | inside_zeronet_wrapper = document.location.toString().indexOf("wrapper_nonce") != -1 63 | if (inside_zeronet_wrapper) applyZeroNetPatches() 64 | -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-mono-v5-latin-ext_latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-mono-v5-latin-ext_latin-regular.woff -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-mono-v5-latin-ext_latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-mono-v5-latin-ext_latin-regular.woff2 -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-v18-latin-ext_latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-v18-latin-ext_latin-300.woff -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-v18-latin-ext_latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-v18-latin-ext_latin-300.woff2 -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-v18-latin-ext_latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-v18-latin-ext_latin-700.woff -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-v18-latin-ext_latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-v18-latin-ext_latin-700.woff2 -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-v18-latin-ext_latin-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-v18-latin-ext_latin-italic.woff -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-v18-latin-ext_latin-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-v18-latin-ext_latin-italic.woff2 -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-v18-latin-ext_latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-v18-latin-ext_latin-regular.woff -------------------------------------------------------------------------------- /docs/resources/fonts/roboto-v18-latin-ext_latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/fonts/roboto-v18-latin-ext_latin-regular.woff2 -------------------------------------------------------------------------------- /docs/resources/img/domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/domain.png -------------------------------------------------------------------------------- /docs/resources/img/reactiongifs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/reactiongifs.jpg -------------------------------------------------------------------------------- /docs/resources/img/zeroblog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zeroblog.png -------------------------------------------------------------------------------- /docs/resources/img/zeroboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zeroboard.png -------------------------------------------------------------------------------- /docs/resources/img/zerochat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zerochat.png -------------------------------------------------------------------------------- /docs/resources/img/zerohello-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zerohello-old.png -------------------------------------------------------------------------------- /docs/resources/img/zerohello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zerohello.png -------------------------------------------------------------------------------- /docs/resources/img/zeromail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zeromail.png -------------------------------------------------------------------------------- /docs/resources/img/zerome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zerome.png -------------------------------------------------------------------------------- /docs/resources/img/zerotalk-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zerotalk-old.png -------------------------------------------------------------------------------- /docs/resources/img/zerotalk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/img/zerotalk.png -------------------------------------------------------------------------------- /docs/resources/javascripts/menu.js: -------------------------------------------------------------------------------- 1 | function translationClicked (event) { 2 | if (document.getElementById('translationMenu').style.display === 'none') { 3 | document.getElementById('translationMenu').style.display = 'inline-block' 4 | document.getElementById('menuDropUp').style.display = 'inline-block' 5 | document.getElementById('menuDropDown').style.display = 'none' 6 | } else { 7 | document.getElementById('translationMenu').style.display = 'none' 8 | document.getElementById('menuDropUp').style.display = 'none' 9 | document.getElementById('menuDropDown').style.display = 'inline-block' 10 | } 11 | } 12 | 13 | function goToTranslation (event, currentLang, lang) { 14 | event.preventDefault() 15 | 16 | if (currentLang === lang) { 17 | window.location.reload(false) 18 | } 19 | 20 | let tmp = window.location.pathname.split('/') 21 | 22 | if (currentLang === 'en') { 23 | // For zeronet.io/docs/ and zeronet.io/docs-dev/ 24 | if (tmp[1].startsWith('docs') || window.inside_zeronet_wrapper) { 25 | tmp.splice(2, 0, lang) 26 | } else { 27 | tmp.splice(1, 0, lang) 28 | } 29 | window.top.location.href = tmp.join('/') 30 | } else { 31 | if (lang === 'en') { 32 | window.top.location.href = window.location.pathname.replace('/'+currentLang+'/', '/') 33 | } else { 34 | window.top.location.href = window.location.pathname.replace('/'+currentLang+'/', '/'+lang+'/') 35 | } 36 | } 37 | } 38 | 39 | function goToHowTo (event, currentLang) { 40 | event.preventDefault() 41 | 42 | console.log(currentLang) 43 | 44 | let tmp = window.location.pathname.split('/') 45 | // For zeronet.io/docs/ and zeronet.io/docs-dev/ 46 | if (tmp[1].startsWith('docs') || window.inside_zeronet_wrapper) { 47 | if (currentLang === 'en') { 48 | window.top.location.href = '/'+tmp[1]+'/translation' 49 | } else { 50 | window.top.location.href = '/'+tmp[1]+'/'+ currentLang +'/translation' 51 | } 52 | } else { 53 | window.top.location.href = '/translation' 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /docs/resources/logo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloZeroNet/Documentation/1cfdea9ecb2d20c1114ca54d7e5eddab79178606/docs/resources/logo/favicon.ico -------------------------------------------------------------------------------- /docs/resources/logo/zeronet_logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/resources/partials/header.html: -------------------------------------------------------------------------------- 1 |
2 | 83 |
84 | -------------------------------------------------------------------------------- /docs/resources/stylesheets/menu.css: -------------------------------------------------------------------------------- 1 | .md-menu { 2 | background-color: white; 3 | display: inline-block; 4 | box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); 5 | border-radius: 4px; 6 | position: absolute; 7 | left: 42px; 8 | top: 42px; 9 | /*padding: 8px 18px;*/ 10 | } 11 | 12 | .md-menu .md-list { 13 | padding-left: 0; 14 | } 15 | 16 | .md-list-item__text { 17 | color: rgba(0, 0, 0, 0.76); 18 | font-size: 1.2em; 19 | } 20 | 21 | .md-list-item { 22 | margin: 18px 20px; 23 | cursor: pointer; 24 | } 25 | 26 | .md-divider { 27 | background-color: #e1e4e8; 28 | height: 1px; 29 | margin: 8px 1px; 30 | display: block; 31 | width: 100%; 32 | } 33 | -------------------------------------------------------------------------------- /docs/zh/faq.md: -------------------------------------------------------------------------------- 1 | # 经常问的问题 2 | 3 | 4 | #### 我需要打开一个端口吗? 5 | 6 | 这是 __可选的__, 您可以在没有开放端口的情况下浏览和使用零网站点。 7 | 如果你想要创建自己的新站点,强烈建议你把端口打开。 8 | 9 | 在启动时,零网尝试使用[UPnP](https://wikipedia.org/wiki/Universal_Plug_and_Play)在您的路由器上为您打开一个端口 10 | ,如果失败了,您必须手动操作: 11 | 12 | - 尝试使用[http://192.168.1.1](http://192.168.1.1) 或 [http://192.168.0.1](http://192.168.0.1) 访问路由器的网站界面 13 | - 查找“启用UPnP支持”或类似选项,然后重新启动零网。 14 | 15 | 如果它仍然不起作用,那么尝试找到路由器网页页面的“端口转发”部分。 不同的路由器有不同的显示。 [这是YouTube上的教程。](https://www.youtube.com/watch?v=aQXJ7sLSz14) 要转发端口默认是15441。 16 | 17 | 18 | --- 19 | 20 | 21 | #### 零网是匿名的吗? 22 | 23 | 它具有和BitTorrent相同的匿名性,随着网络和站点获得更多的节点,隐私性(找出谁是评论/站点所有者的可能性)将会增加。 24 | 25 | 零网可与匿名网络配合使用:您可以使用Tor网络轻松隐藏你的IP地址。 26 | 27 | --- 28 | 29 | 30 | #### 如何在Tor浏览器中使用零网? 31 | 32 | 在Tor模式下,建议在Tor浏览器中使用零网: 33 | 34 | - 启动Tor浏览器 35 | - 进入地址 `about:config` 并接受风险警告 36 | - 点击 `Settings...` 37 | - 搜索 `no_proxies_on` 38 | - 双击首选项条目 39 | - 进入地址 `127.0.0.1` 并按 OK 40 | - 在浏览器中打开[http://127.0.0.1:43110](http://127.0.0.1:43110) 41 | 42 | 如果您仍然看到空白页: 43 | 44 | - 单击NoScript按钮(工具栏上第一个) 45 | - 选择 “临时允许所有页面” 46 | - 重新加载页面 47 | 48 | --- 49 | 50 | 51 | #### 如何在Tor上使用零网? 52 | 53 | 如果你想隐藏你的IP, 安装最新版的零网然后点击 Tor > 对ZeroHello上的每个连接开启Tor。 54 | 55 | 在Windows平台上, Tor已经打包在零网中。 零网将在第一次运行时会尝试下载并解压Tor。 If this fails for any reason, you can install it manually following the instruction in `core\tools\tor\manual_install.txt`. 56 | 57 | 对其他操作系统, 遵循这"如何在Linux/MacOS中使零网工作在Tor网络上?"这部分建议。 58 | 59 | > __小提示:__ 你可以使用零网[统计](http://127.0.0.1:43110/Stats)页面验证你的IP地址。 60 | 61 | > __小提示:__ 如果你连接错误,确保你使用的是最新版本的Tor。 (0.2.7.5+ required) 62 | 63 | 64 | --- 65 | 66 | 67 | #### 如何在Linux/MacOS中使零网工作在Tor网络上? 68 | 69 | - 遵循Tor官方指南安装对应系统下的Tor: [Linux](https://www.torproject.org/docs/tor-doc-unix.html.en) [Mac](https://www.torproject.org/docs/tor-doc-osx.html.en)。 70 | - `sudo nano /etc/tor/torrc` 71 | - Remove the `#` character from lines `ControlPort 9051` and `CookieAuthentication 1` (line ~57) 72 | - 重启 tor 73 | - Add permission for yourself to read the auth cookie. With Debian Linux, the command is `sudo usermod -a -G debian-tor [yourlinuxuser]`
(if you are not on Debian check the file's user group by `ls -al /var/run/tor/control.authcookie`) 74 | - Logout/Login with your user to apply group changes 75 | 76 | > __小提示:__ Use the `ls -ld /var/run/tor` command to make sure it has the correct `drwxr-sr-x` permission bits. (fix it with `chmod g+sx /var/run/tor/` if necessary) 77 | 78 | > __小提示:__ You can verify if your Tor setup is running correctly using `echo 'PROTOCOLINFO' | nc 127.0.0.1 9051` 79 | 80 | > __小提示:__ It's also possible to use Tor without modifying torrc (or to use older versions of Tor clients), by running `zeronet.py --tor disable --proxy 127.0.0.1:9050 --disable_udp`, but then you will lose ability to talk with other .onion addresses. 81 | 82 | 83 | 84 | --- 85 | 86 | #### 是否可以使用配置文件? 87 | 88 | 任何命令行配置标志也可以用作配置选项。 将这些选项逐行放入零网的顶级目录(具有zeronet.py的那一层目录)中`zeronet.conf`的文件中。 例如: 89 | 90 | ``` 91 | [global] 92 | data_dir = my-data-dir 93 | log_dir = my-log-dir 94 | ui_restrict = 95 | 1.2.3.4 96 | 2.3.4.5 97 | ``` 98 | 99 | 要列出可能的选项,请使用`zeronet.py --help`命令 100 | 101 | --- 102 | 103 | 104 | #### 如果我的ISP或政府阻止它,如何使Tor工作? 105 | 106 | ZeroNet does not include [Tor pluggable transports](https://www.torproject.org/docs/pluggable-transports.html.en) yet. The easiest way to make Tor work in a censored network is to start the Tor browser, configure it to connect to the Tor network with working pluggable transports, and modify ZeroNet's config to use Tor browser's proxy and control port by starting ZeroNet with `--tor_controller 127.0.0.1:9151 --tor_proxy 127.0.0.1:9150` or by adding these parameters to `zeronet.conf`. 107 | 108 | ``` 109 | [global] 110 | tor_controller = 127.0.0.1:9151 111 | tor_proxy = 127.0.0.1:9150 112 | ``` 113 | 114 | 115 | --- 116 | 117 | 118 | #### 我可以在多台机器上使用相同的账号吗? 119 | 120 | 是的,你可以。只需将`data/users.json`文件复制到新机器上即可。 121 | 122 | 123 | --- 124 | 125 | 126 | #### 如何创建“很酷的”(非.bit)网站地址? 127 | 128 | 用[vanitygen](https://bitcointalk.org/index.php?topic=25804.0) 生成一个. 一旦得到你的公钥, 创建 `data/1YourPublicKey...tCkBzAXTKvJk4uj8` 目录. 放些文件在那儿. 129 | 130 | 然后访问 [http://127.0.0.1:43110/1YourPublicKey...tCkBzAXTKvJk4uj8/](http://127.0.0.1:43110/1YourPublicKey...tCkBzAXTKvJk4uj8/). 拖`0` 按钮到左边并在侧边栏中签名你的站点。 131 | 132 | 133 | --- 134 | 135 | 136 | #### 如何注册.bit域名? 137 | 138 | 你可以使用[Namecoin](https://namecoin.info/)注册.bit域名。 139 | 使用客户端的界面或[命令行界面](https://github.com/namecoin/wiki/blob/master/How-to-register-and-configure-.bit-domains.md)管理你的域名。 140 | 141 | 当注册完成后,你必须通过添加一个zeronet项编辑你的域名记录, 例如: 142 | 143 | ``` 144 | { 145 | ... 146 | "zeronet": "1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr", 147 | "map": { 148 | "blog": { "zeronet": "1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8" }, 149 | "talk": { "zeronet": "1TaLk3zM7ZRskJvrh3ZNCDVGXvkJusPKQ" } 150 | }, 151 | ... 152 | } 153 | ``` 154 | 155 | > __小提示:__ 其他注册.bit域名的方法: [domaincoin.net](https://domaincoin.net/), [peername.com](https://peername.com/), [dotbit.me](https://dotbit.me/) 156 | 157 | > __小提示:__ 你可以在[namecha.in](http://namecha.in/)验证你的域名, 例如: [zeroid.bit](http://namecha.in/name/d/zeroid) 158 | 159 | > __小提示:__ 你应该只使用 [小写字母, 数字 在你的域名中](http://wiki.namecoin.info/?title=Domain_Name_Specification_2.0#Valid_Domains)。 160 | 161 | > __小提示:__ 要让ZeroHello显示你的域名而不是你的站点比特币地址,添加一个域名项到你的content.json中。 ([示例](https://github.com/HelloZeroNet/ZeroBlog/blob/master/content.json#L6)) 162 | 163 | 164 | --- 165 | 166 | 167 | #### 我可以使用生成的网站地址/私钥接受比特币付款吗? 168 | 169 | 是的,这是一个标准的比特币地址。 私钥是WIF格式的,因此您可以在大多数客户端中导入它。 170 | 171 | > __小提示:__ 我们不建议您在网站的地址上保留大量资金,因为每次修改网站时都必须输入私钥。 172 | 173 | 174 | --- 175 | 176 | 177 | #### 有人托管恶意内容会发生什么? 178 | 179 | 零网站点是在沙盒中的,它们具有与您通过网络访问的任何常见网站相同的权限。 180 | 您可以完全控制您所托管的内容。 如果您发现可疑内容,您可以随时停止托管该站点。 181 | 182 | --- 183 | 184 | 185 | #### 是否可以将零网安装到远端机器上? 186 | 187 | 是的,但你必须启用UiPassword插件。只需将__plugins/disabled-UiPassword__目录重命名为 __plugins/UiPassword__就可以了。然后使用
`zeronet.py --ui_ip "*" --ui_password anypassword`在远端机器上启动零网。 188 | 这会将零网网页服务器绑定到所有接口,但为保证安全,您只能通过输入给定的密码来访问它。 189 | 190 | > __小提示:__ 您还可以使用`--ui_restrict ip1 ip2`来限制基于IP地址的接口。 191 | 192 | > __小提示:__ 您可以通过创建一个`zeronet.conf`文件并在其中添加`[global]`和`ui_password = anypassword`行来在配置文件中指定密码。 193 | 194 | 195 | --- 196 | 197 | 198 | #### 有没有办法跟踪零网正在使用的带宽? 199 | 200 | 可以,零网侧边栏中的 已发送/已接受 字节。
(通过拖动右上方的`0`按钮到左侧可以打开侧边栏) 201 | 202 | > __小提示:__ 每个连接的流量统计: [http://127.0.0.1:43110/Stats](http://127.0.0.1:43110/Stats) 203 | 204 | 205 | --- 206 | 207 | 208 | #### 如果两个人使用相同的私钥修改网站会发生什么? 209 | 210 | 每个content.json文件都带有时间戳,客户端始终接受具有有效签名的最新那个文件。 211 | 212 | 213 | --- 214 | 215 | 216 | #### 零网是否用到比特币中的区块链技术? 217 | 218 | 不,零网仅使用到比特币加密技术来对站点地址和内容进行签名/验证。 219 | 用户识别也用到比特币的[BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)格式。 220 | 221 | 域名币的区块链用在域名注册中,但客户不会下载区块链。 但区块链元数据可通过零网网络传播。 222 | 223 | 224 | --- 225 | 226 | 227 | #### 零网是否仅支持HTML,CSS网站? 228 | 229 | 零网是为动态,实时更新的网站而构建的,但您可以使用它来托管任何类型的文件,例如(VCS库,您自己的瘦客户端,数据库等)。 230 | 231 | 232 | --- 233 | 234 | 235 | #### 如何创建新的零网站点? 236 | 237 | [请遵循这些说明。](../using_zeronet/create_new_site/) 238 | 239 | --- 240 | 241 | 242 | #### 当我访问站点时会发生什么? 243 | 244 | - 当您想要打开一个新站点时,它会向BitTorrent跟踪器询问访问者的IP地址。 245 | - 最初,一个名为 __content.json__ 的文件被下载下来,该文件包含所有其他文件的文件名, 246 | __哈希值__ 和站长的加密签名。 247 | - 下载的content.json文件将通过使用站点的 __地址__ 和该文件中站长的 __签名__ 被进一步 __验证__ 。 248 | - 然后其他文件(html, css, js...)被 __下载下来__ 并被通过它们的大小和来自content.json中的SHA512哈希值验证. 249 | - 每个访问过的站点然后又 __被你托管着__ . 250 | - 如果站长(拥有站点地址的私钥的人)修改了站点, 然后他签名了新的content.json文件并__将它发布给其他节点__。在节点验证了文件的完整性后(通过签名), 节点们将__下载修改后的文件__ 并将新content文件发给其他节点。 251 | 252 | 更多信息: 253 | [零网 示例站点](../using_zeronet/sample_sites/), 254 | [零网如何工作的演示文档](https://docs.google.com/presentation/d/1_2qK1IuOKJ51pgBvllZ9Yu7Au2l551t3XBgyTSvilew/pub) 255 | -------------------------------------------------------------------------------- /docs/zh/help_zeronet/coding_conventions.md: -------------------------------------------------------------------------------- 1 | # 如果您想与ZeroNet合作,则遵守编码标准 2 | - 遵循 [PEP8](https://www.python.org/dev/peps/pep-0008/) 3 | - 简单比复杂好 4 | - 过早优化是万恶之源 5 | 6 | ### 命名规则 7 | - 类名(ClassNames): 大写, 骆驼命名法 8 | - 函数名(functionNames): 以小写字母开头, 骆驼命名法 9 | - 变量名(variable_names): 小写, 下划线 10 | 11 | ### 变量 12 | - 文件路径(file_path): 相对于工作文件夹的文件路径(data/17ib6teRqdVgjB698T4cD1zDXKgPqpkrMg/css/all.css) 13 | - 内部路径(inner_path): 相对于站点文件夹的文件路径(css/all.css) 14 | - 文件名(file_name): all.css 15 | - 文件(file): Python文件对象 16 | - 私钥(privatekey): 站点私钥(没有下划线) 17 | 18 | ### 源文件文件夹和命名 19 | - 最好一个文件代表一个类 20 | - 源文件名和目录来自类名(ClassName): WorkerManager类 = Worker/WorkerManager.py 21 | -------------------------------------------------------------------------------- /docs/zh/help_zeronet/contributing.md: -------------------------------------------------------------------------------- 1 | # 为ZeroNet做贡献 2 | 3 | 感谢您使用ZeroNet。 ZeroNet是67+个与您一样的分布式爱好者的合作项目。 我们感谢所有用户捕获错误,改进文档以及设计新协议的好主意。 以下是我们要求您开始做出贡献的一些指导原则。 4 | 5 | ### 您不必提供源代码 6 | 7 | 事实上,大多数贡献者不提交源代码。 即使您喜欢编写程序,也欢迎其他类型的贡献。 8 | 9 | ### 你喜欢写作吗? 10 | 11 | - 写关于ZeroNet的文章。 12 | - 编写教程以帮助人们进行设置。 13 | - 帮助翻译ZeroNet。 14 | - 改进此文档。 本文档由世界各地的许多社区成员撰写。 15 | 16 | ### 你喜欢帮助别人吗? 17 | 18 | - 订阅我们的[GitHub上的问题跟踪器](https://github.com/HelloZeroNet/ZeroNet/issues) 并帮助人们解决问题。 19 | - 加入我们的[Gitter](https://gitter.im/HelloZeroNet/ZeroNet) 和IRC频道[#zeronet @ freenode](https://kiwiirc.com/client/irc.freenode.net/zeronet) 并提供帮助 回答提问。 20 | - 设置种子盒并帮助提高网络速度。 21 | 22 | ### 你喜欢制作网站吗? 23 | 24 | - 创建新的ZeroNet站点。 继续在ZeroNet上创建自己的博客。 [这很容易,而且成本很低。](../using_zeronet/create_new_site.md) 25 | - NoFish提出的“内容为王!” 没有内容,网络是没有价值的,所以我们需要你让它成功。 26 | 27 | ### 你喜欢做研究吗? 28 | 29 | - 帮助我们调查[硬问题](https://github.com/HelloZeroNet/ZeroNet/labels/help%20wanted)。 30 | - 加入我们关于设计新功能和协议的讨论,例如[I2P支持](https://github.com/HelloZeroNet/ZeroNet/issues/45) 和[DHT支持](https://github.com/HelloZeroNet/ZeroNet/issues/57)。 31 | - 你有[Raspberry Pi](https://github.com/HelloZeroNet/ZeroNet#linux-terminal),[C.H.I.P.](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:94:Running+ZeroNet+on+a+$9%C2%A0computer) 或[open router](https://github.com/HelloZeroNet/ZeroNet/issues/783)? 尝试在其上运行ZeroNet,并告诉我们ZeroNet在您的设备上的工作情况。 32 | 33 | ### 你喜欢写代码吗? 34 | 35 | - 如果您了解Python,可以从我们的[GitHub上的问题跟踪器](https://github.com/HelloZeroNet/ZeroNet/issues)中选择一项任务。 36 | - 您也欢迎发展自己的想法。 在您开始之前,请[打开一个新的讨论](https://github.com/HelloZeroNet/ZeroNet/issues/new)让社区了解,这样您就可以确保我们可以分享我们的想法以充分利用它。 37 | - 保持编码风格一致。 我们要求您遵循以下编码惯例。 38 | 39 | ### 你想提供经济支持吗? 40 | 41 | - 您可以[捐赠比特币](donate.md)来支持ZeroNet。 42 | 43 | 44 | ## 编码约定 45 | 46 | - 遵循 [PEP8](https://www.python.org/dev/peps/pep-0008/) 47 | - 简单比复杂好 48 | - 过早优化是万恶之源 49 | 50 | ### 命名规则 51 | - 类名(ClassNames): 大写, 骆驼命名法 52 | - 函数名(functionNames): 以小写字母开头, 骆驼命名法 53 | - 变量名(variable_names): 小写, 下划线 54 | 55 | ### 变量 56 | - 文件路径(file_path): 相对于工作文件夹的文件路径(data/17ib6teRqdVgjB698T4cD1zDXKgPqpkrMg/css/all.css) 57 | - 内部路径(inner_path): 相对于站点文件夹的文件路径(css/all.css) 58 | - 文件名(file_name): all.css 59 | - 文件(file): Python文件对象 60 | - 私钥(privatekey): 站点私钥(没有下划线) 61 | 62 | ### 源文件文件夹和命名 63 | - 最好一个文件代表一个类 64 | - 源文件名和目录来自类名(ClassName): WorkerManager类 = Worker/WorkerManager.py 65 | 66 | -------------------------------------------------------------------------------- /docs/zh/help_zeronet/donate.md: -------------------------------------------------------------------------------- 1 | # 帮助零网开发 2 | 3 | - Bitcoin: [1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX](bitcoin:1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX?Label=ZeroNet+donation) 4 | - PayPal: [https://www.paypal.me/zeronet/0usd](https://www.paypal.me/zeronet/0usd) 5 | 6 | 谢谢! 7 | -------------------------------------------------------------------------------- /docs/zh/index.md: -------------------------------------------------------------------------------- 1 | ## 什么是零网? 2 | 3 | 零网基于Bitcoin加密和BitTorrent技术构建的**分布式网络**。 4 | 5 | 用户可以在零网发布静态或动态的网站,访客可以选择成为网站服务器。只需有一个网站节点在线,网站就可保持能访问状态。 6 | 7 | 当站长更新他的网站时,所有该网站的服务器节点(以前的访客)将会且只会接收网站内容更新的部分。 8 | 9 | 零网具有内置SQL数据库。这使得大型网站开发变得容易。数据库会以增量更新的方式同步到有这个网站的节点。 10 | 11 | 12 | ## 为什么要开发零网(ZeroNet)? 13 | 14 | * 我们信仰开放、自由、无审查的通讯。 15 | * 无审查:一旦内容发布,便不可删除。 16 | * 没有单点故障:即便只有一个节点,内容仍会保持在线。 17 | * 不可能被关闭:零网在何处无人知道,因为它无处不在。网站的内容都是由愿意为数据作服务器的用户来提供的。 18 | * 高速:零网使用BitTorrent技术传输数据,比中心化服务器还要快。 19 | * 离线可用:网络不可用时也可以访问网站。 20 | * 安全: 网站内容的所有权由Bitcoin钱包的同种加密技术所保护。 21 | 22 | [comment]: <> (I'm unsure about the following bit. Thoughts?) 23 | [comment]: <> (# What problem is ZeroNet solving?) 24 | 25 | [comment]: <> (When Tim Berners-Lee created the internet, he meant for it to be free. Not surveilled nor censored. And [he is still fighting for that](http://edition.cnn.com/2014/03/12/tech/web/tim-berners-lee-web-freedom/).) 26 | 27 | [comment]: <> (The internet is centralized mainly in two places: Content and Domain Names (URLs) are hosted and controlled by central servers. If you control the central servers (and if you are powerful enough you do) you control the network.) 28 | 29 | [comment]: <> (**Decentralized content storage**) 30 | 31 | [comment]: <> (ZeroNet tackles the content storage problem by giving everyone the ability to store content. Site visitors can choose to store a website on their computers, and when they do this they also help to serve the site to other users. The site is online even if only one user is hosting it.) 32 | 33 | [comment]: <> (**Shared DNS cache**) 34 | 35 | [comment]: <> (Site addresses on ZeroNet are cached by all network members. When you type a ZeroNet site URL on your browser this will query other peers connected to you about the site. If one of these peers happen to have the site they will send it to you, if not, they will forward your query along.) 36 | 37 | [comment]: <> (This architecture means that when a site URL is created, as long as one peer is serving it, there is no way to take the URL down.) 38 | 39 | 40 | ## 特性 41 | * 简单,零配置安装。 42 | * 无需密码,基于[BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)的授权: 账号的所有权由Bitcoin钱包的同种加密技术所保护。 43 | * 站点实时更新,不需要刷新。 44 | * Namecoin .bit 域名支持。 45 | * SQL 数据库支持: 简化了站点开发,减少了页面加载时间。 46 | * 匿名性: 完整的Tor网络支持,使用.onion而非ipv4地址。 47 | * TLS加密连接。 48 | * 自动使用uPnP打开端口。 49 | * 多用户插件(openproxy)。 50 | * 可以在任何操作系统和浏览器上使用。 51 | 52 | 53 | ## 零网是如何工作的? 54 | 55 | * 安装并启动零网后,访问类似于如下所示的地址打开网站: 56 | `http://127.0.0.1:43110/{零网站点地址}` 57 | (例如 `http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D`)。 58 | * 零网用BitTorrent网络寻找为这个站点做种的节点并从节点下载站点数据(HTML, CSS, JS...)。 59 | * 你的客户端将会为每个访问过的站点服务。站点也可以手动移除或被添加到黑名单中。 60 | * 每个站点有一个包含站点全部文件的清单列表,其中每一项包含了一个SHA512哈希和一个用站长私钥生成的签名。 61 | * 如果站长修改了站点,那么他将签名新的清单列表,并发布它给其他节点。 62 | 当节点验证完清单列表完整性后(用签名),他们将下载修改后的文件,并再将它发布给其他节点。 63 | 64 | ##### [关于零网加密技术、内容更新和多用户站点的幻灯片 »](https://docs.google.com/presentation/d/1_2qK1IuOKJ51pgBvllZ9Yu7Au2l551t3XBgyTSvilew/pub?start=false&loop=false&delayms=3000) 65 | 66 | 67 | ## 截图 68 | 69 | ![截图](./img/zerohello.png) 70 | 71 | ![ZeroTalk](./img/zerotalk.png) 72 | 73 | ##### [更多截图 »](/using_zeronet/sample_sites/) 74 | 75 | ## 当前局限 76 | 77 | * 没有类似于torrent的文件分割、大文件的支持 (BigFile插件已实现) 78 | * 文件传输未压缩 或加密 (TLS 加密已添加) 79 | * 无法创建私有站点。 80 | 81 | ## 帮助这个项目存活 82 | 83 | Bitcoin: 1QDhxQ6PraUZa21ET5fYUCPgdrwBomnFgX 84 | 85 | [Full donation page](help_zeronet/donate/) 86 | 87 | ### 谢谢! 88 | 89 | * 更多信息、帮助、日志、零网站点: [http://www.reddit.com/r/zeronet/](http://www.reddit.com/r/zeronet/) 90 | * 来和我们聊聊: [#zeronet @ FreeNode](https://kiwiirc.com/client/irc.freenode.net/zeronet) 或在 [gitter](https://gitter.im/HelloZeroNet/ZeroNet) 91 | -------------------------------------------------------------------------------- /docs/zh/site_development/cert_authority.md: -------------------------------------------------------------------------------- 1 | # 证书颁发机构 2 | 3 | 没有密码的帐户? 我的证书? 您意识到ZeroNet的ID系统不符合惯例。 在本节中,您将了解用户证书和证书颁发机构如何在ZeroNet中工作。 4 | 5 | ## 证书颁发机构做什么? 6 | 7 | 在ZeroNet中,所有内容都由比特币签名密钥签名。 证书为比特币地址提供唯一且可记忆的名称。 证书颁发机构(或ID提供者)负责证明唯一友好名称和比特币地址之间的关系。 8 | 9 | ## 证书格式 10 | 11 | ### 正文 12 | 13 | 证书正文包含比特币地址,门户类型和可记忆的用户名。 14 | 15 | ``` 16 | [BitcoinAddress]#[PortalType]/[UserName] 17 | ``` 18 | 19 | **示例:** 20 | 21 | ``` 22 | 1H28iygiKXe3GUMcD77HiifVqtf3858Aft#web/hellozeronet 23 | ``` 24 | 25 | - Bitcoin address: `1H28iygiKXe3GUMcD77HiifVqtf3858Aft` 26 | - Portal type: `web` 27 | - User name: `hellozeronet` 28 | 29 | **一般规则:** 30 | 31 | The Bitcoin address, the portal type and the user name **must not** contain the character `#`, `@` or `/` 32 | 33 | Only 0-9 and a-z are allowed in a user name. All English letters in a user name **must** be in lower case. Characters not in the allowed set **must not** be used as parts of a user name. A user name **should not** be too long. A user name **should** be legible and **should not** interfere with user interface rendering. 34 | 35 | A user name **must** be unique in the pool of all registered user names. 36 | 37 | ### 签名 38 | 39 | 证书签名算法加载秘密签名密钥并为正文生成确定性比特币签名。 40 | 41 | **From the source code:** 42 | 43 | ```python 44 | sign = os.popen("python zeronet.py --debug cryptSign %s#bitmsg/%s %s 2>&1" % (auth_address, user_name, config.site_privatekey)).readlines()[-1].strip() 45 | ``` 46 | 47 | ### 证书 48 | 49 | 通过查看ZeroID的源代码,我们知道证书如何存储在其公共数据库中。 50 | 51 | ```python 52 | data["users"][user_name] = "bitmsg,%s,%s" % (auth_address, sign) 53 | ``` 54 | 55 | **示例:** 56 | 57 | ``` 58 | "hellozeronet": "web,1H28iygiKXe3GUMcD77HiifVqtf3858Aft,HA2A+iKekECD3hasrsN8IrR86BnXQ63kPH+9A85JLO9hLUpRJTBn62UfnuuF92B9CIc6+EewAIqzIn9UoVq2LPA=" 59 | ``` 60 | 61 | A certificate can be stored in various formats. However, all formats must include: 62 | 63 | - The Bitcoin address: `1H28iygiKXe3GUMcD77HiifVqtf3858Aft` 64 | - The portal type: `web` 65 | - The user name: `hellozeronet` 66 | - The signature from authority: `HA2A+iKekECD3hasrsN8IrR86BnXQ63kPH+9A85JLO9hLUpRJTBn62UfnuuF92B9CIc6+EewAIqzIn9UoVq2LPA=` 67 | 68 | ## `content.json`使用规则 69 | 70 | 网站所有者可以选择要信任的证书颁发机构。 71 | 72 | 例如,Blue Hub接受由ZeroID签署的证书。 This rule is defined in its `data/users/content.json` 73 | 74 | - The ID provider has a friendly name: `zeroid.bit` 75 | - The public key digest of the ID provider is: `1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz` 76 | 77 | ```json 78 | "user_contents": { 79 | "cert_signers": { 80 | "zeroid.bit": [ 81 | "1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz" 82 | ] 83 | } 84 | } 85 | ``` 86 | 87 | 每个用户都在他的比特币文件夹中的清单文件中显示他的证书。 例如, `data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json` 说: 88 | 89 | ```json 90 | { 91 | "address": "1BLueGvui1GdbtsjcKqCf4F67uKfritG49", 92 | "cert_auth_type": "web", 93 | "cert_sign": "HPiZsWEJ5eLnspUj8nQ75WXbSanLz0YhQf5KJDq+4bWe6wNW98Vv9PXNyPDNu2VX4bCEXhRC65pS3CM7cOrjjik=", 94 | "cert_user_id": "nofish@zeroid.bit", 95 | "files": { 96 | "data.json": { 97 | "sha512": "8e597412a2bc2726ac9a1ee85428fb3a94b09f4e7a3f5f589119973231417b15", 98 | "size": 21422 99 | } 100 | }, 101 | "inner_path": "data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json", 102 | "modified": 1492458379, 103 | "signs": { 104 | "1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj": "G8kaZIGAstsiWLVY20e2ogJQi4OO+QuwqJ9GTj3gz7YleST/jst7RQH7hDn0uf8BJMBjFs35H3LPhNHHj4jueh8=" 105 | } 106 | } 107 | ``` 108 | 109 | 特定站点: 110 | 111 | - Expected site URL: `"address": "1BLueGvui1GdbtsjcKqCf4F67uKfritG49"` 112 | - Expected file path: `"inner_path": "data/users/1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj/content.json"` 113 | 114 | 证书信息: 115 | 116 | - ID provider: `zeroid.bit` 117 | - User name: `nofish` 118 | - User Bitcoin address: `1J3rJ8ecnwH2EPYa6MrgZttBNc61ACFiCj` 119 | - Portal type: `web` 120 | - Signature from ID provider: `HPiZsWEJ5eLnspUj8nQ75WXbSanLz0YhQf5KJDq+4bWe6wNW98Vv9PXNyPDNu2VX4bCEXhRC65pS3CM7cOrjjik=` 121 | 122 | ### 验证过程 123 | 124 | 1. The verifying algorithm reads `data/users/content.json` to determine what is the expected site for the user content. 125 | 126 | 2. The verifying algorithm reads `data/users/content.json` to look up the public key digest of the ID provider. 127 | 128 | 3. Given a user Bitcoin address, a portal type and a user name, the verifying algorithm reconstructs the body of the certificate. 129 | 130 | 4. The verifying algorithm checks the signature from the ID provider, with the public key defined in `data/users/content.json`, to ensure the authenticity of the certificate body. 131 | 132 | 5. The verifying algorithm loads the user public key and checks the authenticity of the user content. 133 | 134 | ## 证书颁发机构的功能和限制 135 | 136 | - 证书颁发机构为用户公钥摘要提供可记忆的名称。 它还有助于缓解垃圾邮件和未经请求的内容。 137 | 138 | - 用户不必泄露密码等秘密信息。 此外,用户只需要进行一次身份验证。 139 | 140 | - 任何ZeroNet开发人员都无需批准证书颁发机构。 站点所有者可以为了用户内容质量选择信任哪些证书颁发机构。 141 | 142 | - 证书颁发机构负责维护其用户名池。 143 | 144 | - ZeroID不会撤销或续订证书。 145 | 146 | ## 我可以没有证书颁发机构吗? 147 | 148 | 通常,当您将内容添加到其他人的站点时,需要证书。 在修改自己的站点时,您不需要证书。 149 | -------------------------------------------------------------------------------- /docs/zh/site_development/dbschema_json.md: -------------------------------------------------------------------------------- 1 | # dbschema.json的结构 2 | 3 | [dbschema.json示例文件](https://github.com/HelloZeroNet/ZeroTalk/blob/master/dbschema.json) 4 | 5 | 以下代码将执行以下操作: 6 | 7 | - 如果收到一个更新的 data/users/*/data.json 文件 (例如.: 一个用户发布了某些内容): 8 | - `data["topics"]` 中的每行都会被存储到 `topic` 表中 9 | - `data["comment_votes"]` 中的每个键都会被存储到 `comment_vote` 表的 `comment_hash` 列中,同时每个键值都会被存储到相同行的 `vote` 中 10 | - 如果收到一个更新的 data/users/content.json 文件 (例如.: 新用户创建): 11 | - `content["include"]` 中的 `"user_id", "user_name", "max_size", "added"` 键都会被存储到 `user` 表中,同时相应的键被存储为 `path` 12 | 13 | > 注意: [一些限制](content_json/#regular-expression-limitations) 应用于正则表达式中以避免可能的ReDoS脆弱性. 14 | 15 | ```json 16 | 17 | { 18 | "db_name": "ZeroTalk", # 数据库名字 (仅仅用于调试) 19 | "db_file": "data/users/zerotalk.db", # 相对于站点目录的数据库文件 20 | "version": 2, # 1 = Json table has path column that includes directory and filename 21 | # 2 = Json table has separate directory and file_name column 22 | # 3 = Same as version 2, but also has site column (for merger sites) 23 | "maps": { # Json到数据库的映射 24 | ".*/data.json": { # 相对于数据库的文件正则表达式 25 | "to_table": [ # 加载值到表中 26 | { 27 | "node": "topics", # 读取data.json[topics]的键和值 28 | "table": "topic" # 将数据写到topic表中 29 | }, 30 | { 31 | "node": "comment_votes", # 读取data.json[comment_votes]的键和值 32 | "table": "comment_vote", # 将数据写到comment_vote表中 33 | "key_col": "comment_hash", 34 | # data.json[comment_votes]是个简单词典, 词典的键 35 | # 存储到comment_vote表的comment_hash列 36 | 37 | "val_col": "vote" 38 | # data.json[comment_votes]词典的值存储到comment_vote表的vote列 39 | 40 | } 41 | ], 42 | "to_keyvalue": ["next_message_id", "next_topic_id"] 43 | # 将data.json[next_topic_id]存储到keyvalue表中 44 | # (键: next_message_id, 值: data.json[next_message_id] value) 45 | 46 | }, 47 | "content.json": { 48 | "to_table": [ 49 | { 50 | "node": "includes", 51 | "table": "user", 52 | "key_col": "path", 53 | "import_cols": ["user_id", "user_name", "max_size", "added"], 54 | # 仅仅导入这些列到user表 55 | "replaces": { 56 | "path": {"content.json": "data.json"} 57 | # Replace content.json to data.json in the 58 | # value of path column (required for joining) 59 | } 60 | } 61 | ], 62 | "to_json_table": [ "cert_auth_type", "cert_user_id" ] # 直接保存cert_auth_type和cert_user_id到json表(更容易、更快的数据查询) 63 | } 64 | }, 65 | "tables": { # 表定义 66 | "topic": { # 定义topic表 67 | "cols": [ # 此表的列 68 | ["topic_id", "INTEGER"], 69 | ["title", "TEXT"], 70 | ["body", "TEXT"], 71 | ["type", "TEXT"], 72 | ["parent_topic_hash", "TEXT"], 73 | ["added", "DATETIME"], 74 | ["json_id", "INTEGER REFERENCES json (json_id)"] 75 | ], 76 | "indexes": ["CREATE UNIQUE INDEX topic_key ON topic(topic_id, json_id)"], 77 | # 自动创建的索引 78 | 79 | "schema_changed": 1426195822 80 | # Last time of the schema changed, if the client's version is different then 81 | # automatically destroy the old, create the new table then reload the data into it 82 | 83 | }, 84 | "comment_vote": { 85 | "cols": [ 86 | ["comment_hash", "TEXT"], 87 | ["vote", "INTEGER"], 88 | ["json_id", "INTEGER REFERENCES json (json_id)"] 89 | ], 90 | "indexes": ["CREATE UNIQUE INDEX comment_vote_key ON comment_vote(comment_hash, json_id)", "CREATE INDEX comment_vote_hash ON comment_vote(comment_hash)"], 91 | "schema_changed": 1426195826 92 | }, 93 | "user": { 94 | "cols": [ 95 | ["user_id", "INTEGER"], 96 | ["user_name", "TEXT"], 97 | ["max_size", "INTEGER"], 98 | ["path", "TEXT"], 99 | ["added", "INTEGER"], 100 | ["json_id", "INTEGER REFERENCES json (json_id)"] 101 | ], 102 | "indexes": ["CREATE UNIQUE INDEX user_id ON user(user_id)", "CREATE UNIQUE INDEX user_path ON user(path)"], 103 | "schema_changed": 1426195825 104 | }, 105 | "json": { # Json table format only required if you have specified to_json_table pattern anywhere 106 | "cols": [ 107 | ["json_id", "INTEGER PRIMARY KEY AUTOINCREMENT"], 108 | ["directory", "TEXT"], 109 | ["file_name", "TEXT"], 110 | ["cert_auth_type", "TEXT"], 111 | ["cert_user_id", "TEXT"] 112 | ], 113 | "indexes": ["CREATE UNIQUE INDEX path ON json(directory, site, file_name)"], 114 | "schema_changed": 4 115 | } 116 | } 117 | } 118 | ``` 119 | 120 | ## data.json文件的示例 121 | ```json 122 | { 123 | "next_topic_id": 2, 124 | "topics": [ 125 | { 126 | "topic_id": 1, 127 | "title": "Newtopic", 128 | "body": "Topic!", 129 | "added": 1426628540, 130 | "parent_topic_hash": "5@2" 131 | } 132 | ], 133 | "next_message_id": 19, 134 | "comments": { 135 | "1@2": [ 136 | { 137 | "comment_id": 1, 138 | "body": "New user test!", 139 | "added": 1423442049 140 | } 141 | ], 142 | "1@13": [ 143 | { 144 | "comment_id": 2, 145 | "body": "hello", 146 | "added": 1424653288 147 | }, 148 | { 149 | "comment_id": 13, 150 | "body": "test 123", 151 | "added": 1426463715 152 | } 153 | ] 154 | }, 155 | "topic_votes": { 156 | "1@2": 1, 157 | "4@2": 1, 158 | "2@2": 1, 159 | "1@5": 1, 160 | "1@6": 1, 161 | "3@2": 1, 162 | "1@13": 1, 163 | "4@5": 1 164 | }, 165 | "comment_votes": { 166 | "5@5": 1, 167 | "2@12": 1, 168 | "1@12": 1, 169 | "33@2": 1, 170 | "45@2": 1, 171 | "12@5": 1, 172 | "34@2": 1, 173 | "46@2": 1 174 | } 175 | } 176 | ``` 177 | 178 | ## content.json文件的示例 179 | 180 | ```json 181 | { 182 | "files": {}, 183 | "ignore": ".*/.*", 184 | "includes": { 185 | "13v1FwKcq7dx2UPruFcRcqd8s7VBjvoWJW/content.json": { 186 | "added": 1426683897, 187 | "files_allowed": "data.json", 188 | "includes_allowed": false, 189 | "max_size": 10000, 190 | "signers": [ 191 | "13v1FwKcq7dx2UPruFcRcqd8s7VBjvoWJW" 192 | ], 193 | "signers_required": 1, 194 | "user_id": 15, 195 | "user_name": "meginthelloka" 196 | }, 197 | "15WGMVViswrF13sAKb7je6oX3UhXavBxxQ/content.json": { 198 | "added": 1426687209, 199 | "files_allowed": "data.json", 200 | "includes_allowed": false, 201 | "max_size": 10000, 202 | "signers": [ 203 | "15WGMVViswrF13sAKb7je6oX3UhXavBxxQ" 204 | ], 205 | "signers_required": 1, 206 | "user_id": 18, 207 | "user_name": "habla" 208 | } 209 | } 210 | } 211 | ``` 212 | -------------------------------------------------------------------------------- /docs/zh/site_development/getting_started.md: -------------------------------------------------------------------------------- 1 | # 入门 2 | 3 | 零网允许您在分布式网络平台上发布静态和动态网站。 4 | 5 | 在零网中,没有服务器的概念。 因此,不需要像PHP或Ruby这样的服务器语言。 相反,可以使用零网的API(称为ZeroFrame),JavaScript(或CoffeeScript)以及提供给所有网站的SQL数据库来创建动态内容。 6 | 7 | ## 教程 8 | 9 | ### ZeroChat教程 10 | 11 | 在本教程中,我们将在不到100行代码中构建一个P2P,分布式,无服务器的聊天站点。 12 | 13 | * [Read on ZeroBlog](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:99:ZeroChat+tutorial) 14 | * [Read on Medium.com](https://decentralize.today/decentralized-p2p-chat-in-100-lines-of-code-d6e496034cd4) 15 | 16 | ## 有用的信息 17 | 18 | ### 零网调试模式 19 | 20 | 零网可以使用`--debug`标签来让网站开发变得更容易。 21 | 22 | 运行零网的调试模式: `python zeronet.py --debug` 23 | 24 | 如果你正在使用编译版的零网: 25 | 26 | * 在Windows平台上: `lib\ZeroNet.cmd --debug` 27 | * 在Linux平台上: `./ZeroNet.sh --debug` 28 | * 在Mac平台上: `./ZeroNet.app/Contents/MacOS/ZeroNet --debug` 29 | 30 | #### 调试模式特点: 31 | 32 | - 自动的[CoffeeScript](http://coffeescript.org/) -> JavaScript转换 (如果安装了coffeescript编译器) 33 | - 调试消息将显示在控制台上 34 | - 当一些源文件被修改后自动重新加载(UiRequest, UiWebsocket, FileRequest),进而避免了重启(需要 [PyFilesystem](http://pyfilesystem.org/) on GNU/Linux) 35 | - `http://127.0.0.1:43110/Debug` 在最新的错误发生处的可回溯和交互式Python控制台 (用到很酷的Werkzeug调试器 - 需要 [Werkzeug](http://werkzeug.pocoo.org/)) 36 | - `http://127.0.0.1:43110/Console` 生成一个交换式Python控制台 (需要 [Werkzeug](http://werkzeug.pocoo.org/)) 37 | 38 | ### 编写CoffeeScript 39 | 40 | 为帮助编写基于CoffeeScript脚本的零网站点并充分利用零网的内部的CoffeeScript -> JavaScript转换器, 首先开启调试模式[Debug](#zeronet-debug-mode)。 另外,确保你希望工作的站点被标记为你自己的站点,只需在站点侧边栏中开启"这是我的站点"。 41 | 42 | 43 | 零网会把全部的CoffeeScript文件编译成一个叫`all.js`的文件, 同时将它部署在你站点顶级目录下的一个叫`js/`文件夹中。 这个文件同时会包括你所有的JavaScript代码。 然后你可以仅仅导入你所有的动态代码到你HTML文件中,仅需在``标签前添加: 44 | 45 | ```html 46 | 47 | ``` 48 | 49 | 50 | !!! info "Note" 51 | 52 | `{lang}`是一个 *预置变量*, 当加载站点时,会自动被零网替换为合适的值。 53 | 54 | 55 | ### 禁用HTTP浏览器缓存 56 | 57 | 除了调试模式之外,在浏览器中禁用HTTP缓存是零网站点开发的必要部分。 现代网页浏览器尝试尽其可能地缓存网页内容。 由于所有零网站点都在iframe中运行,因此网页浏览器无法检测到零网站点内容何时发生更改,因此如果启用了HTTP缓存,则通常不会反映站点的更改。 58 | 59 | 要禁用,请打开浏览器的开发者工具,导航到开发者工具设置,然后选中“禁用HTTP缓存(勾选框选中时)”选项。 根据设置建议,确保在测试站点更新时,保持开发者工具打开! 60 | 61 | ### 额外功能(仅适用于您拥有的网站) 62 | 63 | - 合并的CSS文件: 站点文件夹的全部CSS文件将会被合并成一个叫`all.css`的文件。 你可以选择在你的站点中只包含这个文件就够了。 如果你想让开发变得容易,进而想包括其他CSS文件, 你可以将它们添加到站点 `content.json`的忽视项中。 这样做,它们不会随着你站点的发布而被发布出去。 (例如: 在站点的`content.json`中添加 `"ignore": "(js|css)/(?!all.(js|css))"` 这将会忽略除`all.js`和`all.css`的所有CSS和JS文件) 64 | - 合并的JS文件: 站点文件夹的全部JS文件将会被合并成一个叫`all.js`的文件。 如果CoffeeScript编译器存在,它将会转换`.coffee`为`.js`. 65 | - 合并到all.css/all.js中的文件顺序: 首先,在css/js文件夹中文件排到最前面; 在css/js文件夹中的文件将根据文件名顺序被依次合并(01_a.css, 02_a.css, 等) 66 | 67 | ## 需要帮助? 68 | 69 | 零网拥有一个逐渐成长的开发者社区,开发者们四处闲逛。 如果您想寻求帮助,建议或只是想要闲逛,请随时联系以下服务: 70 | 71 | ### 论坛 72 | 73 | * [ZeroExchange](http://127.0.0.1:43110/zeroexchange.bit/), 一个P2P版的StackOverflow 74 | * [ZeroTalk](http://127.0.0.1:43110/Talk.ZeroNetwork.bit/), 一个P2P类似Reddit的论坛 75 | 76 | ### 聊天室 77 | 78 | * [#zeronet-dev:matrix.org](https://riot.im/app/#/room/#zeronet-dev:matrix.org) on Matrix 79 | * IRC at #zeronet on Freenode 80 | -------------------------------------------------------------------------------- /docs/zh/translation.md: -------------------------------------------------------------------------------- 1 | # 如何翻译 2 | 3 | 这里有说明。 4 | 5 | -------------------------------------------------------------------------------- /docs/zh/using_zeronet/create_new_site.md: -------------------------------------------------------------------------------- 1 | # 创建新的ZeroNet站点 2 | 3 | ## 简单方法:使用Web界面 4 | 5 | * 点击位于[ZeroHello](http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D)网站上的 **⋮** > **"创建新的空站点"** 菜单项 . 6 | * 您将被 **重定向** 到一个只能由您修改的全新网站! 7 | * 您可以在 **data/[yoursiteaddress]** 目录中找到并修改您网站的内容 8 | * 修改后打开您的站点,将顶部的“0”按钮向左拖动,然后按在底部的 **签名** 和 **发布** 按钮 9 | 10 | ## 手动方式:使用命令行 11 | 12 | ### 1. 创建网站结构 13 | 14 | * Shut down ZeroNet if it is running 15 | * Browse to the folder where ZeroNet is installed and run: 16 | 17 | ```bash 18 | $ zeronet.py siteCreate 19 | ... 20 | - Site private key: 23DKQpzxhbVBrAtvLEc2uvk7DZweh4qL3fn3jpM3LgHDczMK2TtYUq 21 | - Site address: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 22 | ... 23 | - Site created! 24 | $ zeronet.py 25 | ... 26 | ``` 27 | 28 | - This will create the initial files for your site inside ```data/13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2```. 29 | 30 | > __Note:__ 31 | > Windows users using the bundle version must browse into the ZeroBundle/ZeroNet folder and run `"../Python/python.exe" zeronet.py siteCreate` 32 | 33 | ### 2. 构建/修改 站点 34 | 35 | * Update the site files located in ```data/[your site address key]``` (eg: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2). 36 | * When your site is ready run: 37 | 38 | ```bash 39 | $ zeronet.py siteSign 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 40 | - Signing site: 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2... 41 | Private key (input hidden): 42 | ``` 43 | 44 | * Enter the private key you got when you created the site. This will sign all files so peers can verify that the site owner is who made the changes. 45 | 46 | ### 3. 发布网站更改 47 | 48 | * 为了告知节点您需要运行的更改: 49 | 50 | ```bash 51 | $ zeronet.py sitePublish 13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2 52 | ... 53 | Site:13DNDk..bhC2 Publishing to 3/10 peers... 54 | Site:13DNDk..bhC2 Successfuly published to 3 peers 55 | - Serving files.... 56 | ``` 57 | 58 | * 就是这样! 您已成功签署并发布了修改。 59 | * 您的网站可以从中访问: ```http://localhost:43110/13DNDkMUExRf9Xa9ogwPKqp7zyHFEqbhC2``` 60 | 61 | 62 | **下一步:** [ZeroNet Developer Documentation](../../site_development/getting_started/) 63 | -------------------------------------------------------------------------------- /docs/zh/using_zeronet/installing.md: -------------------------------------------------------------------------------- 1 | # 安装ZeroNet 2 | 3 | * 下载ZeroBundle包: [Microsoft Windows](https://github.com/HelloZeroNet/ZeroNet-win/archive/dist/ZeroNet-win.zip), [Apple macOS](https://github.com/HelloZeroNet/ZeroNet-mac/archive/dist/ZeroNet-mac.zip), [Linux 64bit](https://github.com/HelloZeroNet/ZeroBundle/raw/master/dist/ZeroBundle-linux64.tar.gz), [Linux 32bit](https://github.com/HelloZeroNet/ZeroBundle/raw/master/dist/ZeroBundle-linux32.tar.gz) 4 | * 随地解压 5 | * 运行 `ZeroNet.exe` (win), `ZeroNet(.app)` (macOS), `ZeroNet.sh` (linux) 6 | 7 | ### Debian Linux的手动安装 8 | 9 | * `sudo apt-get update` 10 | * `sudo apt-get install msgpack-python python-gevent` 11 | * `wget https://github.com/HelloZeroNet/ZeroNet/archive/master.tar.gz` 12 | * `tar xvpfz master.tar.gz` 13 | * `cd ZeroNet-master` 14 | * Start with `python zeronet.py` 15 | * 在浏览器中打开 http://127.0.0.1:43110/ 16 | 17 | ### [Vagrant](https://www.vagrantup.com/) 18 | 19 | * `vagrant up` 20 | * Access VM with `vagrant ssh` 21 | * `cd /vagrant` 22 | * 运行 `python zeronet.py --ui_ip 0.0.0.0` 23 | * 在浏览器中打开 http://127.0.0.1:43110/ 24 | 25 | ### [Docker](https://www.docker.com/) 26 | * `docker run -d -v :/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 nofish/zeronet` 27 | * This Docker image includes the Tor proxy, which is disabled by default. Beware that some 28 | hosting providers may not allow you running Tor in their servers. If you want to enable it, 29 | set `ENABLE_TOR` environment variable to `true` (Default: `false`). E.g.: 30 | 31 | `docker run -d -e "ENABLE_TOR=true" -v :/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 nofish/zeronet` 32 | * 在浏览器中打开 http://127.0.0.1:43110/ 33 | 34 | ### [Virtualenv](https://virtualenv.readthedocs.org/en/latest/) 35 | 36 | * `virtualenv env` 37 | * `source env/bin/activate` 38 | * `pip install msgpack-python gevent` 39 | * `python zeronet.py` 40 | * 在浏览器中打开 http://127.0.0.1:43110/ 41 | 42 | -------------------------------------------------------------------------------- /docs/zh/using_zeronet/sample_sites.md: -------------------------------------------------------------------------------- 1 | # ZeroNet示例网站 2 | 3 | ## ZeroHello 4 | 5 | ZeroNet的主页 6 | 7 | - 列出所有添加的站点:标题,节点数,修改日期等。 8 | - 站点操作:更新,暂停,恢复,删除,检查文件和另存为.zip 9 | - 克隆网站以拥有自己的博客/论坛 10 | - ZeroNet统计 11 | - 如果有更新,只需点击一下即可更新ZeroNet 12 | 13 | ![ZeroHello](../img/zerohello.png) 14 | 15 | 地址: [1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D](http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D) 16 | 17 | [源代码](https://github.com/HelloZeroNet/ZeroHello) 18 | 19 | --- 20 | 21 | ## ZeroBlog 22 | 23 | 个人发布博客演示 24 | 25 | - 内联内容编辑器 26 | - Markdown语法 27 | - 代码语法高亮 28 | - 通过Web界面进行站点签名和发布 29 | 30 | 它是如何工作的? 31 | 32 | - 站点文件中`data.json`包含了博客文章和评论。 每个用户都有自己的。 33 | - Upon pressing `Sign & Publish new content`, the blogger is asked for the site private key (displayed when [creating a new site using zeronet.py siteCreate command](create_new_site/)) 34 | - Your ZeroNet client signs the new/modified files and publishes directly to other peers 35 | - The site will then be accessible until to other peers to view 36 | 37 | ![ZeroBlog](../img/zeroblog.png) 38 | 39 | 地址: [1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8](http://127.0.0.1:43110/1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8) or [blog.zeronetwork.bit](http://127.0.0.1:43110/blog.zeronetwork.bit) 40 | 41 | [源代码](https://github.com/HelloZeroNet/ZeroBlog) 42 | 43 | 44 | --- 45 | 46 | ## ZeroTalk 47 | 48 | 分散的P2P论坛演示 49 | 50 | - Post and comment creation, modification, deletion and upvoting 51 | - Commenting and content modifications pushed directly to other peers 52 | - Only you can sign and modify your own files 53 | - Real time display of new comments 54 | 55 | 它是如何工作的? 56 | 57 | - To post and comment you have to request a certificate of registration (a cryptographic sign) from a ZeroID provider 58 | - After you have the certificate you can publish your content (messages, posts, upvotes) directly to other peers 59 | 60 | ![ZeroTalk](../img/zerotalk.png) 61 | 62 | 地址: [1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT](http://127.0.0.1:43110/1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT) or [talk.zeronetwork.bit](http://127.0.0.1:43110/talk.zeronetwork.bit) 63 | 64 | [源代码](https://github.com/HelloZeroNet/ZeroTalk) 65 | 66 | --- 67 | 68 | ## ZeroMail 69 | 70 | 端到端加密,分布式P2P消息站点。 为了提高隐私性,它使用类似BitMessage的解决方案,不会公开邮件收件人。 71 | 72 | - Using ECIES for secret exchange, AES256 for message encoding 73 | - When you first visit the site, it adds your public key to your data file. At that point anyone is able to send a message to you 74 | - Everyone tries to decrypt every message, this improves privacy by making it impossible to find the message recipient 75 | - To reduce per message overhead and increase decryption speed, we re-use the AES key, but a new IV is generated every time 76 | 77 | ![ZeroTalk](../img/zeromail.png) 78 | 79 | 地址: [1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27](http://127.0.0.1:43110/1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27) or [mail.zeronetwork.bit](http://127.0.0.1:43110/mail.zeronetwork.bit) 80 | 81 | [源代码](https://github.com/HelloZeroNet/ZeroMail) 82 | 83 | --- 84 | 85 | ## ZeroMe 86 | 87 | 分散的,类似Twitter的P2P社交网络。 88 | 89 | - Stores user information in ZeroMe user registry 90 | - Stores posts and comments in MergerSites called Hubs 91 | - Upload images as optional files 92 | - Real time display of feed activity 93 | 94 | ![ZeroMe](../img/zerome.png) 95 | 96 | 地址: [1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH](http://127.0.0.1:43110/1MeFqFfFFGQfa1J3gJyYYUvb5Lksczq7nH) 97 | 98 | [源代码](https://github.com/HelloZeroNet/ZeroMe) 99 | 100 | --- 101 | 102 | ## ReactionGIFs 103 | 104 | 可选文件的演示,它是只有在浏览器请求时才从其他节点下载的文件。 105 | 106 | ![ReactionGIFs](../img/reactiongifs.jpg) 107 | 108 | 地址: [1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h](http://127.0.0.1:43110/1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h) 109 | 110 | [源代码](https://github.com/HelloZeroNet/ReactionGIFs) 111 | 112 | --- 113 | 114 | ## ZeroChat 115 | 116 | 在不到100行代码中使用ZeroNet创建无服务器,SQL支持,实时更新的P2P聊天应用程序的教程的完成站点。 117 | 118 | - Uses ZeroID certificate for authentication 119 | - Stores messages in a SQLite database 120 | - Posts messages and distribute directly to other users in real-time 121 | - Real-time update the messages as they arrive 122 | 123 | ![ZeroChat](../img/zerochat.png) 124 | 125 | Address of finished site: [1AvF5TpcaamRNtqvN1cnDEWzNmUtD47Npg](http://127.0.0.1:43110/1AvF5TpcaamRNtqvN1cnDEWzNmUtD47Npg) 126 | 127 | Tutorial on ZeroBlog: 128 | [Part1](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:43:ZeroNet+site+development+tutorial+1), 129 | [Part2](http://127.0.0.1:43110/Blog.ZeroNetwork.bit/?Post:46:ZeroNet+site+development+tutorial+2) 130 | -------------------------------------------------------------------------------- /example/ZeroFrame/content.json: -------------------------------------------------------------------------------- 1 | { 2 | "address": "1Pmo6imVL6HbvPT52s5UnRjV2GimwgooL", 3 | "description": "", 4 | "files": { 5 | "index.html": { 6 | "sha1": "c2e57efd8a5b72d1bd5d310dab1a658eb2a47963", 7 | "sha512": "6ce7eb27d02d799620c371338a5d9475633a680079e81e23644d9c5af7cb835b", 8 | "size": 41 9 | }, 10 | "data/messages.json": { 11 | "sha1": "c2e57efd8a5b72d1bd5d310dab1a658eb2a47963", 12 | "sha512": "6ce7eb27d02d799620c371338a5d9475633a680079e81e23644d9c5af7cb835b", 13 | "size": 0 14 | } 15 | }, 16 | "ignore": "", 17 | "modified": 1426094184.792, 18 | "sign": [ 19 | 57011408159225021531907803528385921971841258919044225342698254062415736638711, 20 | 69688515223620194168001039749132739863016816338220899530893208421774316916238 21 | ], 22 | "signers_sign": "G91lDA+teu6pWE/pATL5YO5c49jMRFb1HPbn75ckojbznEbLfd6MQBfgHVsX0Kc6ZLuvY7UIphlklf8iYXyJYP8=", 23 | "signs": { 24 | "1PkBs1yrWupYbugp4NU7K6enMqF4JWwDqJ": "GxyjP1ikLZWpa5XXGFSOn3TUfoh9QljRrQ00wXnyEQJmFk8+n0Zh1B+9bErvRNmtyBU+3LL0BgGGK2LKeQfnDgA=" 25 | }, 26 | "signs_required": 1, 27 | "title": "1Pmo6imVL6HbvPT52s5UnRjV2GimwgooLg - ZeroNet_", 28 | "zeronet_version": "0.2.5" 29 | } -------------------------------------------------------------------------------- /example/ZeroFrame/data/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages": [ 3 | { 4 | "message_id": 1, 5 | "topic_id": 2, 6 | "body": "Hello ZeroNet database! This is message #1", 7 | "added": 1430864641659 8 | }, 9 | { 10 | "message_id": 2, 11 | "topic_id": 5, 12 | "body": "Hello ZeroNet database! This is message #2", 13 | "added": 1430864660312 14 | }, 15 | { 16 | "message_id": 3, 17 | "topic_id": 4, 18 | "body": "Hello ZeroNet database! This is message #3", 19 | "added": 1430864687850 20 | }, 21 | { 22 | "message_id": 4, 23 | "topic_id": 8, 24 | "body": "Hello ZeroNet database! This is message #4", 25 | "added": 1430864733777 26 | }, 27 | { 28 | "message_id": 5, 29 | "topic_id": 3, 30 | "body": "Hello ZeroNet database! This is message #5", 31 | "added": 1430864951466 32 | }, 33 | { 34 | "message_id": 6, 35 | "topic_id": 4, 36 | "body": "Hello ZeroNet database! This is message #6", 37 | "added": 1430865030673 38 | }, 39 | { 40 | "message_id": 7, 41 | "topic_id": 6, 42 | "body": "Hello ZeroNet database! This is message #7", 43 | "added": 1430865049237 44 | }, 45 | { 46 | "message_id": 8, 47 | "topic_id": 4, 48 | "body": "Hello ZeroNet database! This is message #8", 49 | "added": 1430865073633 50 | }, 51 | { 52 | "message_id": 9, 53 | "topic_id": 9, 54 | "body": "Hello ZeroNet database! This is message #9", 55 | "added": 1430865077577 56 | } 57 | ], 58 | "next_message_id": 10 59 | } -------------------------------------------------------------------------------- /example/ZeroFrame/dbschema.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "ZeroFrame test", 3 | "db_file": "data/zeronet_test.db", 4 | "maps": { 5 | "messages.json": { 6 | "to_table": [ 7 | {"node": "messages", "table": "message"} 8 | ] 9 | } 10 | }, 11 | "tables": { 12 | "message": { 13 | "cols": [ 14 | ["message_id", "INTEGER"], 15 | ["topic_id", "INTEGER"], 16 | ["body", "TEXT"], 17 | ["added", "INTEGER"], 18 | ["json_id", "INTEGER REFERENCES json (json_id)"] 19 | ], 20 | "indexes": ["CREATE UNIQUE INDEX message_key ON message(message_id, json_id)"], 21 | "schema_changed": 1426195822 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /example/ZeroFrame/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 |

ZeroFrame API example

7 | 8 | 9 |

Notification examples

10 | 11 | 12 | 13 | 14 | 15 |

File write example (You must have "own": true in data/sites.json at your site)

16 | 17 | 18 | 19 |

Database example (You have to restart ZeroNet to detect the database)

20 | 48 | 49 | 50 | 51 |

Output

52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /example/ZeroFrame/js/MySite.coffee: -------------------------------------------------------------------------------- 1 | class MySite extends ZeroFrame 2 | init: -> 3 | @log "inited!" 4 | 5 | # Wrapper websocket connection ready 6 | onOpenWebsocket: (e) => 7 | @cmd "serverInfo", {}, (serverInfo) => 8 | @log "mysite serverInfo response", serverInfo 9 | @cmd "siteInfo", {}, (siteInfo) => 10 | @log "mysite siteInfo response", siteInfo 11 | 12 | 13 | window.my_site = new MySite() 14 | -------------------------------------------------------------------------------- /example/ZeroFrame/js/all.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* ---- data/1QWU6APGTFRynSmNA53qgCaVAxpVA9nYa/js/lib/ZeroFrame.coffee ---- */ 4 | 5 | 6 | (function() { 7 | var ZeroFrame, 8 | __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, 9 | __slice = [].slice; 10 | 11 | ZeroFrame = (function() { 12 | function ZeroFrame(url) { 13 | this.onCloseWebsocket = __bind(this.onCloseWebsocket, this); 14 | this.onOpenWebsocket = __bind(this.onOpenWebsocket, this); 15 | this.route = __bind(this.route, this); 16 | this.onMessage = __bind(this.onMessage, this); 17 | this.url = url; 18 | this.waiting_cb = {}; 19 | this.connect(); 20 | this.next_message_id = 1; 21 | this.init(); 22 | } 23 | 24 | ZeroFrame.prototype.init = function() { 25 | return this; 26 | }; 27 | 28 | ZeroFrame.prototype.connect = function() { 29 | this.target = window.parent; 30 | window.addEventListener("message", this.onMessage, false); 31 | return this.cmd("innerReady"); 32 | }; 33 | 34 | ZeroFrame.prototype.onMessage = function(e) { 35 | var cmd, message; 36 | message = e.data; 37 | cmd = message.cmd; 38 | if (cmd === "response") { 39 | if (this.waiting_cb[message.to] != null) { 40 | return this.waiting_cb[message.to](message.result); 41 | } else { 42 | return this.log("Websocket callback not found:", message); 43 | } 44 | } else if (cmd === "wrapperReady") { 45 | return this.cmd("innerReady"); 46 | } else if (cmd === "ping") { 47 | return this.response(message.id, "pong"); 48 | } else if (cmd === "wrapperOpenedWebsocket") { 49 | return this.onOpenWebsocket(); 50 | } else if (cmd === "wrapperClosedWebsocket") { 51 | return this.onCloseWebsocket(); 52 | } else { 53 | return this.route(cmd, message); 54 | } 55 | }; 56 | 57 | ZeroFrame.prototype.route = function(cmd, message) { 58 | return this.log("Unknown command", message); 59 | }; 60 | 61 | ZeroFrame.prototype.response = function(to, result) { 62 | return this.send({ 63 | "cmd": "response", 64 | "to": to, 65 | "result": result 66 | }); 67 | }; 68 | 69 | ZeroFrame.prototype.cmd = function(cmd, params, cb) { 70 | if (params == null) { 71 | params = {}; 72 | } 73 | if (cb == null) { 74 | cb = null; 75 | } 76 | return this.send({ 77 | "cmd": cmd, 78 | "params": params 79 | }, cb); 80 | }; 81 | 82 | ZeroFrame.prototype.send = function(message, cb) { 83 | if (cb == null) { 84 | cb = null; 85 | } 86 | message.id = this.next_message_id; 87 | this.next_message_id += 1; 88 | this.target.postMessage(message, "*"); 89 | if (cb) { 90 | return this.waiting_cb[message.id] = cb; 91 | } 92 | }; 93 | 94 | ZeroFrame.prototype.log = function() { 95 | var args; 96 | args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; 97 | return console.log.apply(console, ["[ZeroFrame]"].concat(__slice.call(args))); 98 | }; 99 | 100 | ZeroFrame.prototype.onOpenWebsocket = function() { 101 | return this.log("Websocket open"); 102 | }; 103 | 104 | ZeroFrame.prototype.onCloseWebsocket = function() { 105 | return this.log("Websocket close"); 106 | }; 107 | 108 | return ZeroFrame; 109 | 110 | })(); 111 | 112 | window.ZeroFrame = ZeroFrame; 113 | 114 | }).call(this); 115 | 116 | 117 | /* ---- data/1QWU6APGTFRynSmNA53qgCaVAxpVA9nYa/js/MySite.coffee ---- */ 118 | 119 | 120 | (function() { 121 | var MySite, 122 | __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, 123 | __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, 124 | __hasProp = {}.hasOwnProperty; 125 | 126 | MySite = (function(_super) { 127 | __extends(MySite, _super); 128 | 129 | function MySite() { 130 | this.onOpenWebsocket = __bind(this.onOpenWebsocket, this); 131 | return MySite.__super__.constructor.apply(this, arguments); 132 | } 133 | 134 | MySite.prototype.init = function() { 135 | return this.log("inited!"); 136 | }; 137 | 138 | MySite.prototype.onOpenWebsocket = function(e) { 139 | this.cmd("serverInfo", {}, (function(_this) { 140 | return function(serverInfo) { 141 | return _this.log("mysite serverInfo response", serverInfo); 142 | }; 143 | })(this)); 144 | return this.cmd("siteInfo", {}, (function(_this) { 145 | return function(siteInfo) { 146 | return _this.log("mysite siteInfo response", siteInfo); 147 | }; 148 | })(this)); 149 | }; 150 | 151 | return MySite; 152 | 153 | })(ZeroFrame); 154 | 155 | window.my_site = new MySite(); 156 | 157 | }).call(this); 158 | -------------------------------------------------------------------------------- /example/ZeroFrame/js/lib/ZeroFrame.coffee: -------------------------------------------------------------------------------- 1 | class ZeroFrame 2 | constructor: (url) -> 3 | @url = url 4 | @waiting_cb = {} 5 | @connect() 6 | @next_message_id = 1 7 | @init() 8 | 9 | 10 | init: -> 11 | @ 12 | 13 | 14 | connect: -> 15 | @target = window.parent 16 | window.addEventListener("message", @onMessage, false) 17 | @cmd("innerReady") 18 | 19 | 20 | onMessage: (e) => 21 | message = e.data 22 | cmd = message.cmd 23 | if cmd == "response" 24 | if @waiting_cb[message.to]? 25 | @waiting_cb[message.to](message.result) 26 | else 27 | @log "Websocket callback not found:", message 28 | else if cmd == "wrapperReady" # Wrapper inited later 29 | @cmd("innerReady") 30 | else if cmd == "ping" 31 | @response message.id, "pong" 32 | else if cmd == "wrapperOpenedWebsocket" 33 | @onOpenWebsocket() 34 | else if cmd == "wrapperClosedWebsocket" 35 | @onCloseWebsocket() 36 | else 37 | @route cmd, message 38 | 39 | 40 | route: (cmd, message) => 41 | @log "Unknown command", message 42 | 43 | 44 | response: (to, result) -> 45 | @send {"cmd": "response", "to": to, "result": result} 46 | 47 | 48 | cmd: (cmd, params={}, cb=null) -> 49 | @send {"cmd": cmd, "params": params}, cb 50 | 51 | 52 | send: (message, cb=null) -> 53 | message.id = @next_message_id 54 | @next_message_id += 1 55 | @target.postMessage(message, "*") 56 | if cb 57 | @waiting_cb[message.id] = cb 58 | 59 | 60 | log: (args...) -> 61 | console.log "[ZeroFrame]", args... 62 | 63 | 64 | onOpenWebsocket: => 65 | @log "Websocket open" 66 | 67 | 68 | onCloseWebsocket: => 69 | @log "Websocket close" 70 | 71 | 72 | 73 | window.ZeroFrame = ZeroFrame 74 | -------------------------------------------------------------------------------- /mkdocs-fr.yml: -------------------------------------------------------------------------------- 1 | 2 | site_name: ZeroNet 3 | site_url: https://zeronet.io 4 | site_description: Site web décentralisé utilisant Bitcoin crypto et BitTorrent protocole 5 | 6 | repo_url: https://github.com/HelloZeroNet/ZeroNet 7 | edit_uri: ../Documentation/edit/master/docs/fr/ 8 | 9 | extra_css: [docs.css, stylesheets/menu.css] 10 | extra_javascript: [ZeroFrame.js, jquery.min.js, docs.js, javascripts/menu.js] 11 | 12 | docs_dir: docs/fr 13 | site_dir: site/fr 14 | 15 | theme: 16 | language: 'fr' 17 | palette: 18 | primary: "deep purple" 19 | accent: "deep purple" 20 | logo: "logo/zeronet_logo.svg" 21 | name: "material" 22 | favicon: "logo/favicon.ico" 23 | custom_dir: "docs/resources" 24 | font: false 25 | 26 | markdown_extensions: 27 | - toc: 28 | permalink: true 29 | - codehilite 30 | - markdown.extensions.admonition 31 | - pymdownx.superfences 32 | - pymdownx.details 33 | 34 | plugins: 35 | - search: 36 | lang: ['fr'] 37 | 38 | nav: 39 | - Introduction: "index.md" 40 | - Questions Fréquentes: "faq.md" 41 | - Commencer à utiliser ZeroNet: 42 | - "using_zeronet/installing.md" 43 | - "using_zeronet/sample_sites.md" 44 | - "using_zeronet/create_new_site.md" 45 | - Commencer à déveloper: 46 | - "site_development/getting_started.md" 47 | - "site_development/zeroframe_api_reference.md" 48 | - "site_development/content_json.md" 49 | - "site_development/dbschema_json.md" 50 | - "site_development/cert_authority.md" 51 | - Contribuer à ZeroNet: 52 | - "help_zeronet/contributing.md" 53 | - "help_zeronet/coding_conventions.md" 54 | - "help_zeronet/network_protocol.md" 55 | - "help_zeronet/donate.md" 56 | -------------------------------------------------------------------------------- /mkdocs-it.yml: -------------------------------------------------------------------------------- 1 | 2 | site_name: ZeroNet 3 | site_url: https://zeronet.io 4 | site_description: Site Web decentralizzati utilizzando crittografia Bitcoin e la rete BitTorrent 5 | 6 | repo_url: https://github.com/HelloZeroNet/ZeroNet 7 | edit_uri: ../Documentation/edit/master/docs/en/ 8 | 9 | extra_css: [docs.css, stylesheets/menu.css] 10 | extra_javascript: [ZeroFrame.js, jquery.min.js, docs.js, javascripts/menu.js] 11 | 12 | docs_dir: docs/it 13 | site_dir: site 14 | 15 | theme: 16 | language: 'it' 17 | palette: 18 | primary: "deep purple" 19 | accent: "deep purple" 20 | logo: "logo/zeronet_logo.svg" 21 | name: "material" 22 | favicon: "logo/favicon.ico" 23 | custom_dir: "docs/resources" 24 | font: false 25 | 26 | markdown_extensions: 27 | - toc: 28 | permalink: true 29 | - codehilite 30 | - markdown.extensions.admonition 31 | - pymdownx.superfences 32 | - pymdownx.details 33 | 34 | plugins: 35 | - search: 36 | lang: ['it'] 37 | 38 | nav: 39 | - Introduction: "index.md" 40 | - Frequently asked questions: "faq.md" 41 | - Start using ZeroNet: 42 | - "using_zeronet/installing.md" 43 | - "using_zeronet/sample_sites.md" 44 | - "using_zeronet/create_new_site.md" 45 | - Site Development: 46 | - "site_development/getting_started.md" 47 | - "site_development/zeroframe_api_reference.md" 48 | - "site_development/content_json.md" 49 | - "site_development/dbschema_json.md" 50 | - "site_development/cert_authority.md" 51 | - Help ZeroNet development: 52 | - "help_zeronet/contributing.md" 53 | - "help_zeronet/coding_conventions.md" 54 | - "help_zeronet/network_protocol.md" 55 | - "help_zeronet/donate.md" 56 | -------------------------------------------------------------------------------- /mkdocs-readthedocs.yml: -------------------------------------------------------------------------------- 1 | 2 | site_name: ZeroNet 3 | site_url: https://zeronet.io 4 | site_description: Decentralized websites using Bitcoin crypto and the BitTorrent network 5 | 6 | extra_css: [docs.css, stylesheets/menu.css] 7 | extra_javascript: [ZeroFrame.js, jquery.min.js, docs.js, javascripts/menu.js] 8 | 9 | repo_url: https://github.com/HelloZeroNet/ZeroNet 10 | 11 | markdown_extensions: 12 | - toc: {permalink: true} 13 | - codehilite 14 | - markdown.extensions.admonition 15 | - pymdownx.superfences 16 | - pymdownx.details 17 | 18 | docs_dir: docs/en 19 | 20 | nav: 21 | - Introduction: "index.md" 22 | - Frequently asked questions: "faq.md" 23 | - Start using ZeroNet: 24 | - "using_zeronet/installing.md" 25 | - "using_zeronet/sample_sites.md" 26 | - "using_zeronet/create_new_site.md" 27 | - Site Development: 28 | - "site_development/getting_started.md" 29 | - "site_development/zeroframe_api_reference.md" 30 | - "site_development/content_json.md" 31 | - "site_development/dbschema_json.md" 32 | - "site_development/cert_authority.md" 33 | - Help ZeroNet development: 34 | - "help_zeronet/contributing.md" 35 | - "help_zeronet/coding_conventions.md" 36 | - "help_zeronet/network_protocol.md" 37 | - "help_zeronet/donate.md" 38 | 39 | 40 | theme: 41 | palette: 42 | primary: "deep purple" 43 | accent: "deep purple" 44 | logo: "logo/zeronet_logo.svg" 45 | name: "material" 46 | favicon: "logo/favicon.ico" 47 | custom_dir: "docs/resources" 48 | 49 | -------------------------------------------------------------------------------- /mkdocs-zh.yml: -------------------------------------------------------------------------------- 1 | 2 | site_name: ZeroNet 3 | site_url: https://zeronet.io 4 | site_description: 使用比特币加密技术与BitTorrent的分布式网络 5 | 6 | repo_url: https://github.com/HelloZeroNet/ZeroNet 7 | edit_uri: ../Documentation/edit/master/docs/zh/ 8 | 9 | extra_css: [docs.css, stylesheets/menu.css] 10 | extra_javascript: [ZeroFrame.js, jquery.min.js, docs.js, javascripts/menu.js] 11 | 12 | docs_dir: docs/zh 13 | site_dir: site 14 | 15 | theme: 16 | language: 'zh' 17 | feature: 18 | tabs: true 19 | palette: 20 | primary: "deep purple" 21 | accent: "deep purple" 22 | logo: "logo/zeronet_logo.svg" 23 | name: "material" 24 | favicon: "logo/favicon.ico" 25 | custom_dir: "docs/resources" 26 | font: false 27 | 28 | markdown_extensions: 29 | - toc: 30 | permalink: true 31 | - codehilite 32 | 33 | plugins: 34 | - search: 35 | lang: ['en'] 36 | 37 | nav: 38 | - 概述: "index.md" 39 | - 常见问题: "faq.md" 40 | - 开始使用ZeroNet: 41 | - "using_zeronet/installing.md" 42 | - "using_zeronet/sample_sites.md" 43 | - "using_zeronet/create_new_site.md" 44 | - 网站开发: 45 | - "site_development/getting_started.md" 46 | - "site_development/zeroframe_api_reference.md" 47 | - "site_development/content_json.md" 48 | - "site_development/dbschema_json.md" 49 | - "site_development/cert_authority.md" 50 | - 帮助开发ZeroNet: 51 | - "help_zeronet/contributing.md" 52 | - "help_zeronet/coding_conventions.md" 53 | - "help_zeronet/network_protocol.md" 54 | - "help_zeronet/donate.md" 55 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | 2 | site_name: ZeroNet 3 | site_url: https://zeronet.io 4 | site_description: Decentralized websites using Bitcoin crypto and the BitTorrent network 5 | 6 | repo_url: https://github.com/HelloZeroNet/ZeroNet 7 | edit_uri: ../Documentation/edit/master/docs/en/ 8 | 9 | extra_css: [docs.css, stylesheets/menu.css] 10 | extra_javascript: [ZeroFrame.js, jquery.min.js, docs.js, javascripts/menu.js] 11 | 12 | docs_dir: docs/en 13 | site_dir: site 14 | 15 | theme: 16 | language: 'en' 17 | palette: 18 | primary: "deep purple" 19 | accent: "deep purple" 20 | logo: "logo/zeronet_logo.svg" 21 | name: "material" 22 | favicon: "logo/favicon.ico" 23 | custom_dir: "docs/resources" 24 | font: false 25 | 26 | markdown_extensions: 27 | - toc: 28 | permalink: true 29 | - codehilite 30 | - markdown.extensions.admonition 31 | - pymdownx.superfences 32 | - pymdownx.details 33 | 34 | plugins: 35 | - search: 36 | lang: ['en'] 37 | 38 | nav: 39 | - Introduction: "index.md" 40 | - Frequently asked questions: "faq.md" 41 | - Start using ZeroNet: 42 | - "using_zeronet/installing.md" 43 | - "using_zeronet/sample_sites.md" 44 | - "using_zeronet/create_new_site.md" 45 | - Site Development: 46 | - "site_development/getting_started.md" 47 | - "site_development/zeroframe_api_reference.md" 48 | - "site_development/content_json.md" 49 | - "site_development/dbschema_json.md" 50 | - "site_development/cert_authority.md" 51 | - Help ZeroNet development: 52 | - "help_zeronet/contributing.md" 53 | - "help_zeronet/coding_conventions.md" 54 | - "help_zeronet/network_protocol.md" 55 | - "help_zeronet/donate.md" 56 | -------------------------------------------------------------------------------- /readthedocs.yml: -------------------------------------------------------------------------------- 1 | # Required 2 | version: 2 3 | 4 | # Build documentation with MkDocs 5 | mkdocs: 6 | configuration: mkdocs-readthedocs.yml 7 | 8 | python: 9 | version: 3.7 10 | install: 11 | - requirements: requirements.txt 12 | 13 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs==1.0.4 2 | mkdocs-material==3.1.0 3 | pymdown-extensions==6.0 4 | -------------------------------------------------------------------------------- /start.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import re 3 | import sys 4 | import webbrowser 5 | 6 | from mkdocs.cli import cli 7 | sys.argv.append("serve") 8 | 9 | webbrowser.open("http://127.0.0.1:8000") 10 | cli() -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mkdocs serve --------------------------------------------------------------------------------