Skip to content

mamedul2/proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal Proxy Server (Node.js) 🚀

GitHub license    GitHub stars    GitHub forks    GitHub watchers    GitHub followers

A fast, reliable, and no-CORS Node.js proxy server that handles all HTTP methods (GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD) and supports both HTTP and HTTPS targets.

Access any URL via a simple path-based proxy — perfect for bypassing CORS restrictions, testing APIs, and integrating third-party services seamlessly.


🚩 Features

  • ✅ Supports all HTTP methods (GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD)
  • ✅ Handles both HTTP and HTTPS target URLs transparently
  • No CORS restrictions — adds permissive CORS headers automatically
  • ✅ Proxy requests and responses are forwarded exactly as-is
  • ✅ Easy-to-use URL format:

[https://your-proxy.com/https://target-website.com/api](https://your-proxy.com/https://target-website.com/api)

  • ✅ Built with popular, battle-tested libraries: Express and cors-anywhere
  • ✅ Lightweight and fast — minimal dependencies for maximum performance
  • ✅ Fully configurable via .env file (e.g., port settings)
  • ✅ Handles CORS preflight OPTIONS requests gracefully
  • ✅ Ready for production deployment on any Node.js hosting platform

🔥 Why Use This Node.js Proxy Server?

  • Bypass cross-origin resource sharing (CORS) limitations in browsers
  • Bypass Error: Access to fetch at 'https://target-website.com' from origin 'https://your-website.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • Bypass Error: The page at 'https://your-website.com' was loaded over HTTPS, but requested an insecure resource 'http://target-website.com'. This request has been blocked; the content must be served over HTTPS.
  • Quickly test external APIs without setting up complicated proxies
  • Proxy third-party services for web or mobile applications
  • Simple URL pattern for easy integration into your frontend or backend
  • Open-source and MIT licensed — customize and extend as you like!

🚀 Getting Started

Prerequisites

  • Node.js v14 or higher
  • npm (comes with Node.js)

Installation

  1. Clone the repo or download source code:
git clone https://github.com/mamedul/proxy.git
cd proxy
  1. Install dependencies:
npm install
  1. Create a .env file in the project root to configure the port:
PORT=3000
  1. Start the server:
npm run start

Or, for development with automatic restarts:

npm run dev
  1. Open your browser or API client and use the proxy:
http://localhost:3000/https://example.com/api/data

📦 Project Structure

.
├── proxy.js         # Main proxy server script
├── package.json     # Project metadata and dependencies
├── .env             # Environment variables (optional)
└── README.md        # This file

🛠️ How It Works

  • The proxy listens for incoming requests matching /http(s)://target-url/*.
  • It extracts the target URL from the request path.
  • Uses cors-anywhere to forward the request to the target.
  • Adds permissive CORS headers to all responses.
  • Handles OPTIONS preflight requests immediately with no content.
  • Returns the proxied response back to the client exactly as received.

⚙️ Customization

  • Change the port in .env or default to 3000.
  • Add custom headers or logging by editing proxy.js.
  • Secure with authentication or rate limiting in production.

👨‍💻 Author & Hire Me

Hi! I'm Mamedul Islam, a passionate Web Developer who builds modern web applications, E-commerce, PWAs, and fast, static, dynamic, responsive websites. Specializing in WooCommerce, Wordpress, PHP, MySQL, and modern web development. Creating exceptional digital experiences since 2017.

📬 Connect With Me:

I'm open for freelance work, Woocommerce, E-commerce, Wordpress, PWA development, speed test apps, Firebase projects, websocket, PHP, MySQL and more. Hire me to bring your ideas to life with clean, modern code!


📝 License

This project is licensed under the MIT License — feel free to use, modify, and distribute it freely. ⭐ Don't forget to star this repo if you like it! © 2025 Mamedul Islam


Keywords

Node.js proxy server, no CORS proxy, HTTP proxy, HTTPS proxy, API proxy, cross-origin proxy, Express proxy server, cors-anywhere, bypass CORS, open source proxy, Node.js API proxy, universal proxy


Made with ❤️ using Node.js and Express.


⭐ Show Your Support

If you find this extension useful, please consider giving it a star on GitHub! Your support helps motivate further development and improvements.

GitHub stars   If you found this project helpful, give it a ⭐ on GitHub!

About

Proxy HTTP, HTTPS request pass

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published