Git Product home page Git Product logo

pacserver's Introduction

pacserver

Built using node.js, express and MongoDB

Developed based on the need to provide dynamic generated PAC files with different proxy assignments per client IP address.

Inspired by https://github.com/DrRenz/PACtory

Features

  • Serve PAC files with proxy assignments based on source IPs
  • Longest prefix matching to find the correct proxy for every source IP
  • Recognizes X-Forwarded-For and X-Real-IP headers when behind a reverse proxy
  • REST API for managing networks and proxy exceptions
  • PAC file validation before serving (default test URL in .env)
  • Dev container included for easy development in vscode
  • API query to search for proxy for a given IP (e.g. http://serverip/api/v1/getproxyforip?ip=10.1.2.3)

Installation

  • Install MongoDB
  • git clone the repo
  • rename .sample-env to .env and edit settings
  • npm install the dependencies

Docker:

  • git clone the repo
  • docker build -t pacserver .
  • docker run --rm pacserver:latest

Docker Compose (App + MongoDB):

  • git clone repo
  • docker-compose build
  • docker-compose up -d

Run

  • nodemon run: npm run start:dev
  • prod run: npm start

API Documentation

  • SwaggerUI is available at {{protocol}}://{{serverip:port}}/api-docs/ (default: localhost:3000)
  • Edit protocol, server hostname/IP and port in SwaggerUI

TODO

  • Admin frontend

pacserver's People

Contributors

joxz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

ittps-pro

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.