Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep

This commit is contained in:
pluja 2020-09-06 22:33:56 +02:00
commit c009ce45fa
2 changed files with 24 additions and 1 deletions

View File

@ -81,8 +81,12 @@ I always recommend self-hosting, as you will be the only person with access to t
# Self hosting # Self hosting
If you want to set up a public server you should follow the instructions [HERE](#hosting-on-a-server). The following instructions are for personal use only.
## Local ## Local
You can run Yotter locally on your machine for personal use. You should use a VPN in order to cloak your IP.
##### IMPORTANT: Connections from the server to googlevideo will be made to stream the videos. It is recommended to use a VPN to preserve your privacy. Understand that the best way of using Yotter is [running on a remote server](#hosting-on-a-server). ##### IMPORTANT: Connections from the server to googlevideo will be made to stream the videos. It is recommended to use a VPN to preserve your privacy. Understand that the best way of using Yotter is [running on a remote server](#hosting-on-a-server).
1. Install `python3`, `pip3`, `python3-venv` (optional) and `git`. 1. Install `python3`, `pip3`, `python3-venv` (optional) and `git`.
@ -119,6 +123,9 @@ I always recommend self-hosting, as you will be the only person with access to t
9. Go to "http://localhost:5000/" and enjoy. 9. Go to "http://localhost:5000/" and enjoy.
## Using Docker: ## Using Docker:
Note: Not for a production server.
##### Building using the Dockerfile ##### Building using the Dockerfile
> (May not work on Windows) > (May not work on Windows)
@ -148,8 +155,9 @@ I always recommend self-hosting, as you will be the only person with access to t
3. Go to "http://localhost:5000/" and enjoy. 3. Go to "http://localhost:5000/" and enjoy.
## Hosting on a server: # Hosting on a server:
If you want to set up a Yotter public instance, follow this instructions.
#### [VISIT THIS FILE FOR INSTRUCTIONS](https://github.com/pluja/Yotter/blob/dev-indep/SELF-HOSTING.md) #### [VISIT THIS FILE FOR INSTRUCTIONS](https://github.com/pluja/Yotter/blob/dev-indep/SELF-HOSTING.md)
## Updating to newer versions: ## Updating to newer versions:

View File

@ -165,3 +165,18 @@ Updating the server should always be pretty easy:
(venv) $ pip install -r requirements.txt (venv) $ pip install -r requirements.txt
(venv) $ sudo supervisorctl start yotter (venv) $ sudo supervisorctl start yotter
``` ```
## Other configurations
### Removing log-in restrictions
> (NOT TESTED - COULD CRASH THE APP) Note that some routes make usage of the `current_user` variable to look if the current user is following some user or not, if you remove the restriction for such routes the app will crash. This will be solved on future releases.
For the example, let's allow for anyone to watch a video on our instance. Even if they aren't registered users. First we need to find the route that we want to allow, you can do it by navigating to the page and taking a look at the URL. Anything after the first `/` is the app route. When we're watching a video, the route is `/watch?v=<videoId>`.
Now on the file `routes.py` we will search for the code that the server runs when we navigate to that route. You can use the Find function on your text editor and search for `/watch`. Now, you will see that right below the definition of the route, `@app.route('/watch')`, there is a `@login_required` line. If you delete that line, no restriction will now be applied to that route.
But you must know that videos and images are proxied through the instance. So we will need to allow another route. For video streaming, the route is `/stream` and for images it is `/img`. So you just need to delete the `login_required` from those two other routes.
You can now reload the server and you will see that, without logging in, you can now watch videos.