-
-
Notifications
You must be signed in to change notification settings - Fork 29
Proxying Requests
If you're experiencing 429 errors whilst attempting to play music from YouTube, your IP address may be blocked by YouTube for sending too many requests. This is common on shared hosting like Heroku, where many services share the same IP address. To bypass this, you can utilise a HTTP proxy to forward your requests through a different IP address. Melody allows this through a config option.
This guide assumes you already have a proxy from a proxy provider, and is simply here to show you how to set it up with Melody.
To setup a proxy, get your proxy IP address, port number, username, and password ready. Next, open Melody's configuration file and scroll down to the proxy section. Set enable: true
and set your connection URL. The connection URL must be formed in the following way: http://username:password@ipAddress:port
. For example, http://username:password@111.111.111.111:8080
. Set this as your connectionUrl
in Melody's configuration file, then save your changes and restart the bot. Melody should now utilise your proxy assuming there is no more setup required on the proxy side, such as approving IP addresses.
It is worth noting that if you have experienced 429 errors in the past, it's not unlikely that you will experience them again. To minimise the chance of this happening, you should set a custom YouTube cookie in Melody's configuration file. Click here for more information about setting YouTube cookies.
Thank you for supporting Melody ❤️