-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation #62
Open
dbrgn
wants to merge
4
commits into
master
Choose a base branch
from
mkdocs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.log | ||
site/ | ||
VENV/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
all: html | ||
|
||
html: | ||
mkdocs build -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# About SaltyRTC | ||
|
||
For more information about the project, please visit | ||
[saltyrtc.org](http://saltyrtc.org). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* Workaround for duplicate headings: https://github.com/mkdocs/mkdocs/issues/318 */ | ||
li.toctree-l3:first-child { | ||
display: none; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SaltyRTC Server | ||
|
||
This is a SaltyRTC server implementation written in Python 3 with asyncio. | ||
|
||
**Contents** | ||
|
||
* [Installing](installing.md) | ||
* [Usage](usage.md) | ||
* [About](about.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Installing | ||
|
||
**Note:** On machines where Python 3 is not the default Python runtime, you | ||
should use `pip3` instead of `pip`. | ||
|
||
## Prerequisites | ||
|
||
You need the following packages installed to be able to run the SaltyRTC | ||
server: | ||
|
||
- python3 | ||
- python3-pip | ||
- libsodium-dev | ||
|
||
## Option A: Installing System-Wide | ||
|
||
Now install `saltyrtc.server` from [PyPI](https://pypi.python.org/): | ||
|
||
$ sudo pip install saltyrtc.server | ||
|
||
## Option B: Installing in a Venv | ||
|
||
If you don't want to install saltyrtc-server-python system-wide, we | ||
recommend using [venv](https://docs.python.org/3/library/venv.html) to create | ||
an isolated Python environment. | ||
|
||
$ python3 -m venv venv | ||
|
||
You can switch into the created virtual environment venv by running this command: | ||
|
||
$ source venv/bin/activate | ||
|
||
While the virtual environment is active, all packages installed using `pip` | ||
will be installed into this environment. | ||
|
||
$ pip install saltyrtc.server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Test Certificates | ||
|
||
To be able to start the SaltyRTC server, you need to specify a TLS key and | ||
certificate. In production you will want to use a certificate signed by a | ||
trusted CA, but for testing purposes, the easiest way is to create a | ||
self-signed certificate. | ||
|
||
## Generating a Test Certificate | ||
|
||
Use the following command to create such a certificate, valid for `localhost` | ||
during the next 90 days: | ||
|
||
$ openssl req \ | ||
-newkey rsa:3072 \ | ||
-x509 \ | ||
-nodes \ | ||
-keyout saltyrtc.key \ | ||
-new \ | ||
-out saltyrtc.crt \ | ||
-subj /CN=localhost \ | ||
-reqexts SAN \ | ||
-extensions SAN \ | ||
-config <(cat /etc/ssl/openssl.cnf \ | ||
<(printf '[SAN]\nsubjectAltName=DNS:localhost')) \ | ||
-sha256 \ | ||
-days 90 | ||
|
||
## Importing | ||
|
||
### Chrome / Chromium | ||
|
||
The best way to import this certificate into Chrome is via the command line: | ||
|
||
$ certutil -d sql:$HOME/.pki/nssdb \ | ||
-A -t "P,," -n saltyrtc-test-ca \ | ||
-i saltyrtc.crt | ||
|
||
Then make sure to restart your browser (or simply visit `chrome://restart`). | ||
|
||
### Firefox | ||
|
||
In Firefox the easiest way to add your certificate to the browser is to start | ||
the SaltyRTC server (e.g. on `localhost` port 8765), then to visit the | ||
corresponding URL via https (e.g. `https://localhost:8765`). Then, in the | ||
certificate warning dialog that pops up, choose "Advanced" and add a permanent | ||
exception. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Usage | ||
|
||
The script `saltyrtc-server` will be automatically installed and provides a | ||
command line interface for the server. Run the following command to see usage | ||
information: | ||
|
||
$ saltyrtc-server --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
site_name: SaltyRTC Server | ||
site_description: Documentation for saltyrtc-server-python. | ||
site_author: Lennart Grahl, Danilo Bargen | ||
copyright: © 2016-2017 saltyrtc-server-python contributors | ||
theme: readthedocs | ||
repo_url: https://github.com/saltyrtc/saltyrtc-server-python | ||
edit_uri: edit/master/docs/docs/ | ||
markdown_extensions: | ||
- smarty | ||
- toc: | ||
permalink: False | ||
pages: | ||
- Home: index.md | ||
- Guide: | ||
- Installing: installing.md | ||
- Usage: usage.md | ||
- Test Certificates: testcerts.md | ||
- About: about.md | ||
theme_dir: theme_overrides | ||
extra_css: | ||
- custom.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mkdocs==0.16.3 | ||
Pygments==2.1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block site_name %} | ||
<img src="https://saltyrtc.org/static/img/shaker.svg" alt="Logo"> | ||
<a href="{{ nav.homepage.url }}" class="icon icon-home"> {{ config.site_name }}</a> | ||
{% endblock %} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're at it, can you patch this in the readme, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^