@@ -65,7 +65,7 @@ The data provided (per each requested URL handled by the ServiceWorker) is:
-`url`– the URL of the request
-`serviceWorker`– the commit SHA of the ServiceWorker that handled the request
-`fetchError`–`null` if the request completed successfully via regular HTTPS; otherwise the error message
-`method`– the method by which the request was completed: "`fetch`" is regular HTTPS `fetch()`, `gun+ipfs` means Gun and IPFS were used, etc.
-`method`– the method by which the request was completed: "`fetch`" is regular HTTPS `fetch()`, `gun-ipns` means Gun and IPFS were used, etc.
-`state`– the state of the request (`running`, `error`, `success`)
The code in the browser window context is responsible for keeping a more permanent record of the URLs requested, the methods used, and the status of each, if needed.
Samizdat deployment is currently mostly a manual process. It involves:
1. getting the code
1. creating a [Gun](https://gun.eco/) account to push content addresses to
1. replacing the Gun account public key in the `gun+ipfs` plugin code
1. replacing the Gun account public key in the `gun-ipns` plugin code
1. deploying the code to your server
This is highly suboptimal; work is being done to design and implement a process that is more user-friendly and automated. In the meantime, you can deploy Samizdat by following these steps.
@@ -149,7 +149,7 @@ When a request is made, plugins are used to handle it in the order defined in co
1. retrieval from local `cache`;
1. any other transport plugins (`IPFS`, or fetching content from other pre-configured endpoints).
It is up to the website admin's to configure the plugins in a way that makes sense. For example, if using the [`gun+ipfs`](./../plugins/gun-ipfs.js) plugin, the admin needs to create a Gun account and populate the plugin's Gun public key variable. If using `IPNS`, the admin needs to populate the `IPNS` public key in the respective plugin. And if alternative HTTPS endpoints are used, it's up to the admin to populate their URLs.
It is up to the website admin's to configure the plugins in a way that makes sense. For example, if using the [`gun-ipns`](./../plugins/gun-ipfs.js) plugin, the admin needs to create a Gun account and populate the plugin's Gun public key variable. If using `IPNS`, the admin needs to populate the `IPNS` public key in the respective plugin. And if alternative HTTPS endpoints are used, it's up to the admin to populate their URLs.
Examples of possible alternative HTTPS locations:
- an IP address or a domain controlled by the admin that is not linked to the original website and thus can be expected not to be blocked;
...
...
@@ -161,7 +161,7 @@ Examples of possible alternative HTTPS locations:
For content to be available for retrieval by transport plugins, it first needs to be published to whatever locations it is going to be retrieved from.
For the `gun+ipfs` plugin, for instance, content needs to first be published in IPFS, and then the IPFS addresses for each file need to be published to Gun. Currently it is an involved process (example is available in the [CI/CD configuration for the project](./../.gitlab-ci.yml)); making it simpler and easier is the focus of current development.
For the `gun-ipns` plugin, for instance, content needs to first be published in IPFS, and then the IPFS addresses for each file need to be published to Gun. Currently it is an involved process (example is available in the [CI/CD configuration for the project](./../.gitlab-ci.yml)); making it simpler and easier is the focus of current development.
For plugins relying on fetching content from alternative HTTPS locations, this can be as simple as deploying the content to the alternative IP address or domain name, pushing the content to WebArchive, putting the content in the Google Drive folder, or uploading it to the CloudFront location.
<p>The list below contains all resources fetched in relation to this page.</p>
<ulclass="samizdat-fetched-resources-list"></ul>
<pclass="samizdat-fetched-resources-list-empty">The list is empty, but if the ServiceWorker is running it should be populated soon.</p>
<pclass="samizdat-fetched-resources-controls"><buttontype="button"onclick="samizdat.toggleResourceCheckboxes()">Toggle selection</button><spanclass="spacer"></span><buttontype="button"onclick="samizdat.stashOrUnstashResources(true)">Add selected to cache</button><buttontype="button"onclick="samizdat.stashOrUnstashResources(false)">Clear selected from cache</button><spanclass="spacer"></span><inputtype="text"placeholder="Gun username"id="samizdat-gun-user"/><inputtype="password"placeholder="Gun password"id="samizdat-gun-password"/><buttontype="button"onclick="samizdat.publishResourcesToGunAndIPFS()">Publish to Gun+IPFS</button></p>
<pclass="samizdat-fetched-resources-controls"><buttontype="button"onclick="samizdat.toggleResourceCheckboxes()">Toggle selection</button><spanclass="spacer"></span><buttontype="button"onclick="samizdat.stashOrUnstashResources(true)">Add selected to cache</button><buttontype="button"onclick="samizdat.stashOrUnstashResources(false)">Clear selected from cache</button><spanclass="spacer"></span><inputtype="text"placeholder="Gun username"id="samizdat-gun-user"/><inputtype="password"placeholder="Gun password"id="samizdat-gun-password"/><buttontype="button"onclick="samizdat.publishResourcesToGunAndIPFS()">Publish to Gun and IPFS</button></p>
</div>
<pid="footer">ServiceWorker: <spanclass="samizdat-commit-service-worker">NO_INFO</span> :: index.html: <spanclass="samizdat-commit-index-html">COMMIT_UNKNOWN</span><br/>code: <spanid="samizdat-code"><ahref="https://0xacab.org/rysiek/samizdat/">here</a></span> :: news: <spanid="samizdat-news"><ahref="https://mastodon.social/tags/Samizdat">on Fediverse</a></span> :: license: <spanid="samizdat-license"><ahref="https://0xacab.org/rysiek/samizdat/blob/master/LICENSE">AGPL</a></span><br/><spanid="samizdat-code-of-conduct"><ahref="https://0xacab.org/rysiek/samizdat/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a></span></p>