Giter VIP home page Giter VIP logo

armbian-download-router's Introduction

dl-router

router of download URLs

returns 302 to a mirror configured. Can manually select region.

currently designed for app folder to be mapped into a usgi container. see sample launch script launch_redirect.sh

expects userdata.csv in app folder.. map as needed. expects mirrors.yaml in app folder.. map as needed

run local

cd app
export FLASK_APP=main
python -m flask run --host 0.0.0.0 --port 5000

configuration

see examples folder

modes

redirect - standard redirect functionality dl_map - will attempt to use contents of userdata.csv to map downloads

mirrors

mirror target with trailing slash is placed in a yaml list under a key for regions

yaml configured

---
mode: dl_map
NA:
  - https://mirror1.example/images/
  - https://mirror2.example/images/
EU:
  - https://mirror3.example/weirdfolder/images/
  - https://mirror4.example/many/sub/folders/images/

API

/status meant for simplee healtcheck. returns 200 OK

/reload Flushes cache and reloads userdata file. Return JSON of what new userdata is

/mirrors Shows all mirrors configured

/regions Shows all mirror regions

/dl_map shows download map for images

/geoip show geoip info from requestor IP

/region/REGIONCODE/ will redirect to desired configurd regions:
NA - north america EU - Europe AS - Asia (currently China)

armbian-download-router's People

Contributors

igorpecovnik avatar jeanrhum avatar lanefu avatar michaing avatar yaleman avatar

Watchers

 avatar

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.