From 70d820c87595f037f0c17dc525604aaaa0cf148c Mon Sep 17 00:00:00 2001 From: Rick Cogley Date: Sun, 26 Jun 2016 19:07:07 +0900 Subject: Update to reflect new location at github. Additionally it does not appear there is turnserver.conf.default, but rather, just /etc/turnserver.conf. --- docs/turn-howto.rst | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'docs') diff --git a/docs/turn-howto.rst b/docs/turn-howto.rst index e2c73458e2..4f2794111f 100644 --- a/docs/turn-howto.rst +++ b/docs/turn-howto.rst @@ -9,19 +9,21 @@ the Home Server to generate credentials that are valid for use on the TURN server through the use of a secret shared between the Home Server and the TURN server. -This document described how to install coturn -(https://code.google.com/p/coturn/) which also supports the TURN REST API, +This document describes how to install coturn +(https://github.com/coturn/coturn) which also supports the TURN REST API, and integrate it with synapse. coturn Setup ============ +You may be able to setup coturn via your package manager, or set it up manually using the usual ``configure, make, make install`` process. + 1. Check out coturn:: - svn checkout http://coturn.googlecode.com/svn/trunk/ coturn - cd coturn + svn checkout https://github.com/coturn/coturn.git coturn + cd coturn 2. Configure it:: - ./configure + ./configure You may need to install libevent2: if so, you should do so in the way recommended by your operating system. @@ -29,22 +31,21 @@ coturn Setup database is unnecessary for this purpose. 3. Build and install it:: - make - make install + make + make install - 4. Make a config file in /etc/turnserver.conf. You can customise - a config file from turnserver.conf.default. The relevant + 4. Create or edit the config file in ``/etc/turnserver.conf``. The relevant lines, with example values, are:: - lt-cred-mech - use-auth-secret - static-auth-secret=[your secret key here] - realm=turn.myserver.org + lt-cred-mech + use-auth-secret + static-auth-secret=[your secret key here] + realm=turn.myserver.org - See turnserver.conf.default for explanations of the options. + See turnserver.conf for explanations of the options. One way to generate the static-auth-secret is with pwgen:: - pwgen -s 64 1 + pwgen -s 64 1 5. Ensure youe firewall allows traffic into the TURN server on the ports you've configured it to listen on (remember to allow @@ -54,7 +55,7 @@ coturn Setup import your private key and certificate. 7. Start the turn server:: - bin/turnserver -o + bin/turnserver -o synapse Setup @@ -91,3 +92,4 @@ Now, restart synapse:: ./synctl restart ...and your Home Server now supports VoIP relaying! + -- cgit 1.4.1 From 551fe80bed666cf89225d650915391bbca84c165 Mon Sep 17 00:00:00 2001 From: Rick Cogley Date: Tue, 28 Jun 2016 12:47:55 +0900 Subject: Remove double spaces Reading the RST spec, I was trying to get breaks to appear by entering the double spaces after the lines in the code blocks. It does not work anyway, and, as pointed out, I've removed. --- docs/turn-howto.rst | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'docs') diff --git a/docs/turn-howto.rst b/docs/turn-howto.rst index 4f2794111f..f0c5601ea0 100644 --- a/docs/turn-howto.rst +++ b/docs/turn-howto.rst @@ -19,11 +19,11 @@ coturn Setup You may be able to setup coturn via your package manager, or set it up manually using the usual ``configure, make, make install`` process. 1. Check out coturn:: - svn checkout https://github.com/coturn/coturn.git coturn - cd coturn + svn checkout https://github.com/coturn/coturn.git coturn + cd coturn 2. Configure it:: - ./configure + ./configure You may need to install libevent2: if so, you should do so in the way recommended by your operating system. @@ -31,21 +31,21 @@ You may be able to setup coturn via your package manager, or set it up manually database is unnecessary for this purpose. 3. Build and install it:: - make - make install + make + make install 4. Create or edit the config file in ``/etc/turnserver.conf``. The relevant lines, with example values, are:: - lt-cred-mech - use-auth-secret - static-auth-secret=[your secret key here] - realm=turn.myserver.org + lt-cred-mech + use-auth-secret + static-auth-secret=[your secret key here] + realm=turn.myserver.org See turnserver.conf for explanations of the options. One way to generate the static-auth-secret is with pwgen:: - pwgen -s 64 1 + pwgen -s 64 1 5. Ensure youe firewall allows traffic into the TURN server on the ports you've configured it to listen on (remember to allow @@ -55,7 +55,7 @@ You may be able to setup coturn via your package manager, or set it up manually import your private key and certificate. 7. Start the turn server:: - bin/turnserver -o + bin/turnserver -o synapse Setup @@ -92,4 +92,3 @@ Now, restart synapse:: ./synctl restart ...and your Home Server now supports VoIP relaying! - -- cgit 1.4.1 From 1ea358b28b46edffdf62a52e8a2b3faf8b2aae1d Mon Sep 17 00:00:00 2001 From: Rick Cogley Date: Tue, 28 Jun 2016 18:27:54 +0900 Subject: Update turn-howto.rst to use git clone svn checkout is not logical for a checkout from github, so changed the checkout to "git clone". thanks @dbkr Signed-off-by: Rick Cogley --- docs/turn-howto.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/turn-howto.rst b/docs/turn-howto.rst index f0c5601ea0..afddebd53a 100644 --- a/docs/turn-howto.rst +++ b/docs/turn-howto.rst @@ -19,7 +19,7 @@ coturn Setup You may be able to setup coturn via your package manager, or set it up manually using the usual ``configure, make, make install`` process. 1. Check out coturn:: - svn checkout https://github.com/coturn/coturn.git coturn + git clone https://github.com/coturn/coturn.git coturn cd coturn 2. Configure it:: -- cgit 1.4.1 From 56ec5869c98c97869f908c0309d2f9c4b648eda2 Mon Sep 17 00:00:00 2001 From: Rick Cogley Date: Tue, 28 Jun 2016 18:34:38 +0900 Subject: Update turn-howto.rst to use git clone (2) Not logical to use svn checkout against a github repo, so changed to git clone. Signed-off-by: Rick Cogley --- docs/turn-howto.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/turn-howto.rst b/docs/turn-howto.rst index afddebd53a..04c0100715 100644 --- a/docs/turn-howto.rst +++ b/docs/turn-howto.rst @@ -19,18 +19,21 @@ coturn Setup You may be able to setup coturn via your package manager, or set it up manually using the usual ``configure, make, make install`` process. 1. Check out coturn:: + git clone https://github.com/coturn/coturn.git coturn cd coturn 2. Configure it:: + ./configure - You may need to install libevent2: if so, you should do so + You may need to install ``libevent2``: if so, you should do so in the way recommended by your operating system. You can ignore warnings about lack of database support: a database is unnecessary for this purpose. 3. Build and install it:: + make make install @@ -55,6 +58,7 @@ You may be able to setup coturn via your package manager, or set it up manually import your private key and certificate. 7. Start the turn server:: + bin/turnserver -o -- cgit 1.4.1 From 5a6ef20ef625f1ac2cfb4011ce75ca9453b6a70e Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 1 Jul 2016 09:08:35 +0100 Subject: code_style.rst: add link to google style --- docs/code_style.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/code_style.rst b/docs/code_style.rst index dc40a7ab7b..8cde76149a 100644 --- a/docs/code_style.rst +++ b/docs/code_style.rst @@ -43,7 +43,8 @@ Basically, PEP8 together, or want to deliberately extend or preserve vertical/horizontal space) -Comments should follow the google code style. This is so that we can generate -documentation with sphinx (http://sphinxcontrib-napoleon.readthedocs.org/en/latest/) +Comments should follow the `google code style `_. +This is so that we can generate documentation with +`sphinx `_. Code should pass pep8 --max-line-length=100 without any warnings. -- cgit 1.4.1 From 41f072fd0ee62e1df37ad8bb98489395a32ca6d3 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 1 Jul 2016 09:09:40 +0100 Subject: code_style.rst: *fix* link to google style --- docs/code_style.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/code_style.rst b/docs/code_style.rst index 8cde76149a..39710ab4ae 100644 --- a/docs/code_style.rst +++ b/docs/code_style.rst @@ -43,7 +43,7 @@ Basically, PEP8 together, or want to deliberately extend or preserve vertical/horizontal space) -Comments should follow the `google code style `_. +Comments should follow the `google code style `_. This is so that we can generate documentation with `sphinx `_. -- cgit 1.4.1 From 1238203bc47166d1d4ca686e108e84add3bf98b4 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 1 Jul 2016 09:36:51 +0100 Subject: code_style.rst: add link to sphinx examples --- docs/code_style.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/code_style.rst b/docs/code_style.rst index 39710ab4ae..8d73d17beb 100644 --- a/docs/code_style.rst +++ b/docs/code_style.rst @@ -45,6 +45,8 @@ Basically, PEP8 Comments should follow the `google code style `_. This is so that we can generate documentation with -`sphinx `_. +`sphinx `_. See the +`examples `_ +in the sphinx documentation. Code should pass pep8 --max-line-length=100 without any warnings. -- cgit 1.4.1 From 367b594183c553436bb0338e9f26e42fa46424dc Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 28 Jul 2016 14:56:09 +0100 Subject: Add some basic admin API docs --- docs/admin_api/README.rst | 12 ++++++++++++ docs/admin_api/purge_history_api.rst | 15 +++++++++++++++ docs/admin_api/purge_remote_media.rst | 19 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 docs/admin_api/README.rst create mode 100644 docs/admin_api/purge_history_api.rst create mode 100644 docs/admin_api/purge_remote_media.rst (limited to 'docs') diff --git a/docs/admin_api/README.rst b/docs/admin_api/README.rst new file mode 100644 index 0000000000..d4f564cfae --- /dev/null +++ b/docs/admin_api/README.rst @@ -0,0 +1,12 @@ +Admin APIs +========== + +This directory includes documentation for the various synapse specific admin +APIs available. + +Only users that are server admins can use these APIs. A user can be marked as a +server admin by updating the database directly, e.g.: + +``UPDATE users SET admin = 1 WHERE name = '@foo:bar.com'`` + +Restarting may be required for the changes to register. diff --git a/docs/admin_api/purge_history_api.rst b/docs/admin_api/purge_history_api.rst new file mode 100644 index 0000000000..986efe40f9 --- /dev/null +++ b/docs/admin_api/purge_history_api.rst @@ -0,0 +1,15 @@ +Purge History API +================= + +The purge history API allows server admins to purge historic events from their +database, reclaiming disk space. + +Depending on the amount of history being purged a call to the API may take +several minutes or longer. During this period users will not be able to +paginate further back in the room from the point being purged from. + +The API is simply: + +``POST /_matrix/client/r0/admin/purge_history//`` + +including an ``access_token`` of a server admin. diff --git a/docs/admin_api/purge_remote_media.rst b/docs/admin_api/purge_remote_media.rst new file mode 100644 index 0000000000..749ed1b2b9 --- /dev/null +++ b/docs/admin_api/purge_remote_media.rst @@ -0,0 +1,19 @@ +Purge Remote Media API +====================== + +The purge remote media API allows server admins to purge old cached remote +media. + +The API is:: + + POST /_matrix/client/r0/admin/purge_history/ + + { + "before_ts": + } + +Which will remove all cached media that was last accessed before +````. + +If the user re-requests purged remote media, synapse will re-request the media +from the originating server. -- cgit 1.4.1 From 3c3246c078134124610afa40ec55626568c5627c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 28 Jul 2016 15:08:37 +0100 Subject: Use correct path --- docs/admin_api/purge_remote_media.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/admin_api/purge_remote_media.rst b/docs/admin_api/purge_remote_media.rst index 749ed1b2b9..b26c6a9e7b 100644 --- a/docs/admin_api/purge_remote_media.rst +++ b/docs/admin_api/purge_remote_media.rst @@ -6,7 +6,7 @@ media. The API is:: - POST /_matrix/client/r0/admin/purge_history/ + POST /_matrix/client/r0/admin/purge_media_cache { "before_ts": -- cgit 1.4.1