├── .gitignore ├── README.md ├── doc └── README.md ├── random-redirect.service ├── requirements.txt ├── res ├── README.md ├── bbb_servers.lst ├── cryptpad_servers.lst ├── ethercalc_servers.lst ├── etherpad_servers.lst ├── hedgedoc_servers.lst ├── jitsi_servers.lst ├── pad_servers.lst ├── paste_servers.lst ├── poll_servers.lst └── urlshort_servers.lst ├── server.py └── server_uwsgi.ini /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # random-redirect 2 | Page that redirects to a random page that offers the service you are looking for 3 | 4 | 5 | | domain | server list | 6 | | --------------------------------------------------------------------- |:----------------------------------------------------:| 7 | | [jitsi.random-redirect.de](https://jitsi.random-redirect.de) | [jitsi_servers.lst](/res/jitsi_servers.lst) | 8 | | [poll.random-redirect.de](https://poll.random-redirect.de) | [poll_servers.lst](/res/poll_servers.lst) | 9 | | [pad.random-redirect.de](https://pad.random-redirect.de) | [pad_servers.lst](/res/etherpadpad_servers) | 10 | | [hedgedoc.random-redirect.de](https://hedgedoc.random-redirect.de) | [hedgedoc_servers.lst](/res/pad_servers.lst) | 11 | | [cryptpad.random-redirect.de](https://cryptpad.random-redirect.de) | [cryptpad_servers.lst](/res/cryptpad_servers.lst) | 12 | | [etherpad.random-redirect.de](https://etherpad.random-redirect.de) | [etherpad_servers.lst](/res/etherpad_servers.lst) | 13 | | [ethercalc.random-redirect.de](https://ethercalc.random-redirect.de) | [ethercalc_servers.lst](/res/ethercalc_servers.lst) | 14 | | [bbb.random-redirect.de](https://bbb.random-redirect.de) | [bbb_servers.lst](/res/bbb_servers.lst) | 15 | | [urlshort.random-redirect.de](https://urlshort.random-redirect.de) | [urlshort_servers.lst](/res/urlshort_servers) | 16 | | [paste.random-redirect.de](https://paste.random-redirect.de) | [paste_servers.lst](/res/paste_servers.lst) | 17 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | ## Installation 4 | 5 | ### Pre Install 6 | Ubuntu/Debian: 7 | `sudo apt-get install python3 python3-pip3` 8 | 9 | ### Clone Repository 10 | with SSH: 11 | `git clone git@github.com:tosterkamp/random-redirect.git` 12 | with HTTPS: 13 | `git clone https://github.com/tosterkamp/random-redirect.git` 14 | 15 | enter directory: 16 | `cd random-redirect` 17 | 18 | ### Install 19 | create virtual environment: 20 | `python3 -m venv ./venv` 21 | 22 | source venv file: 23 | `source venv/bin/activate` 24 | 25 | install python requirements: 26 | `pip install -r requirements.txt` 27 | 28 | create systemd service: 29 | `cp random-redirect.service /etc/systemd/system/random-redirect.service` 30 | `sudo systemctl daemon-reload` 31 | 32 | start systemd service: 33 | `sudo systemctl start random-redirect.service` 34 | 35 | check service output: 36 | `sudo journalctl -f -u random-redirect.service` 37 | -------------------------------------------------------------------------------- /random-redirect.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=random-redirect app 3 | After=network.target 4 | 5 | [Service] 6 | KillSignal=SIGQUIT 7 | Restart=always 8 | User=random-redirect 9 | ExecStart=/bin/zsh -c 'cd /opt/random-redirect && git pull && source venv/bin/activate && uwsgi --ini server_uwsgi.ini' 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi==2024.7.4 2 | chardet==3.0.4 3 | idna==3.7 4 | pkg-resources==0.0.0 5 | requests==2.32.2 6 | urllib3==1.26.19 7 | uWSGI==2.0.22 8 | -------------------------------------------------------------------------------- /res/README.md: -------------------------------------------------------------------------------- 1 | # Server lists 2 | 3 | ## Informations 4 | 5 | The lists are in alphabetical order. If you want to add servers, please sort the server in the list to the correct position. 6 | 7 | -------------------------------------------------------------------------------- /res/bbb_servers.lst: -------------------------------------------------------------------------------- 1 | https://bbb.ulm.dev/ 2 | https://public.senfcall.de/ 3 | -------------------------------------------------------------------------------- /res/cryptpad_servers.lst: -------------------------------------------------------------------------------- 1 | https://cryptpad.ccc-mannheim.de/ 2 | https://cryptpad.digitalcourage.de/ 3 | https://cryptpad.fr/ 4 | https://cryptpad.metager.de/ 5 | https://cryptpad.piratenpartei.de/ 6 | https://cryptpad.raspberryblog.de/ 7 | https://cryptpad.toot.koeln/ 8 | https://cryptpad.uber.space/ 9 | https://drive.allmende.io/ 10 | https://pads.c3w.at/ 11 | -------------------------------------------------------------------------------- /res/ethercalc_servers.lst: -------------------------------------------------------------------------------- 1 | https://calc.aachen.ccc.de/ 2 | https://calc.disroot.org/ 3 | https://ethercalc.hillhacks.in/ 4 | https://ethercalc.snopyta.org/ 5 | https://m18.uni-weimar.de/calc/ 6 | -------------------------------------------------------------------------------- /res/etherpad_servers.lst: -------------------------------------------------------------------------------- 1 | https://etherpad.snopyta.org/ 2 | https://pad.ccc-mannheim.de/ 3 | https://pad.disroot.org/ 4 | https://pad.jmt.gr/ 5 | https://pad.systemli.org/ 6 | https://pads.aachen.ccc.de/ 7 | https://pentapad.c3d2.de/ 8 | https://www.asta.uni-osnabrueck.de/etherpad/ 9 | https://etherpad.ggc-project.de/ 10 | -------------------------------------------------------------------------------- /res/hedgedoc_servers.lst: -------------------------------------------------------------------------------- 1 | https://codimd.c3d2.de/ 2 | https://codimd.raspberryblog.de/ 3 | https://hackmd.okfn.de/ 4 | https://md.ccc-mannheim.de/ 5 | https://md.darmstadt.ccc.de/ 6 | https://pad.c3loc.de/ 7 | https://pad.snopyta.org/ 8 | -------------------------------------------------------------------------------- /res/jitsi_servers.lst: -------------------------------------------------------------------------------- 1 | https://besprechung.net/ 2 | https://fairmeeting.net/ 3 | https://freejitsi01.netcup.net/ 4 | https://jitsi.debian.social/ 5 | https://jitsi.dorf-post.de/ 6 | https://jitsi.eichstaett.social/ 7 | https://jitsi.fem.tu-ilmenau.de/ 8 | https://jitsi.ff3l.net/ 9 | https://jitsi.flyingcircus.io/ 10 | https://jitsi.freifunk-duesseldorf.de/ 11 | https://jitsi.hamburg.ccc.de/ 12 | https://jitsi.hbs.ac/ 13 | https://jitsi.hs-anhalt.de/ 14 | https://jitsi.is/ 15 | https://jitsi.jotbe.reunite.earth/ 16 | https://jitsi.komun.org/ 17 | https://jitsi.linux.it/ 18 | https://jitsi.math.uzh.ch/ 19 | https://jitsi-meet.hs-nb.de/ 20 | https://jitsi.mpi-bremen.de/ 21 | https://jitsi.nluug.nl/ 22 | https://jitsi.php-friends.de/ 23 | https://jitsi.piratenpartei-duesseldorf.de/ 24 | https://jitsi.q2r.net/ 25 | https://jitsi.sixtopia.net/ 26 | https://jitsi.timlukas.de/ 27 | https://jitsi.uni-due.de/ 28 | https://jitsi.uni-kl.de/ 29 | https://jitsi.v3g.de/ 30 | https://konferenz.buehl.digital/ 31 | https://konferenz.netzbegruenung.de/ 32 | https://meet.adminforge.de/ 33 | https://meet.alpha.berlin/ 34 | https://meet.alps.one/ 35 | https://meet.armstrong.zimt.uni-siegen.de/ 36 | https://meet.bitblaze.io/ 37 | https://meet.bjoernhaendler.de/ 38 | https://meet.collective.tools/ 39 | https://meet.computerwerk.org/ 40 | https://meet.corrently.cloud/ 41 | https://meet.cyber4edu.org/ 42 | https://meet.cyon.tools 43 | https://meet.darmstadt.social/ 44 | https://meet.domov.de/ 45 | https://meet.dssr.ch/ 46 | https://meet.f3n-ac.de/ 47 | https://meet.ffbrb.de/ 48 | https://meet.ffmuc.net/ 49 | https://meet.ffrn.de/ 50 | https://meet.freifunk-aachen.de/ 51 | https://meet.freifunk-rhein-sieg.net/ 52 | https://meet.fuhrberg-digital.de/ 53 | https://meet.fyber.space/ 54 | https://meet.golem.de/ 55 | https://meet.hasi.it/ 56 | https://meet.in-berlin.de/ 57 | https://meet.isf.es/ 58 | https://meet.jit.si/ 59 | https://meet.jitsi.world/ 60 | https://meet.jotbe.io/ 61 | https://meet.jugendrecht.org/ 62 | https://meet.kobschaetzki.de/ 63 | https://meet.leinelab.org/ 64 | https://meet.linus-neumann.de/ 65 | https://meet.lug-stormarn.de/ 66 | https://meet.meerfarbig.net/ 67 | https://meet.nerd.re/ 68 | https://meet.opensuse.org/ 69 | https://meet.osna.social/ 70 | https://meet.physnet.uni-hamburg.de/ 71 | https://meet.piratenpartei-sh.de/ 72 | https://meet.piraten-witten.de/ 73 | https://meet.rexum.space/ 74 | https://meet.roflcopter.fr/ 75 | https://meet.scheible.it/ 76 | https://meet.schnuud.de/ 77 | https://meet.studiumdigitale.uni-frankfurt.de/F 78 | https://meet.stura.uni-heidelberg.de/ 79 | https://meet.stuvus.uni-stuttgart.de/ 80 | https://meet.systemli.org/ 81 | https://meet.teamcloud.work/ 82 | https://meet.teckids.org/ 83 | https://meet.ur.de/ 84 | https://meet.weimarnetz.de/ 85 | https://noalyss.free-solutions.org/ 86 | https://onlinetreff.ash-berlin.eu/ 87 | https://open.meet.switch.ch/ 88 | https://swisschat.free-solutions.org/ 89 | https://talk.linux-whv.de 90 | https://talk.snopyta.org/ 91 | https://unibe.meet.switch.ch/ 92 | https://unifr.meet.switch.ch/ 93 | https://uzh.meet.switch.ch/ 94 | https://vc.autistici.org/ 95 | https://vidconf.tech4good.ch/ 96 | https://virtual.chaosdorf.space/ 97 | https://webmeeting.opensolution.it/ 98 | https://www.jitsi-meet.online/ 99 | https://www.kuketz-meet.de/ 100 | https://meet.rollenspiel.monster/ 101 | https://meet.darkly.biz/ 102 | -------------------------------------------------------------------------------- /res/pad_servers.lst: -------------------------------------------------------------------------------- 1 | https://cryptpad.random-redirect.de/ 2 | https://etherpad.random-redirect.de/ 3 | https://hedgedoc.random-redirect.de/ 4 | -------------------------------------------------------------------------------- /res/paste_servers.lst: -------------------------------------------------------------------------------- 1 | https://bin.idrix.fr/ 2 | https://bin.snopyta.org/ 3 | https://bin.veracry.pt/ 4 | https://encryp.ch/note/ 5 | https://notebin.de/ 6 | https://paste.0xfc.de/ 7 | https://paste.ggc-project.de/ 8 | https://paste.rosset.net/ 9 | https://pastebin.grey.pw/ 10 | https://privatebin.at/ 11 | https://rollenspiel.events/ 12 | https://zerobin.thican.net/ 13 | https://paste.systemli.org/ -------------------------------------------------------------------------------- /res/poll_servers.lst: -------------------------------------------------------------------------------- 1 | https://framadate.ggc-project.de/ 2 | https://nuudel.digitalcourage.de/ 3 | https://poll.disroot.org/ 4 | https://poll.rollenspiel.monster/ 5 | https://poll.snopyta.org/ 6 | https://terminplaner4.dfn.de/ 7 | https://www.systemli.org/poll/ 8 | -------------------------------------------------------------------------------- /res/urlshort_servers.lst: -------------------------------------------------------------------------------- 1 | https://anancus.ynh.fr/lstu 2 | https://anzah.co/ 3 | https://lien.bechamail.fr/ 4 | https://link.infini.fr/ 5 | https://lstu.fr/ 6 | https://lstu.stemy.me 7 | https://shorter.ggc-project.de/ 8 | -------------------------------------------------------------------------------- /server.py: -------------------------------------------------------------------------------- 1 | import random 2 | import requests 3 | from datetime import datetime, timedelta 4 | import threading 5 | import time 6 | import logging 7 | import uwsgi 8 | 9 | 10 | 11 | def application(env, start_response): 12 | if(env['HTTP_HOST'].startswith('jitsi')): 13 | redirect_server = jitsi.get_random() 14 | elif(env['HTTP_HOST'].startswith('poll')): 15 | redirect_server = poll.get_random() 16 | elif(env['HTTP_HOST'].startswith('pad')): 17 | redirect_server = pad.get_random() 18 | elif(env['HTTP_HOST'].startswith('hedgedoc')): 19 | redirect_server = hedgedoc.get_random() 20 | elif(env['HTTP_HOST'].startswith('cryptpad')): 21 | redirect_server = cryptpad.get_random() 22 | elif(env['HTTP_HOST'].startswith('etherpad')): 23 | redirect_server = etherpad.get_random() 24 | elif(env['HTTP_HOST'].startswith('ethercalc')): 25 | redirect_server = ethercalc.get_random() 26 | elif(env['HTTP_HOST'].startswith('bbb')): 27 | redirect_server = bbb.get_random() 28 | elif(env['HTTP_HOST'].startswith('urlshort')): 29 | redirect_server = urlshort.get_random() 30 | elif(env['HTTP_HOST'].startswith('paste')): 31 | redirect_server = paste.get_random() 32 | else: 33 | redirect_server = 'https://timo-osterkamp.eu/random-redirect.html' 34 | 35 | print('redirect from ' + env['HTTP_HOST'] + ' to ' + redirect_server) 36 | start_response('302', [('Location', redirect_server)]) 37 | return [b"redirected"] 38 | 39 | 40 | class ServerList: 41 | def __init__(self, filename, t_request): 42 | """ 43 | @param filename: name of the file with the serverlist in the folder res 44 | @param t_request: file, which is located on the searched servers, which can be used to measure the speed of the server 45 | """ 46 | self.lock = threading.Lock() 47 | self.file = 'res/' + filename 48 | self.test_request = t_request; 49 | self.servers = [] 50 | self.offline_servers = [] 51 | self.renew() 52 | 53 | def get_random(self): 54 | """ 55 | return a random server from self.list 56 | """ 57 | self.lock.acquire() 58 | tmp = random.choice(self.servers) 59 | self.lock.release() 60 | return tmp 61 | 62 | 63 | def renew(self): 64 | """ 65 | get current list from filesystem and check if the servers are online 66 | """ 67 | if self.test_request is None: 68 | with open(self.file, 'r') as f: 69 | self.servers = f.readlines() 70 | else: 71 | online = [] 72 | offline = [] 73 | with open(self.file, 'r') as f: 74 | all_servers = f.readlines() 75 | for x in all_servers: 76 | try: 77 | r = requests.get(str.rstrip(x) + self.test_request, timeout=0.5) 78 | if (r.status_code == requests.codes.ok): 79 | #print(str.rstrip(x) + " is online") 80 | online.append(x) 81 | else: 82 | #print(str.rstrip(x) + " returns status code: " + str(r.status_code)) 83 | offline.append(x) 84 | except Exception as inst: 85 | #print(str.rstrip(x) + " Error: " + str(inst)) 86 | offline.append(x) 87 | #print("offline: ") 88 | #print(offline) 89 | self.lock.acquire() 90 | self.servers = online 91 | self.offline_servers = offline 92 | self.lock.release() 93 | #print("online: ") 94 | #print(self.servers) 95 | 96 | 97 | 98 | 99 | 100 | 101 | jitsi = ServerList('jitsi_servers.lst', 'sounds/outgoingRinging.wav') 102 | poll = ServerList('poll_servers.lst', 'images/date.png') 103 | pad = ServerList('pad_servers.lst', None) 104 | hedgedoc = ServerList('hedgedoc_servers.lst', 'screenshot.png') 105 | cryptpad = ServerList('cryptpad_servers.lst', 'customize/images/AGPL.png') 106 | etherpad = ServerList('etherpad_servers.lst', 'locales.json') 107 | ethercalc = ServerList('ethercalc_servers.lst', 'static/img/davy/bg/home2.png') 108 | bbb = ServerList('bbb_servers.lst', None) 109 | urlshort = ServerList('urlshort_servers.lst', None) 110 | paste = ServerList('paste_servers.lst', None) 111 | 112 | def reload(signum): 113 | print("start reload") 114 | global jitsi 115 | global poll 116 | global pad 117 | global hedgedoc 118 | global cryptpad 119 | global etherpad 120 | global ethercalc 121 | global bbb 122 | global urlshort 123 | global paste 124 | jitsi.renew() 125 | poll.renew() 126 | pad.renew() 127 | hedgedoc.renew() 128 | cryptpad.renew() 129 | etherpad.renew() 130 | ethercalc.renew() 131 | bbb.renew() 132 | urlshort.renew() 133 | paste.renew() 134 | print("finish reload") 135 | 136 | uwsgi.register_signal(99, "", reload) 137 | uwsgi.add_timer(99, 600) 138 | -------------------------------------------------------------------------------- /server_uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | socket = 127.0.0.1:10101 3 | chdir=/opt/random-redirect 4 | wsgi-file = server.py 5 | processes = 4 6 | threads = 2 7 | stats = 127.0.0.1:10102 8 | --------------------------------------------------------------------------------