Use Fast Redirect to easily redirect your domains.

Overview

Fast Redirect

Use Fast Redirect to easily redirect your domains.

Fast Redirects expects a JSON 'database'. This JSON 'database' contains the domains to be redirected. Fast Redirect then redirects traffic as configured.

Fast Redirect uses Starlette, a high-performance ASGI framework. Your redirects are lightning fast. Requirements for all environments can be found in the requirements directory.

How to use

Install

We recommend running Fast Redirect in a venv. The package has been published to PyPI, so you could install it with pip3 install fast-redirect.

Run

All configuration variables can be found in the .env.example file. Only one configuration variable is required to be set: DATABASE_PATH. We recommend setting it to /var/lib/fast-redirect.json. Configuration variables can be set in an .env file or be passed as environment variables.

Run bin/fast-redirect to start the server. By default, it listens on port 8080 and binds to ::1 (IPv6). The server can be daemonized. An example systemd configuration can be found in fast-redirect.service.

JSON Database

The JSON database contains a redirects object. In turn, this object contains an object for each redirect with the following properties:

  • destination_url. The URL to redirect to. Query parameters and the path may be appended (see other options). This must be a URL (i.e. www.domlimev.nl is invalid).
  • status_code. Allowed values 301, 302 and 303.
  • keep_query_parameters. Whether query parameters are kept. If this is false, query parameters are discarded from the destination_url. For example, if this is false, https://domlimev.nl/page?k=v would be redirected to https://example.com.
  • keep_path. Whether the path is kept. If this is false, the path is discarded from the destination_url. For example, if this is false, https://domlimev.nl/this/is/a/path would be redirected to https://example.com.

In case a redirect is misconfigured, the error is returned to the visitor.

Example JSON database:

{
  "redirects": {
    "domlimev.nl": {
      "destination_url": "https://example.com",
      "status_code": 301,
      "keep_query_parameters": true,
      "keep_path": true
    }
  }
}

Contribute

Feel free to contribute by adding support for real database engines.

Tests

pytest is used for tests. You run it as you'd expect, i.e.:

pytest tests/

Security

You can reach us at [email protected] to report security issues.

Owner
Cyberfusion
Improve uptime and performance with managed hosting for digital agencies. Hosting for agencies and load balancing solutions.
Cyberfusion
WARP+ uses Cloudflare’s virtual private backbone, known as Argo, to achieve higher speeds and ensure your connection is encrypted across the long haul of the Internet

WARP+ uses Cloudflare’s virtual private backbone, known as Argo, to achieve higher speeds and ensure your connection is encrypted across the long haul of the Internet

Rivane Rasetiansyah 3 Apr 01, 2022
Decentra Network is an open source blockchain that combines speed, security and decentralization.

Decentra Network is an open source blockchain that combines speed, security and decentralization. Decentra Network has very high speeds, scalability, asymptotic security and complete decentralization

Decentra Network 74 Nov 22, 2022
A SOCKS proxy server implemented with the powerful python cooperative concurrency framework asyncio.

asyncio-socks-server A SOCKS proxy server implemented with the powerful python cooperative concurrency framework asyncio. Features Supports both TCP a

Amaindex 164 Dec 30, 2022
Send files to your friends over network! (100mb max)

PyServed v2.0.1 Made by Shaurya Pratap Singh Installation Using pip(for stable releases.) - $ pip install pyserved Using Git (for latest updates) -

Sblip.dev 4 Mar 22, 2022
Python script to stop qBittorrent from torrenting without VPN for users with static IP.

Python script to stop qBittorrent from torrenting without VPN for users with static IP.

voidoak_ 1 Oct 25, 2021
Arp Spoofer using Python 3.

ARP Spoofer / Wifi Killer By Auax Run: Run the application with the following command: python3 spoof.py -t target_ip_address -lh host_ip_address I

Auax 6 Sep 15, 2022
Terminal based chat - networking project with sockets in python

Terminal based chat - networking project with sockets in python

2 Jan 24, 2022
E4GL3OS1NT - Simple Information Gathering Tool

E4GL30S1NT Features userrecon - username reconnaissance facedumper - dump facebook information mailfinder - find email with specific name godorker - d

C0MPL3XDEV 195 Dec 21, 2022
A Powerful, Smart And Simple Userbot In Telethon

Owner: KeinShin 🇮🇳 BLACK LIGHTNING A Powerful, Smart And Simple Userbot In Telethon. Credits This is A Remix Bot Of Many UserBot. DARKCOBRA FridayUs

Akki ThePro 1 Nov 29, 2021
Learn how modern web applications and microservice architecture work as you complete a creative assignment

Micro-service Создание микросервиса Цель работы Познакомиться с механизмом работы современных веб-приложений и микросервисной архитектуры в процессе в

Григорий Верховский 1 Dec 19, 2021
TLD records archive. Revisiting the original TLDR project by mandatoryprogrammer, on the hunt for more root nameserver changes.

tldr A(nother) continuously updated historical TLD records archive. This repository is updated approximately every three hours with the results from D

Chris Partridge 11 Dec 14, 2022
A simple, 2-person chat program that runs on a single computer. No Internet, just you

localChat A simple, 2-person chat program that runs on a single computer. No Internet, just you. Simple and Local This was created with ease of use in

Owls 2 Aug 19, 2022
Evaluation of TCP BBRv1 in wireless networks

The Network Simulator, Version 3 Table of Contents: An overview Building ns-3 Running ns-3 Getting access to the ns-3 documentation Working with the d

3 Nov 01, 2021
An automatic reaction network generator for reactive molecular dynamics simulation.

ReacNetGenerator An automatic reaction network generator for reactive molecular dynamics simulation. ReacNetGenerator: an automatic reaction network g

Tong Zhu Research Group 35 Dec 14, 2022
Passive TCP/IP Fingerprinting Tool. Run this on your server and find out what Operating Systems your clients are *really* using.

Passive TCP/IP Fingerprinting This is a passive TCP/IP fingerprinting tool. Run this on your server and find out what operating systems your clients a

Nikolai Tschacher 158 Dec 20, 2022
Python tutorial for implementing Oxylabs' Residential Proxies with AIOHTTP

Integrating Oxylabs' Residential Proxies with AIOHTTP Requirements for the Integration For the integration to work you'll need to install aiohttp libr

Oxylabs.io 6 Sep 14, 2022
🔥 Minimal performant package to asynchronously make GET requests.

Minimal performant package to asynchronously make GET requests without any dependencies other than asyncio.

Yannick Perrenet 1 Jun 01, 2022
The OUCH Project - OUCH Server/Client

This software simulates OUCH Server/Client communication through a script which initialises a central server and another script which simulates clients connecting to the server.

Jahin Z. 2 Dec 10, 2022
EV: IDS Evasion via Packet Manipulation

EV: IDS Evasion via TCP/IP Packet Manipulation 中文文档 Introduction EV is a tool that allows you crafting TCP packets and leveraging some well-known TCP/

256 Dec 08, 2022
A simple GitHub Action that physically puts your senses on alert when your build/release fails

GH Release Paniker A simple GitHub Action that physically puts your senses on alert when your build/release fails Usage Requirements: Raspberry Pi, LE

Hemanth Krishna 5 Dec 20, 2021