Giter Club home page Giter Club logo

anonstream's Introduction

anonstream

Recipe for livestreaming over Tor

Repo

The canonical location of this repo is https://gitler.moe/ninya9k/anonstream.

These mirrors also exist:

Setup

You must have Python 3.10 at a minimum. You can check your version of Python with python --version.

Clone the repo:

git clone https://gitler.moe/ninya9k/anonstream.git
cd anonstream

Install dependencies in a virtual environment:

python -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt

This is all the setup needed to run the application, but before you do you may want to edit the config. Most of the defaults are probably okay, but here are some that you might want to know what they do:

  • secret_key: used for cryptography, make it any long random string (e.g. $ dd if=/dev/urandom bs=16 count=1 | base64), definitely set this yourself before running in "production"

  • segments/directory: directory containing stream segments, the default is stream/ in the cloned repository

  • title/file: location of the stream title, the default is title.txt in the cloned repository

  • captcha/fonts: locations of fonts for the captcha, leaving it blank will use the default font

  • access/captcha: if true, users must complete a captcha before accessing the site proper

Run it:

python -m anonstream

This will start a webserver listening on the local host at port 5051 (use --port PORT to override).

If you go to http://localhost:5051 in a web browser now you should see the site. When you started the webserver some credentials were printed in the terminal; you can log in with those at http://localhost:5051/login.

The only things left are (1) streaming, and (2) letting other people access your stream. OBS.md has instructions for setting up OBS Studio and ONIONSITE.md has instructions for creating a Tor onion service. If you want to use different streaming software and put your stream on the Internet some other way, read those instructions and copy the gist.

Running

Start anonstream like this:

python -m anonstream

The default port is 5051. Append --help to see options.

If you want to use a different ASGI server, point it to the app factory at asgi:create_app(). For example with uvicorn:

python -m uvicorn asgi:create_app --factory --port 5051

In either case you can explicitly set the location of the config file using the ANONSTREAM_CONFIG environment variable.

Hacking

anonstream has APIs for accessing internal state and hooking into internal events. They can be used by humans and other programs. See HACKING.md.

Copying

anonstream is AGPL 3.0 or later, see LICENSES/AGPL-3.0-or-later.md.

Assets

Dependencies

anonstream's People

Contributors

ninya9k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.