Coder Social home page Coder Social logo

tetrio-proxy's Introduction

Archived since 14/03/2023

Feel free to fork if you want to make improvements.


TETR.IO - Self-Proxy

This proxy is mainly used to bypass restrictions in some networks. Also, this script is not associated with or created by TETR.IO or osk.

Motivation

As I write this, I am a student in a French school and the thing is, when I'm bored in class, I want to play TETR.IO but actually can't because of network restrictions.

So there my solution is to self-host a proxy on a VPS or a Raspberry PI at home, to be able to play TETR.IO without any restrictions !

How it works ?

We simply download all the resources from TETR.IO and serve them ourselves so that we can bypass the Cloudflare Browser Verification - which many online proxies can't actually pass.

Usage

  1. Check if you have Node.js and pnpm installed
  2. Use git to clone this repository with git clone https://github.com/Vexcited/tetrio-proxy
  3. Go into the created folder, cd tetrio-proxy
  4. Install the dependencies, pnpm install. You can also optionally update the index.html file, manually. You should do that if the app can't load anymore, otherwise don't touch the public/index.html
  5. Run pnpm refresh to install/update the game files from TETR.IO
  6. Run pnpm start and the web server will start on port 4080, by default

Update the /public/index.html file

Open a web browser and go to https://tetr.io. Wait for the Cloudflare Browser Verification to complete and wait until TETR.IO is loaded.

Now, open the DevTools with F12 and head on to the Sources tab.

In top>tetr.io>, you'll find index.html. Right click on it and Save as index.html somewhere.

Now, move this file to the root public folder of this repository.

public folder structure

  • ./css, should only contain tetrio.css
  • ./js, should only contain tetrio.js
  • ./sfx, should only contain tetrio.ogg
  • ./res, should contain all the resources. Some may miss so if you have missing resources, feel free to open an issue !
  • ./index.html, entry-point of the game.
  • ./sw.js, service-worker for caching.
  • ./bootstrap.js, bootstrap for the scripts and game.
  • ./favicon.ico, browser's tab icon.

tetrio-proxy's People

Contributors

vexcited 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.