Simple app that redirect fixed URL to changing URL, configurable via POST requests

Related tags

Networkingredirector
Overview

This is a basic URL redirection service. It stores associations between apps and redirection URLs, for apps with changing URLs.

You can then use GET requests to redirect to the URL of an app, or POST/PUT requests to modify the URL of an app.

This might be useful for having a single fixed URL to an app whose URL changes. The use case was to provide a fixed URL to simple apps hosted in OVHcloud AI-Training, because the URL is linked to the job's ID, which is renewed at each job run. In such a context, redirector can be used to provide a fixed URL to the app, as long as it gets the right POST/PUT requests to update the URL properly.

Launch

With python

You can just run the main.py. The dependencies are handled by poetry, so you can install them with poetry install, or use any other method you like.

You can change the default port by setting the PORT environment variable.

You can change the location of the json "database" by setting the CONFIG_FILE_PATH environment variable.

With docker

docker run -e BASIC_AUTH_USERNAME=user -e BASIC_AUTH_PASSWORD=password -e CONFIG_FILE_PATH=/database/redirects.json -v redirector:/database -p 8080:8080 ghcr.io/maximeweyl/redirector

With OVHcloud AI-Training job

ovhai job run --cpu 1 -e BASIC_AUTH_USERNAME=user -e BASIC_AUTH_PASSWORD=password -e CONFIG_FILE_PATH=/database/redirects.json -v [email protected]:/database:rw --unsecure-http ghcr.io/maximeweyl/redirector

Create/update a redirection

To POST or PUT a new redirection, use the /app/ url, where is the name of the application. The body of the request should have this form (json-formatted):

{
    "url": "https://my-url.com"
}

You must use basic authentication ('Authorization' header) for creating/updating a redirection. Alternatively, you can also use the headers XX-redirector-user and XX-redirector-password.

The default username is 'admin' with the default password 'admin'. You can change the default username and password by using these environment variables:

  • BASIC_AUTH_USERNAME
  • BASIC_AUTH_PASSWORD

Use a redirection

Just make a GET request to the same URL used when creating or updating the redirection. The browser will be redirected to the new URL, that will be displayed in the address bar. So your user should bookmark the redirector URL, and not the URL after redirection.

See the entire configuration

You can make a GET request to the /config url, and you will get a json with the entire configuration of redirections. You will see that updates do not erase previous ones, the current values is just the last one of each redirection list.

Limitations

  • The redirection does not hide the real URL. The user will be redirected to the URL and will be able to see it in its address bar.
  • The app is really simple, and was not tested under heavy load.
  • The redirections are stored in a simple json file. While simple and easy to read, this is not a really safe solution. Remember this is all really basic.
  • It uses a basic flask development server. No really you should not use this for something too serious.
  • I do not give any warranty of any sort, and I am not responsible for any damage caused by this service
Owner
Maxime Weyl
Maxime Weyl
It's a little project for change MAC address, for ethical hacking purposes

MACChangerPy It's a small project for MAC address change, for ethical hacking purposes, don't use it for bad purposes, any infringement will be your r

Erick Adriano Nunes da Silva 1 Mar 11, 2022
This is a simple python script to collect sub-domains from hackertarget API

Domain-Scraper 🌐 This is a simple python script to collect sub-domains from hackertarget API Note : This is tool is limited to 20 Queries / day with

CHINO TECH TOOLS 4 Sep 09, 2021
This tool extracts Credit card numbers, NTLM(DCE-RPC, HTTP, SQL, LDAP, etc), Kerberos (AS-REQ Pre-Auth etype 23), HTTP Basic, SNMP, POP, SMTP, FTP, IMAP, etc from a pcap file or from a live interface.

This tool extracts Credit card numbers, NTLM(DCE-RPC, HTTP, SQL, LDAP, etc), Kerberos (AS-REQ Pre-Auth etype 23), HTTP Basic, SNMP, POP, SMTP, FTP, IMAP, etc from a pcap file or from a live interface

1.6k Jan 01, 2023
This is an open project to maintain a list of domain names that serve YouTube ads

The YouTube ads blocklist project This is an open project to maintain a list of domain names that serve YouTube ads. The original project only produce

Evan Pratten 574 Dec 30, 2022
A website to list Shadowsocks proxies and check them periodically

Shadowmere An automatically tested list of Shadowsocks proxies. Motivation Collecting proxies around the internet is fun, but what if they stop workin

Jorge Alberto DΓ­az Orozco (Akiel) 29 Dec 21, 2022
Py script to aid in setting up the boot chime in OpenCore.

BootChime Py script to aid in setting up the boot chime in OpenCore. It does so by helping you locate your IOHDACodecDevices, IOHDACodecAddress values

CorpNewt 7 Sep 19, 2022
Python implementation of the IPv8 layer provide authenticated communication with privacy

Python implementation of the IPv8 layer provide authenticated communication with privacy

203 Oct 26, 2022
An API for controlling Wi-Fi connections on Balena devices.

Description An API for controlling Wi-Fi connections on Balena devices. It does not contain an interface, instead it provides API endpoints to send re

8 Dec 25, 2022
PetrickScanner is a simple Python OOP TCP Port Scanner

PetrickScanner PetrickScanner is a simple Python OOP TCP Port Scanner Functions Python TCP Port Scanner DNS Resolver Random Scanner PLEASE ANY PROBLEM

11 Nov 30, 2021
ProtOSINT is a Python script that helps you investigate Protonmail accounts and ProtonVPN IP addresses

ProtOSINT ProtOSINT is a Python script that helps you investigate ProtonMail accounts and ProtonVPN IP addresses. Description This tool can help you i

pixelbubble 249 Dec 23, 2022
πŸ₯‘ A Python ARP and DNS Spoofer CLI and INTERFACE πŸ₯“

NEXTGEN SPOOFER πŸ₯‘ A Python ARP and DNS Spoofer CLI and INTERFACE πŸ₯“ CLI - advanced pentesters INTERFACE - beginners SetUp Make sure you installed P

9 Dec 25, 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
An curated collection of awesome resources about networking in cybersecurity

An ongoing curated collection of awesome software, libraries, frameworks, talks & videos, best practices, learning tutorials and important practical resources about networking in cybersecurity

Paul Veillard, P. Eng 7 Nov 30, 2022
pfSense integration with Home Assistant

hass-pfsense Join pfSense with home-assistant! hass-pfsense uses the built-in xmlrpc service of pfSense for all interactions. No special plugins or so

Travis Glenn Hansen 105 Dec 24, 2022
a decompilation of NAP36 the widevine removal software for amz and nf used by p2p groups until it stoped working due to it using expired cdm keys

NAP36 a decompilation of NAP36 the widevine removal software for amz and nf used by p2p groups until it stoped working due to it useing expired cdm ke

9 Aug 29, 2021
Pteronode - Script for managing Pterodactyl nodes

pteronode Script for managing Pterodactyl nodes Pteronode allows you to create s

9 Sep 28, 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
Tripwire monitors ports and icmp to send the admin a message if somebody is scanning a machine that shouldn't be touched

Tripwire monitors ports and icmp to send the admin a message if somebody is scanning a machine that shouldn't be touched

3 Apr 05, 2022
A script for generating WireGuard configs from Surfshark VPN

Surfshark WireGuard A script for generating WireGuard configs from Surfshark VPN. You must have python3 available on your machine. Usage Currently we

Alireza Ahmand 58 Dec 23, 2022
πŸ‘¨πŸΌβ€πŸ’» β€Žβ€Žβ€Žβ€β€ A customizable man-in-the-middle TCP proxy with out-of-the-box support for HTTP & HTTPS.

πŸ‘¨β€πŸ’» mitm A customizable man-in-the-middle TCP proxy with out-of-the-box support for HTTP & HTTPS. Installing pip install mitm Note that OpenSSL 1.1

Felipe 92 Jan 05, 2023