Skip to content

High-performance proxy for Discord webhooks with automatic rate limiting and retry handling. Built in Rust.

License

Notifications You must be signed in to change notification settings

serieshr/Discord-Webhook-Proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Series - Discord Webhook Proxy

Join our Discord

Discord Webhook Proxy

High-performance proxy for Discord webhooks with automatic rate limiting and retry handling. Built in Rust.

Overview

Discord blocks webhook requests from Roblox experiences and enforces strict rate limits (30 req/min). This proxy solves both problems by:

  • Bypassing Discord's block on Roblox requests
  • Managing rate limits per webhook and handling 429 responses automatically

Features

Feature Direct Request With Proxy
Roblox Compatibility ❌ Blocked by Discord ✅ Native support
Rate Limit Management ❌ Manual logic required ✅ Automated per-webhook
429 Retry Logic ❌ Immediate failure ✅ Intelligent auto-retry
Latency / Overhead 0ms <5ms
Concurrency Client-dependent 256-connection pool
API Coverage Full Full (Embeds, Files, Threads)

Installation

Development

Requires Rust 1.74+

git clone https://github.com/serieshr/Discord-Webhook-Proxy
cd Discord-Webhook-Proxy
cargo run

Production

cargo build --release
./target/release/Discord-Webhook-Proxy

Docker

docker build -t discord-webhook-proxy .
docker run -p 3000:3000 -e SKIP_VALIDATION=true discord-webhook-proxy

docker-compose.yml:

version: '3.8'
services:
  discord-webhook-proxy:
    build: .
    ports:
      - "3000:3000"
    environment:
      PORT: 3000
      RATE_LIMIT_PER_MINUTE: 30
      SKIP_VALIDATION: "true"
      RUST_LOG: webhook_proxy=warn
    restart: unless-stopped

Usage

Simply replace the Discord domain with your proxy URL.

Original Discord URL:

https://discord.com/api/webhooks/123456789/abcdefghijklmnop

Using the proxy:

https://proxy.yourdomain.com/api/webhooks/123456789/abcdefghijklmnop

Simply replace discord.com with your proxy domain - keep the rest of the URL unchanged.


Examples

curl:

curl -X POST http://localhost:3000/api/webhooks/123456789/abcdefghijklmnop \
  -H "Content-Type: application/json" \
  -d '{"content": "Hello from Discord Webhook Proxy!"}'

discord.js:

const { WebhookClient } = require('discord.js');
const webhook = new WebhookClient({
  url: 'http://localhost:3000/api/webhooks/123456789/abcdefghijklmnop'
});
webhook.send('Message through proxy');

Python:

import requests
webhook_url = "http://localhost:3000/api/webhooks/123456789/abcdefghijklmnop"
requests.post(webhook_url, json={"content": "Message from Python"})

Roblox:

local HttpService = game:GetService("HttpService")
local webhookUrl = "https://proxy.yourdomain.com/api/webhooks/123456789/abcdefghijklmnop"

local data = {
    content = "Message from Roblox experience!"
}

HttpService:PostAsync(webhookUrl, HttpService:JSONEncode(data), Enum.HttpContentType.ApplicationJson)

Configuration

.env file:

PORT=3000
RATE_LIMIT_PER_MINUTE=30
SKIP_VALIDATION=true          # Skip validation for maximum performance
RUST_LOG=webhook_proxy=warn

Command line:

PORT=8080 SKIP_VALIDATION=true ./target/release/Discord-Webhook-Proxy

Performance tip: Set SKIP_VALIDATION=true and RUST_LOG=webhook_proxy=error for lowest latency.


Deployment

Fly.io:

flyctl launch && flyctl deploy

Railway: Connect your GitHub repository for auto-deploy.

VPS/Bare Metal:

cargo build --release
scp target/release/Discord-Webhook-Proxy user@server:/opt/discord-webhook-proxy/

systemd (/etc/systemd/system/discord-webhook-proxy.service):

[Unit]
Description=Discord Webhook Proxy
After=network.target

[Service]
Type=simple
User=webhookproxy
WorkingDirectory=/opt/discord-webhook-proxy
ExecStart=/opt/discord-webhook-proxy/Discord-Webhook-Proxy
Restart=always
Environment="SKIP_VALIDATION=true"
Environment="RATE_LIMIT_PER_MINUTE=30"

[Install]
WantedBy=multi-user.target
sudo systemctl enable discord-webhook-proxy
sudo systemctl start discord-webhook-proxy

Health Check

curl http://localhost:3000/health
# {"status":"ok","message":"Discord Webhook Proxy is running"}

License

CC0 1.0 Universal - Public domain

About

High-performance proxy for Discord webhooks with automatic rate limiting and retry handling. Built in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published