Share your repls and programming experiences

← Back to all posts
Discord Reverse Proxy
h
frissyn (449)

Discord: Unblocked

Using both flask and requests it's pretty easy to create a proxy server to retrieve resources from another location and serve them to the client, making it appear as if it came directly from the proxy! (If you didn't get any of that, I recommend reading this and this, too lol @21natzil used to make Medium articles.)

To put it in simple terms: my flask application will stand between Discord and your client, tossing resources back and forth programmatically, meaning it can't be monitored by any blocker or web filter!

The advantage of using my flask proxy is that it can handle GET, POST, and DELETE methods, making it so that most forms can be submitted; it won't just be you retrieving resources.

Drawbacks

Right now, the server can only handle server-side forms and can't retrieve resources from subdomains of discord, unless specified. That means:

  • Logging in is pretty hit or miss, for every 100 times you click the Login button, it'll probably work twice.
  • There's a 0.5-2 second delay from when you press 'Enter' and when your messages actually sent
  • Certain actions, like changing your pfp, username, managing bots, creating/deleting servers, etc. straight up don't work :(

Fair Warning

Like I've said, the flask application is a middle man between you and your requests to Discord. Don't, for any reason, complete sensitive forms besides the login form (signups are dangerous too!)

With that said, enjoy Discord unblocked! =D

Editor's Note:

Discord uses absolute URLs, not relative ones. This means that when you click on a link, the "Login" link, for example, it will take you to discord.com/login, which is blocked, instead of discord.irethekid.repl.co/login. If something breaks and you get redirected to your "Blocked" page, try typing the URL manually. Sorry for the inconvenience :P

Comments
hotnewtop
EekulD (23)

EVERYONE THAT'S ANNOYED AT THE LOGIN BUTTON: THE QR CODE WORKS 1ST TIME, SO IF YOU LOGIN AT HOME THEN IT'LL ALL BE GOOD AT SCHOOL AS WELL

KobeFF (1292)

R.I.P

Is there any way to fix this?
frissyn (449)

@KobeFF it broke!? lemme take a look

KobeFF (1292)

@frissyn Kay thanks it crashed :(

KobeFF (1292)

Wait, all i see is a white screen...

KobeFF (1292)

@frissyn It works now! Thanks so much :D

You are a goddess
frissyn (449)

NOTE (Read Before Commenting):

For those of you who can't get past the login page, I may have found the issue. discord.com ONLY sends/receives HTTPS requests/responses, and repl.it doesn't support hosting web applications over HTTPS. (At least, not with any method that I've tried.) So I guess the only way to get around this is, if available, to log in via Discord mobile with QR Code and log in that way. Once you've done that, my proxy server will make your cookies static until you logout, so that you can use Discord on your computer. Sorry for the inconvenience, but it's not exactly something that I can fix. Thanks for the nice comments! T~T

Codemonkey51 (1035)

:facepalm:

All replit web apps get https by default (I could explain more but that would get a bit into the technical side).

Even if it looks non-encrypted server side, I assure you it is. No need to set up your own ssl certs. Also as you see https://discord.irethekid.repl.co/ works, it does support https lmaoz @IreTheKID

wereismywater (19)

What is the best way to log in? holding down the enter key or spam clicking login?

frissyn (449)

@wereismywater lol I have no idea, I'm still making improvements so the best I can say is to try again later =/

wereismywater (19)

@IreTheKID ok. Thanks for responding!

spinfal (1)

@wereismywater i used the qr code to login, and it worked right away (only downside is it requires your mobile device). once you login with the qr code, you stay logged in, so thats a plus.

frissyn (449)

@spinfal yup, your login cookies are server cached until you logout (took me forever to get that working) glad you enjoyed it! :P

spinfal (1)

@IreTheKID yeah this is amazing work, works very well. even creating/deleting a server seems to work. (havent tried other features yet)

SlateInvest (0)

@spinfal I used the qr code but the discord logo just keeps spinning, how long does it take?

KobeFF (1292)

@IreTheKID please fix this its not working anymore... can u pls remake it differently

frissyn (449)

@KobeFF A lot of ppl are making requests with it so I added threading, try it now

KobeFF (1292)

@IreTheKID ok sounds good! i found out that danielpy had issues with the login because it takes you into the real discord login page. i think thats why.

KobeFF (1292)

@IreTheKid its still not working :( the second i press the 'login' button this appears :(

frissyn (449)

@KobeFF yeah, it's annoying but that's not exactly something that I can fix :(

KobeFF (1292)

@IreTheKID can you remake it so that it takes you straight to the discord login page?

frissyn (449)

@KobeFF I'll try something out, gimme some time to fix it though (maybe 10mins or smth)

KobeFF (1292)

@IreTheKID ok pls tell me when u finish cuz it worked for like 5 min (that was the best moment of my life) and stupid f**king securly comes in and ruins it... I rly hope u find a solution! I hope i can use discord again.

KobeFF (1292)

I hate my school they rly be blocking everything... even the dino game when u have no internet

P.S. @IreTheKid does it work now?? did u fix it

frissyn (449)

@KobeFF OK, I've fixed a few things and added an index page so that you navigate using relative links. It should look like this:

Hope it works for you now :)

KobeFF (1292)

@IreTheKID Wait how do i access the new version thing.

Edit: it takes me to the login page but then when i press the 'login' button it dosent work... it loads for a second but then still stays on the login screen.

Edit #2: It may be loading!!! rn!!! hope it works! fingers crossed.

EDIT #3: its back to staynig in the login screen... still attempting lmao.. ive pressed the login button like 100 times now.

Edit#4: plz work

frissyn (449)

@KobeFF Try clearing your cookies and cache and all that, then try again. If that doesn't work then ¯\_(ツ)_

KobeFF (1292)

im going to scream now -_-

KobeFF (1292)

@IreTheKID im still spamming to login button

EpicGamer007 (1506)

@KobeFF ur school blocks the dino game? That is so dang sad, i feel like crying 😭😭😭😭

KobeFF (1292)

@EpicGamer007 ikr they rly went that far

wasuiscool (1)

I CAN"T LOGIN IT WONT LET ME ;( i click the login button it does nothing

hersheyhue (0)

Used the QR code to log in and it works perfectly. Thank you for this.

Sleek (7)

everyone who is annoyed at the qr code + login button; i have found a way to login with token, this requires another device to gain your token however so i suggest once you get it save it somewhere.
this is a bookmarklet so it can be preformed on any device

javascript:function login(token) {setInterval(() => {document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`}, 50);setTimeout(() => {location.reload();}, 0);}var newToken = prompt("TOKEN:");login(newToken);```

EDIT: don’t give the token to anyone else as it bypasses 2fa, password, recaptcha, location verification, and any other security on the login page. for your safety don’t use your token anywhere else
chaseb6306 (0)


My QR code stays at this loading page thing.

frissyn (449)

@chaseb6306 it might not work then, sorry :/

chaseb6306 (0)

My qr code wont show up and I have been trying to login in for the past 2 days and it does not work.

thewaydu (18)

@IreTheKID, I don't know how you managed to make this, this is way above my skill level.

frissyn (449)

@thewaydu Thanks! It's not all that hard, really. I just read a few tutorials on proxies in Flask, and did what I could to apply it to Discord!

RyanGardiner1 (139)

@IreTheKid Nice! How would I make it to be Skype instead of Discord?

Sleek (7)

it started working for a little bit then after a few days it signed me out after i changed my pass and i can’t get back in, i strongly suggest to not change your password on this, though overall it’s a great repl

Sleek (7)

update on logging in: i have put an auto clicker clicking on the login button at 100cps

frissyn (449)

@Jeydin21 that's there because, if I wanted to, (which I DON'T) can intercept the form data and do whatever I like with it. If you're concerned about security, fork the REPL and run it yourself :P

That's why I warned not to fill out forms unnecessarily.

KoolDagger (23)

POSSIBLE SOLUTION TO LOGIN BUTTON:

  1. put this code on a github repo
  2. make a github pages site.
  3. go to netlify
  4. get a domain from freenom.com
  5. connect freenom domain to netlify
  6. There's the ssl, meaning https
frissyn (449)

@KoolDagger that's a lot of work for a Discord Unblocker... I also don't have money to buy a domain :P

KoolDagger (23)

@IreTheKID
freenom gives u free domains. but be careful, if you start earning money off of the website, its gonna cancel the domain

KoolDagger (23)

@IreTheKID
btw, u can sign up with random info on the website :p

frissyn (449)

@KoolDagger hmms, I'll check it out then, thanks for the info :)

chaseb6306 (0)

@KoolDagger I have tried this and it says 404 when you try to click on the link to bring you into the login and I don't know if it is a problem with netlify or what.

SharpCodeDev (72)

Brooooooooooooooooooooooooooo
This
is
epic!!!

GrantDeibler (2)

So I've logged in successfully but it is just loading forever, do I just need to keep trying?

MikeJMS8910 (60)

If it says refuses to load what you can do is inspect that, then go to console, there should be some red boxes and inside of the boxes press on the first underlined link that it states

frissyn (449)

@MikeJMS8910 It's best to open it up in a new tab :)

[deleted]

Hey guys, if your QR code login does not work try these steps:
1. Lower down the brightness of your desktop
2. Scan the QR code again and...

WALLAH

You have discord

MikeJMS8910 (60)

heres the bug, it is not able to get the data

frissyn (449)

@MikeJMS8910 that's actually really helpful! I can't inspect stuff on my Chromebook, but I'll try to fix that, thanks

[deleted]

@IreTheKID is this a coincidence i have a chromebook too xddddd
edit: you could just view the page source and copy it onto github or something and then just edit the html, thats kinda inspect tool 2.0

frissyn (449)

@DevZlx I guess, that's a lotta work tho

[deleted]

@IreTheKID by theee way, i want to use the developer portal with your flask app, but when i type the applications url it redirects me to discord.com which is blocked

frissyn (449)

@DevZlx I guess Discord's source code redirects you there. Maybe you can try going straight to the docs.

[deleted]

@IreTheKID but if i click on the application it still sends me to discord.com

[deleted]

@IreTheKID but if i click on the applications button it still sends me to discord.com

frissyn (449)

@DevZlx right click it and try typing the URL manually, other than that, I can't fix that, sorry T~T

[deleted]

@IreTheKID right click what?

frissyn (449)

@DevZlx the "Applications" link. When you hover over it, you should be able to see the URL in the bottom left of your browser

[deleted]

@IreTheKID nope, did not work

[deleted]

@IreTheKID its ok, ill try logging in first so then maybe it will not redirect me to discord.com
edit: orrrr not, its ok tho

[deleted]

This is pretty good to be honest
Now I an use discord on my school chromebook no problemo
And then I can just close it no problemo

KoolDagger (23)

@DevZlx
but they can check your history no problemo LOL

[deleted]

@KoolDagger oh, that, yeah, BUT you can just delete it no problemo LOL

KoolDagger (23)

@DevZlx
instead, you CAN'T no problemo

M07 (2)

@KoolDagger Only SOME schools prevent that

Jeydin21 (74)

QR Code no work :(

wereismywater (19)

It appears the website has stoped working.

wereismywater (19)

@IreTheKID nvm it appears to be working sorry for the confusion

frissyn (449)

@wereismywater you must've caught me making some edits, sorry :P

Zakiroboy (3)

it does not work for me at all

DANJOH (0)

where did you learn how to do something like this? I want to try to make this for some other websites

frissyn (449)

@DANJOH I made a tutorial post so that people can learn more about reverse proxies: Proxy Servers for Noobs

DANJOH (0)

@IreTheKID you are a god among men thank you. ill go check it out

SonyaFF (0)

it was working for me before but now when i try to get into it and press the buttons it just loads a white screen for me :(

Jeydin21 (74)

The QR Code works? Oh wait I can't find it though.