A database-based CDN node supporting PostgreSQL and MongoDB backends.

Overview

cloudflare cloud

imoog

A simple to use database-based deployable CDN node for hobbyist developers who wish to have their own CDN!

Setup


  • Clone this repo via this command: git clone https://github.com/justanotherbyte/imoog
  • Go into the imoog/settings.py file and adjust your settings. Examples for both database drivers have been provided in the file.
  • Install a production asgi server of your choice. The 2 I recommend are hypercorn and uvicorn. Installing their base packages will suffice.
  • To automatically install the respective dependencies, please run pip install -r requirements.txt in the directory where you wish to store your node.
  • It is recommended to house the imoog folder within another folder, as there are other files that come with this repo, that are not housed within the imoog folder.

Settings

  • imoog offers granular control over many key aspects of the node. Most of these can be extremely overwhelming. Go ahead and hop into the imoog/settings.py file, where you'll find detailed explanations of each and every setting.
  • Another thing that can be overwhelming are the 2 database drivers. How do you configure them? What are their optimal settings. Again, everything is explained inside the imoog/settings.py file.

Proxy


  • In order to use this node cleanly, I recommend placing yourself behind a proxy server. One of the most popular choices is NGINX.

Caching + Cloudflare


  • The Imoog Node handles a lot of the caching for you, however, a good next step would be to place your CDN on cloudflare.
  • Cloudflare has some awesome caching solutions. Also, overall, they make it easy to expose your CDN to the open-web.

Uploading Files


This Node receives files via multipart/form-data. So it's best if you were to adapt your upload system to this. The field name the node expects is just file, so please upload it with this name. Please remember to register the Authorization header. This key can be set in the imoog/settings.py file.

Upload example (aiohttp)

import aiohttp
import asyncio


async def main():
    session = aiohttp.ClientSession()
    form  = aiohttp.FormData()
    form.add_field("file", b'imagebyteshere', content_type="bytes")
    resp = await session.post("http://localhost:8000/upload", data=form, headers={"Authorization": "myawesomesecretkey"})
    returned_data = await resp.json()
    print(returned_data)
    await session.close()

asyncio.get_event_loop().run_until_complete(main())
>>> {'status': 200, 'file_id': 'FSTSH2RPI'}

Driver and dependency information

Internally, imoog uses 2 different libraries for the 2 different supported database drivers.

Both of these libraries are currently the best in their field for asynchronous client side connections to their respective databases.

You might also like...
Network-Shredder is a python based NIDS.
Network-Shredder is a python based NIDS.

Network-Shredder is a python based NIDS.

Simple Port Scanner script written in Python, plans is to expand upon this script to turn it into a GUI based pen testing suite

PortScanner Simple Port Scanner script written in Python, plans is to expand upon this script to turn it into a GUI based pen testing suite. #IMPORTAN

Tool to get the top 100 of the fastest nodes in the Tor network. Based on Kirzahk tool.
Tool to get the top 100 of the fastest nodes in the Tor network. Based on Kirzahk tool.

Tor Network Top 100 IPs Tool to get the top 100 of the fastest nodes in the Tor network. Based on Kirzahk tool. Just execute top100ipstor.py to get th

This is a zeep based SOAP client wrapper for simple communication with the Bricknode SOAP API.

This is a zeep based SOAP client wrapper for simple communication with the Bricknode SOAP API.

Connects to databases or sftp server based on configured environmental variables.

Myconnections Connects to Oracle databases or sftp servers depending on configured environmental variables. VERY IMPORTANT: VPN must exist. Installati

A simple electrical network analyzer, BASED ON computer-aided design.
A simple electrical network analyzer, BASED ON computer-aided design.

Electrical Network Analyzer A simple electrical network analyzer. Given the oriented graph of the electrical network (circut), BASED ON computer-aided

A simple Encrypted IM chat software Server & client based on Python3.

SecretBox A simple Encrypted IM chat software Server & client based on Python3. Version 1.0 命令行版 安装步骤 Server 运行pip3 install -r requirements 安装依赖。 运行py

TsuserverMoS - A Python-based server for Attorney Online,

tsuserverMoS A Python-based server for Attorney Online, forked from RealKaiser/tsuserverCC Requires Python 3.7+ and PyYAML. Changes/additions from tsu

Serves some data over HTTP, once. Based on the built-in Python module http.server

serve-me-once Serves some data over HTTP, once. Based on the built-in Python module http.server.

Comments
  • Don't need async definition in conection. (Sourcery refactored)

    Don't need async definition in conection. (Sourcery refactored)

    Pull Request #3 refactored by Sourcery.

    Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

    To incorporate these changes, you can either:

    1. Merge this Pull Request instead of the original, or

    2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

      Incorporate changes via command line
      git fetch https://github.com/justanotherbyte/imoog pull/3/head
      git merge --ff-only FETCH_HEAD
      git push

    NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
  • Fix some psql stuff

    Fix some psql stuff

    This fixes some psql fixes on database/postgres.py file.

    1. Add table on connect in postgresql if it does not exist.
    2. Fix invalid psql statements such as: Having name but passing image instead
      DELETE FROM {table_name}
      - WHERE image = $1
      + WHERE name = $1
      

      Trying to get mime but only image is passed in SELECT statement

      - SELECT image FROM {table_name}
      + SELECT image, mime FROM {table_name}
      WHERE image = $1
      
    opened by proguy914629bot 1
  • some fixes (Sourcery refactored)

    some fixes (Sourcery refactored)

    Pull Request #6 refactored by Sourcery.

    Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

    To incorporate these changes, you can either:

    1. Merge this Pull Request instead of the original, or

    2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

      Incorporate changes via command line
      git fetch https://github.com/justanotherbyte/imoog pull/6/head
      git merge --ff-only FETCH_HEAD
      git push

    NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
  • Docker Image

    Docker Image

    Hi, I'm writing an issue in hopes to hear if there are any plans for a Docker image.

    Why? Docker is only getting more and more popular, especially among self-hosters. It allows them to setup a service within a matter of seconds.

    If need be I'd be okay trying to make something for this.

    Preferably there'd be multiple images, each one for Redis, PostgreSQL, and MongoDB.

    Thank you.

    opened by kaylynnnn 1
Releases(v1.1.1)
Owner
Vish M
Hey! I'm Vish, an avid Discord Bot Developer. I primarily work in Python, but I sometimes use HTML and CSS. Pronouns: he/him
Vish M
Network monitoring tool

netmeter If you are looking for a tool to monitor your network interfaces, here you are. See netmeter-exporter to export Prometheus metrics. Installat

Saeid Bostandoust 97 Dec 03, 2022
A Network tool kit for scanning active IP addresses and open ports

Network scanner A small project that I wrote on the fly for (IT351) Computer Networks University Course to identify and label the devices in my networ

Mohamed Abdelrahman 10 Nov 07, 2022
A fully automated, accurate, and extensive scanner for finding log4j RCE CVE-2021-44228

log4j-scan A fully automated, accurate, and extensive scanner for finding vulnerable log4j hosts Features Support for lists of URLs. Fuzzing for more

FullHunt 3.2k Jan 02, 2023
snappi-trex is a snappi plugin that allows executing scripts written using snappi with Cisco's TRex Traffic Generator

snappi-trex snappi-trex is a snappi plugin that allows executing scripts written using snappi with Cisco's TRex Traffic Generator Design snappi-trex c

Open Traffic Generator 14 Sep 07, 2022
ServerStatus with node management and monitor

ServerStatus with node management and monitor

lidalao 162 Jan 01, 2023
Tool for ROS 2 IP Discovery + System Monitoring

Monitor the status of computers on a network using the DDS function of ROS2.

Ar-Ray 33 Apr 03, 2022
Test - Python project for Collection Server and API Server

QProjectPython Collection Server 와 API Server 를 위한 Python 프로젝트 입니다. [FastAPI참고]

1 Jan 03, 2022
API Server for VoIP analysis (CDR + Audio CODECs)

Swagger generated server Overview This server was generated by the swagger-codegen project. By using the OpenAPI-Spec from a remote server, you can ea

Noor Muhammad Malik 1 Jan 11, 2022
A vpn that sits in your browser, accessible via a website

VPNInYourBrowser A vpn that sits in your browser, accessible via a website Example setup: https://VPNInBrowser.jaffa42.repl.co Setup Put the code onto

1 Jan 20, 2022
It's an extra broadcast driver for masonite. It adds support for socketio.

It's an extra broadcast driver for masonite. It adds support for socketio.

Yubaraj Shrestha 6 Feb 23, 2022
A simple tool to get information about IP

IP Info Tool Just a simple tool to get IP's information, it uses requests module to gather information about IP, if you dont have much knowledge about

0 Dec 01, 2021
Octodns-cloudflare - Cloudflare DNS provider for octoDNS

CloudflareProvider provider for octoDNS An octoDNS provider that targets Cloudfl

octoDNS 6 May 28, 2022
RollerScanner — Fast Port Scanner Written On Python

RollerScanner RollerScanner — Fast Port Scanner Written On Python Installation You should clone this repository using: git clone https://github.com/Ma

68 Nov 09, 2022
A python socket.io client for Roboteur

Roboteur Client Example TODO Basic setup Install the requirements: $ pip install -r requirements.txt Run the application: $ python -m roboteur_client

Barry Buck 1 Oct 13, 2021
BlueHawk is an HTTP/1.1 compliant web server developed in python

This project is done as a part of Computer Networks course. It aims at the implementation of the HTTP/1.1 Protocol based on RFC 2616 and includes the basic HTTP methods of GET, POST, PUT, DELETE and

2 Nov 11, 2022
A library of functions that can be used to manage the download of claims from the LBRY network.

lbrytools A library of functions that can be used to manage the download of claims from the LBRY network. It includes methods to download claims by UR

13 Dec 03, 2022
Simple client for the Sirah Matisse Commander TCP server.

Simple client for the Sirah Matisse Commander TCP server.

Nelson Darkwah Oppong 1 Nov 02, 2021
GlokyPortScannar is a really fast tool to scan TCP ports implemented in Python.

GlokyPortScannar is a really fast tool to scan TCP ports implemented in Python. Installation: This program requires Python 3.9. Linux

gl0ky 5 Jun 25, 2022
Way find out if DNS is down or your instance

DNS-PING Way to find out if DNS is down or your instance Problem: At times it happens that DNS provider services of a website URL is down and so to re

Giten Mitra 4 Nov 18, 2022
A library for interacting with APNs and VoIP using HTTP/2.

kalyke A library for interacting with APNs and VoIP using HTTP/2. Installation kalyke requires python 3.6 or later. $ pip install kalyke-apns Usage AP

Yuya Oka 11 Dec 08, 2022