Sign inSign up

luizfonseca/proksi

By luizfonseca

•Updated about 1 year ago

LoadBalancer and HTTP Proxy with automatic SSL

Image
Networking
Developer tools
Web servers
0

8.9K

luizfonseca/proksi repository overview

GitHub Release Crates.io MSRV Crates.io License Crates.io Total Downloads

⁠Proksi: Automatic SSL, HTTP, and DNS Proxy

discord-logo

⁠About

Proksi is a simple, lightweight, and easy-to-use proxy server that automatically handles SSL, HTTP, and DNS traffic. It is designed to be used as a standalone proxy server or as a component in a larger system. Proksi is written in Rust⁠ and uses Pingora⁠ as its core networking library.

⁠Features

Of the many features Proksi offers is the ability to load balance to your infrastructure or any IP that supports your host configurations. Other features of Proksi also include:

  • Automatic Docker and Docker Swarm service discovery through labels
  • Built-in most common middlewares such as OAuth, Rate Limiting, CDN Caching and others
  • The ability of running it as a single binary in your system
  • Automatic SSL through Let's Encrypt and redirection from HTTP to HTTPS
  • Configuration through HCL with support for functions (get environment variables, etc)
  • Powerful plugin system for adding new middlewares and other features using WebAssembly (WASM)
  • Many others.

⁠Quick start

  1. Download the latest release from https://github.com/luizfonseca/proksi/releases⁠
  2. Create a configuration file named proksi.hcl
  3. Add the following content to the file:
lets_encrypt {
  enabled = true
  email = "[email protected]"
}

paths {
  # Where to save certificates?
  lets_encrypt = "./"
}

# A list of routes Proksi should handle
routes = [
  {
    # You might need to edit your /etc/hosts file here.
    host = "mysite.localhost",

    # Will create a certificate for mysite.localhost
    ssl_certificate =  {
      self_signed_on_failure = true
    }

    # Where to point mysite.localhost to
    upstreams = [{
      ip = "docs.proksi.info"
      port = 443

      headers = {
        add = [{ name = "Host", value = "docs.proksi.info" }]
      }
    }]
  }
]
  1. Run Proksi with your configuration:
    # Option 1: Specify exact config file path
    proksi -c /path/to/your/proksi.hcl
    proksi -c /path/to/your/config.yml
    
    # Option 2: Specify directory (looks for proksi.hcl, proksi.yml, proksi.yaml)
    proksi -c /path/to/config-directory/
    
    # Option 3: No config (uses minimal defaults with Let's Encrypt disabled)
    proksi
    

⁠Configuration File Handling

Proksi supports flexible configuration file loading:

  • Direct file paths: Specify any filename with a supported extension (.hcl, .yml, .yaml)
  • Directory paths: Proksi will look for proksi.hcl, proksi.yml, or proksi.yaml in the specified directory
  • No configuration: If no -c flag is provided, Proksi uses minimal default settings with Let's Encrypt disabled and emits a warning

For more information or guides, please refer to the documentation⁠.

⁠Documentation

Documentation for Proksi can be found at https://docs.proksi.info⁠ which is also available in the docs⁠ folder of this repository.

⁠Contributing

We welcome contributions to Proksi. If you have any suggestions or ideas, please feel free to open an issue or a pull request on the GitHub repository.

⁠License

Proksi is licensed under the MIT License⁠, the Apache License 2.0⁠ and is free to use and modify.

Tag summary

Content type

Image

Digest

sha256:c11939d98…

Size

52.5 MB

Last updated

about 1 year ago

docker pull luizfonseca/proksi