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
A pure python implementation of multicast DNS service discovery

python-zeroconf Documentation. This is fork of pyzeroconf, Multicast DNS Service Discovery for Python, originally by Paul Scott-Murphy (https://github

Jakub Stasiak 483 Dec 29, 2022
Multi-path load balancing is a method used by most of the real-time network to split the packets into different paths rather than transferring it through a single path

Multipath-Load-Balancing Method of managing incoming traffic by distributing and sharing load fairly among multiple routes from source to destination

Dharshan Kumar 6 Dec 10, 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
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
HTTP proxy pool server primarily meant for evading IP whitelists

proxy-forwarder HTTP proxy pool server primarily meant for evading IP whitelists. Setup Create a file named proxies.txt and fill it with your HTTP pro

h0nda 2 Feb 19, 2022
Wifi-jammer - Continuously perform deauthentication attacks on all detectable stations

wifi-jammer Continuously perform deauthentication attacks on all detectable stat

Leonardo de Araujo 14 Nov 03, 2022
A great python/java dynamic DNS service for NameSilo, with log, email reminder...

English NameSilo DDNS is a DDNS service for NameSilo domain names for home broadband , it can automatically detect IP changes in home broadband

云牧青 77 Dec 28, 2022
Simple threaded Python Rickroll server. Listens on port 23 by default.

Terminal Rickroll Simple threaded Python Rickroll server. Listens on port 23 by default. Rickroll video made using Video-To-Ascii and the standard ric

AG 10 Sep 13, 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
An opensource library to use SNMP get/bulk/set/walk in Python

SNMP-UTILS An opensource library to use SNMP get/bulk/set/walk in Python Features Work with OIDS json list [Find Here](#OIDS List) GET command SET com

Alexandre Gossard 3 Aug 03, 2022
MQTT Explorer - MQTT Subscriber client to explore topic hierarchies

mqtt-explorer MQTT Explorer - MQTT Subscriber client to explore topic hierarchies Overview The MQTT Explorer subscriber client is designed to explore

Gambit Communications, Inc. 4 Jun 19, 2022
Distribute a portion of your yield to other addresses πŸ’™

YSHARE Distribute a portion of your yield to other addresses. How does it work Desposit your yToken or tokens into this contract Set the benificiaries

11 Nov 24, 2021
IoT owl is light face detection and recognition system made for small IoT devices like raspberry pi.

IoT Owl IoT owl is light face detection and recognition system made for small IoT devices like raspberry pi. Versions Heavy with mask detection withou

Ret2Me 6 Jun 06, 2022
Quickly fetch your WiFi password and if needed, generate a QR code of your WiFi to allow phones to easily connect

wifi-password Quickly fetch your WiFi password and if needed, generate a QR code of your WiFi to allow phones to easily connect. Works on macOS and Li

Siddharth Dushantha 2.6k Jan 05, 2023
Keep your application settings in sync (OS X/Linux)

Mackup Keep your application settings in sync. Table of content Quickstart Usage What does it do Bullsh*t, what does it really do to my files Supporte

Laurent Raufaste 12.8k Jan 08, 2023
Python Scripts for Cisco Identity Services Engine (ISE)

A set of Python scripts to configure a freshly installed Cisco Identity Services Engine (ISE) for simple operation; in my case, a basic Cisco Software-Defined Access environment.

Roddie Hasan 9 Jul 19, 2022
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.

Peder Bergebakken Sundt 2 Jan 06, 2022
Malcolm is a powerful, easily deployable network traffic analysis tool suite for full packet capture artifacts (PCAP files) and Zeek logs.

Malcolm is a powerful, easily deployable network traffic analysis tool suite for full packet capture artifacts (PCAP files) and Zeek logs.

Cybersecurity and Infrastructure Security Agency 1.3k Jan 08, 2023
boofuzz: Network Protocol Fuzzing for Humans

boofuzz: Network Protocol Fuzzing for Humans Boofuzz is a fork of and the successor to the venerable Sulley fuzzing framework. Besides numerous bug fi

Joshua Pereyda 1.7k Dec 31, 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