Giter VIP home page Giter VIP logo

streamingserver's Introduction

StreamingServer

A simple video streaming services with authentication using redis

License Version Code size Repo size Issue open Issue closed Codacy Badge Go Report Card GoDoc

Introduction

This project is developed for have a plug-and-play video streaming server delegated to expose all the films downloaded from you main computer. With this tool, you can save all of you preterits films, song, videos into your PC. Then, you can view these media from anywhere using an internet connection.

The server have a basic authentication system. One endpoint is delegated to register a user, another one is delegated to manage the log-in phase.

Another endpoint is delegated to verify the account, so before that an account is able to stream your resources, you have to verify that the account is related to someone that you know

Requirements

  • GoGPUtils Enhance productivity and avoid to reinvent the wheel every time that you start a Go project
  • redis Type-safe Redis client for Golang
  • fasthttp Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
  • logrus Structured, pluggable logging for Go.
  • filename Hooks for logrus logging

Table Of Contents

Prerequisites

The software is coded in golang, into the go.mod file are saved the necessary dependencies. In order to download all the dependencies, you can type the following string from your terminal

go get -v -u all

Usage

In Details

tree
.
├── auth
│   └── authutils.go
├── conf                            // Folder that contains the configuration files 
│   ├── ssl                         // Folder that contains the certificate for the SSL connection
│   │   ├── localhost.crt
│   │   └── localhost.key
│   └── test.json                   // File that contain the configuration related to the tool
├── crypt                           
│   └── basiccrypt.go               // basiccrypt contain the necessary method to encrypt/decrypt data
├── database
│   └── redis
│       └── basicredis.go           // basicredis contain the necessary method to deal with save/load/update data from/to redis
├── datastructures
│   └── datastructures.go           // datastructures contain the necessary datastructure used among all the project
├── docker-compose.yml
├── Dockerfile
├── go.mod
├── go.sum
├── log
├── main.go
├── README.md
└── utils
    ├── common
    │   └── commonutils.go          // commonutils contain a bunch of method used as utils
    └── http
        └── httputils.go            // httputils contain the core method related to the HTTP functionalities

Example response

TODO

Contributing

  • Feel free to open issue in order to require new functionality;
  • Feel free to open issue if you discover a bug;
  • New idea/request/concept are very appreciated!;

Test

Test are work in progress, is a good first issue for contribute to the project

Versioning

We use SemVer for versioning.

Authors

Contributors

  • Alessio Savi

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

Security, in this phase of the development, is not my first concern. Please, fill an issue if you find something that can be enhanced from a security POV

streamingserver's People

Contributors

alessiosavi avatar dependabot-preview[bot] avatar mend-bolt-for-github[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

streamingserver's Issues

Show IP address on start

Is your feature request related to a problem? Please describe

In order to understand which address is delegated to expose the service, print the internal IP and the external IP during the startup

Describe the solution you'd like

TODO

CVE-2022-21221 (High) detected in github.com/valyala/fasthttp-fa3e5d85f29586ec8fbc8a93508c57f98a1ee476 - autoclosed

CVE-2022-21221 - High Severity Vulnerability

Vulnerable Library - github.com/valyala/fasthttp-fa3e5d85f29586ec8fbc8a93508c57f98a1ee476

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Dependency Hierarchy:

  • github.com/valyala/fasthttp-fa3e5d85f29586ec8fbc8a93508c57f98a1ee476 (Vulnerable Library)

Found in base branch: master

Vulnerability Details

The package github.com/valyala/fasthttp before 1.34.0 are vulnerable to Directory Traversal via the ServeFile function, due to improper sanitization. It is possible to be exploited by using a backslash %5c character in the path. Note: This security issue impacts Windows users only.

Publish Date: 2022-03-17

URL: CVE-2022-21221

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21221

Release Date: 2022-03-17

Fix Resolution: v1.34.0


Step up your Open Source Security Game with Mend here

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.