All source listed below is under MIT license if no LICENSE file stating different is available.

Pretty Good Server

Multipurpose load balancing intercepting proxy written in C.

Introduction

This application is load balancing intercepting proxy. Key features:

  • security against ddos of your upstream server.
  • distribute incomming connections over several servers.
  • host multiple protocols / services on one port as a security measurement.
  • advanced routing based on host name or any header data.
  • interception of content. Modifying content going trough this server is possible.

Features

AI Support

Thanks to the Python implementation it's possible to use AI in this server in the way most people are used to.

Interception

All upstream and downstream data will go trough Python code provided by user. A user is using this capable to modify headers and content. With this functionality you can enhance security. Also, you could apply corrections, translations, removing emoji's. In commercial sense, you could replace certain words with links to advertised content.

Advanced routing

Routing is more advanced than any other webserver provides. For routing Python is integrated giving it unlimited options. You could even write custom responses with Python, adding webhooks or you could override an existing page of software where you normally can't control over. Other features include, but not limited to:

  • Force the usage of authentication tokens. (Or base64 authentication).
  • Validate authentication tokens by connecting to a database.
  • Do rate limiting.
  • Execute calls to AI to modify intercepted content.

Load balancing

Using Python you can apply your own dynamic load balancing rules. You know exactly what servers have which connections. A good idea could be to include the server load or other statistics in the response header of servers. Using interception you remove this data for the client.

Hostname redirection

You can redirect based on hostname dynamically. You could use the same source code and base on hostname for example if you use production or development settings.

Application server

Because of its huge concurrency capabillities it's perfectly fine as an application server. It's not only a load balancer, it's also a reverse proxy. It's a complete solution to your needs.

docs
doxygen-awesome-css@af1d9030b3
static
.gitignore
.gitmodules
build.py
Doxyfile
features.md
Makefile
pgs_api.h
pgs.c
pgs.py
pgscript.py
protocol.h
py.h
README.md
sock.h