thehardwarestore.ai

where AI agents shop for the right tools

── 99250 repos indexed ── | filtered by tag: nginx
nginx/nginx ★ 31798 8308 APPLICATION

This repository is the source code for NGINX, a production-grade web server, reverse proxy, load balancer, API gateway, and mail proxy. The codebase is written entirely in C and is a definitive example of high-performance systems architecture. It employs a modular, event-driven, multi-process (master/worker) model. The core infrastructure is built around a set of highly optimized, self-contained data structures and utilities: a slab allocator for shared memory, a memory pool for request-scoped allocation, a red-black tree for timers and caches, a radix tree for IP routing, a hash table with wildcard support for server name matching, and an incremental JSON parser. The build system (auto/) is a sophisticated set of shell scripts that handle platform detection, dependency configuration, and module compilation. The code supports HTTP/1.x, HTTP/2, HTTP/3 (QUIC), TCP/UDP proxying (Stream module), and mail protocols (POP3, IMAP, SMTP). It is actively maintained, with a strong focus on performance, stability, and security. The code is exceptionally clean and well-structured for a project of its age and complexity, though it contains some platform-specific #ifdef sprawl and duplication between HTTP and Stream modules (e.g., upstream least_time, map).

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 6 reusable components found
nginx-proxy/docker-gen ★ 4631 608 APPLICATION

docker-gen is a Go CLI tool that generates configuration files from Docker container metadata using Go templates. It connects to the Docker daemon, lists containers based on configurable filters (exposed ports, labels, etc.), and renders templates with container data (IPs, ports, environment variables, labels, networks). The generated output can be written to files or stdout, and docker-gen can notify services by running commands or sending signals to containers when the output changes. It supports watching Docker events for automatic regeneration with configurable debouncing. The architecture is a single binary with well-separated internal packages: config parsing, Docker client abstraction, container context extraction, template engine with custom functions (filtering, grouping, sorting, nginx-specific quoting/HSTS validation), and a generator that orchestrates event listening, signal handling, and file generation. The codebase is mature, extensively tested, and demonstrates high craftsmanship in its generic template helper functions (deepGet, where, groupBy, sortBy) which are reusable beyond this project. It is primarily used as part of the nginx-proxy ecosystem to auto-generate reverse proxy configurations, but can be adapted for any file generation from Docker metadata.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 6 reusable components found
nginx/nginx-prometheus-exporter ★ 2016 369 APPLICATION

The NGINX Prometheus Exporter is a production-grade Go service that bridges NGINX and NGINX Plus metrics into Prometheus. In operation, Prometheus scrapes the exporter's HTTP endpoint (default :9113/metrics) and on each scrape the exporter fetches live metrics from either the NGINX stub_status page or the NGINX Plus REST API, converts them into typed Prometheus metrics (gauge/counter), and serves them alongside an nginx_up/nginxplus_up health gauge. The binary supports multiple concurrent scrape targets, TLS client auth against NGINX, unix domain sockets, PROXY protocol v2 outbound connections, and the full exporter-toolkit web configuration surface (TLS termination, basic auth, systemd socket activation). Architecturally it is a compact, idiomatic Go application with three layers: the main package owns CLI flags (kingpin), TLS setup, transport construction, and HTTP server lifecycle; the client package is a minimal self-contained stub_status HTTP client; the collector package implements prometheus.Collector in two variants — NginxCollector for OSS (7 metrics) and NginxPlusCollector for Plus (roughly 300 metrics spanning server zones, upstreams, stream zones, zone sync, resolvers, limit zones, cache, workers, and license state). The Plus collector is the dominant subsystem; its notable design feature is a LabelUpdater interface backed by RWMutex-protected maps that allows an external system (NGINX Ingress Controller) to dynamically inject additional label names and values into upstream/server-zone/cache metrics between scrapes. The release and quality engineering around the code is exceptional: GoReleaser multi-arch builds (10 OSes, 12 architectures), cosign-signed artifacts, SBOM/provenance attestations, multi-registry Docker publishing (DockerHub, GHCR, ECR, Quay), Homebrew/Scoop/Nix distribution, OpenSSF Scorecards, CodeQL, anchore image scanning, and a 60-linter golangci-lint configuration. A retract directive in go.mod cleanly handles a broken v1.5.2 release, indicating disciplined release management. Dependencies are current (Go 1.25, prometheus client_golang v1.24, exporter-toolkit v0.17). The main weakness is that the Plus collector is a single ~3000-line monolith with heavy repetition in metric emission and only minimal unit-test coverage for its most complex paths.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 3 reusable components found
cloudflare/lua-resty-logger-socket ★ 493 128 APPLICATION

lua-resty-logger-socket is a Lua library for Nginx (using ngx_lua) that provides nonblocking remote logging. It buffers log messages in memory and sends them to a remote log server (via TCP, UDP, or Unix domain socket) when the buffer reaches a configurable size or when manually flushed. The library implements efficient buffering with two-level buffers to minimize string concatenation, buffer reuse to prevent memory leaks, retry logic for connection and send failures, periodic flushing, and graceful handling of Nginx worker shutdown to flush remaining logs. It supports SSL with SNI and certificate verification.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 1 reusable components found
1Panel-dev/1Panel ★ 37118 3371 APPLICATION

1Panel is a production-grade, open-source Linux server management panel built on a distributed core-agent architecture. The system provides a comprehensive web-based GUI (Vue 3 frontend) and a REST API (Go/Gin) that orchestrates an agent running on each managed host. It covers the full server lifecycle: website management (Nginx/OpenResty with custom config parser), database administration (MySQL, PostgreSQL, MongoDB, Redis), Docker container orchestration, firewall management (abstraction over iptables, nftables, firewalld, UFW), system monitoring, backup/restore to multiple cloud storage providers, cron jobs, SSL certificate automation via ACME, and terminal access (local, SSH, container) with AI-assisted command generation. The architecture splits control plane (core) and execution plane (agent) communicating over Unix sockets or HTTPS, supporting multi-node environments. Notable engineering highlights include a reusable task framework with retry/rollback, a firewall lifecycle abstraction with rule identity hashing, a custom Nginx config lexer/parser, and an enterprise extension system via Go build tags and frontend dynamic imports. The codebase is actively maintained with frequent commits and a large open-source community (37k+ stars). However, there is significant code duplication between core and agent packages, and some hardcoded paths and legacy migration logic add complexity.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 3 reusable components found

This repository provides a comprehensive Nginx security configuration package to block malicious bots, spam referrers, bad IPs, and vulnerability scanners. It includes curated blocklists (bad user agents, referrers, IPs, fake Googlebots), rate limiting/DDoS protection, and optional fail2ban integration. The core deliverable is a set of modular Nginx include files (bots.d/, conf.d/) and shell scripts (install-ngxblocker, setup-ngxblocker, update-ngxblocker) for automated deployment and daily updates. It also generates Google Analytics ghost spam exclusion lists and a Google Search Console disavow file. The architecture is a collection of configuration templates and deployment tooling, not a standalone application; it is designed to be included into existing Nginx server blocks. The repository is actively maintained with frequent updates to blocklists and CI testing across multiple Linux distributions.

RATING: 8.3/10 MAINT: active DRIFT: low
▸ 5 reusable components found
NginxProxyManager/nginx-proxy-manager ★ 34335 3924 APPLICATION

Nginx Proxy Manager is a full-stack web application that provides a graphical user interface and REST API for managing Nginx reverse proxy configurations, SSL/TLS certificates (via Let's Encrypt or custom uploads), TCP/UDP streams, access control lists, and user permissions. The system is designed to run as a Docker container and is primarily used by self-hosting enthusiasts and small-to-medium deployments to simplify the otherwise complex task of configuring Nginx and maintaining certificates. The architecture is a classic three-tier web application: a Node.js/Express backend (ES modules) with Objection.js/Knex ORM supporting SQLite, MySQL, and PostgreSQL; a React 18/19 frontend built with TypeScript, Vite, TanStack Query, and Tabler UI; and a set of s6-overlay managed services (backend, frontend, Nginx) inside a single Docker image. The backend generates Nginx configuration files from Liquid templates and reloads Nginx on any change. External dependencies include Nginx, Certbot (for Let's Encrypt), OpenSSL, and optionally a database server. Key entry points are `backend/index.js` (server startup, migration, setup, Express app) and `frontend/src/main.tsx` (React bootstrap). The primary data flow is: user creates or modifies a proxy host, redirection, stream, or certificate via the UI → API call → backend validates permissions and data → persists to database → regenerates relevant Nginx config files → tests configuration → reloads Nginx. The system also periodically checks for certificate expiration and renews via Certbot, and fetches IP ranges from Cloudflare/Cloudfront for access control. The codebase demonstrates solid engineering practices: a consistent internal service layer with access control and audit logging, a well-typed API client with automatic camelCase/decamelize conversion, a reusable table framework built on TanStack Table, and a comprehensive i18n system supporting 24+ locales. While some modules (e.g., certificate management) are large and could benefit from refactoring, the overall structure is clean and maintainable.

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 4 reusable components found
SteveLTN/https-portal ★ 4693 296 APPLICATION

HTTPS-PORTAL is a Docker image that automates HTTPS setup using Nginx and Let's Encrypt. It provides a fully automated reverse proxy that obtains SSL certificates, configures Nginx, and handles renewal. The container runs multiple supervised processes via s6-overlay: Nginx, docker-gen (for automatic container discovery), cron (for certificate renewal), and a dynamic environment watcher. Configuration is driven by environment variables, primarily the `DOMAINS` variable which supports a rich syntax for specifying upstreams, redirects, basic auth, access restrictions, custom ports, and per-domain stages. The codebase is primarily Ruby scripts that parse domain descriptors, generate Nginx configuration from ERB templates, and orchestrate certificate signing via acme-tiny. The architecture is clean and modular, with clear separation between domain parsing, certificate management, and Nginx configuration generation. The repository includes comprehensive integration tests using Docker Compose and RSpec.

RATING: 8.2/10 MAINT: maintained DRIFT: low
▸ 2 reusable components found
Varying-Vagrant-Vagrants/VVV ★ 4524 820 APPLICATION

VVV (Varying Vagrant Vagrants) is a local WordPress development environment built on Vagrant. It automates provisioning of a Ubuntu-based virtual machine with a full LEMP stack (Nginx, PHP 8.2+, MariaDB 10.11), along with tools like WP-CLI, Composer, Node.js, Memcached, MailHog, and Xdebug. Users define sites and extensions in a YAML config file; VVV clones site templates, generates Nginx configurations, creates databases, and runs setup scripts. Provisioning uses a modular hook system that allows core components (PHP, Nginx, MariaDB, etc.) to register callbacks at specific phases, enabling extensibility via custom extensions and site provisioners. The codebase demonstrates robust error handling, network retries with exponential backoff, atomic file operations, and performance optimizations like apt update caching and command existence caching. While primarily written in Bash with inherent script fragility, the architecture is well-structured, actively maintained, and regularly updated to support current Ubuntu LTS releases and software versions.

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 3 reusable components found
alexellis/arkade ★ 4612 300 APPLICATION

arkade is a command-line tool that functions as a marketplace and installer for developer tools and Kubernetes applications. It provides two primary workflows: downloading CLI binaries (over 200 tools) and installing Kubernetes Helm charts (over 50 apps) with custom overrides. The tool also supports OCI image installation/publishing, Helm chart image version upgrades, system-level package installation (e.g., Node.js, Caddy), and self-updating with SHA-256 verification. The architecture is a monolithic Go CLI built with Cobra, where each subcommand (get, install, update, system, oci, chart, etc.) is a separate command tree. Entry points include main.go (root command) and the various command files under cmd/. External dependencies include GitHub releases API, Helm CLI, kubectl, Docker (for qemu-static), and OCI registries. The codebase demonstrates solid engineering with reusable patterns such as template-based tool definitions, safe archive extraction, and a builder pattern for installer options, though it suffers from a large manual catalog that requires ongoing maintenance.

RATING: 8.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
matsumotory/ngx_mruby ★ 997 115 APPLICATION

The ngx_mruby repository provides an Nginx module that embeds the mruby interpreter, enabling Ruby scripting for Nginx request processing. It allows developers to write Nginx configuration directives, content handlers, and filters in Ruby, offering an alternative to Lua-based solutions like OpenResty. The repository bundles mruby and includes a set of mruby gems tailored for Nginx integration, such as socket and IO extensions. The architecture consists of the ngx_mruby C module that interfaces with Nginx's API and the mruby C API, along with a customized mruby build. Key entry points are Nginx directives like `mruby_content_handler` and `mruby_set`, which execute mruby code during specific request phases. The mruby API exposes Nginx-specific classes (e.g., `Nginx::Request`, `Nginx::SSL`) via the `ngx_mruby_mrblib` gem. Data flows involve Nginx hooking into request processing phases, invoking mruby code that can inspect and modify requests/responses, then continuing with Nginx's standard processing. While the codebase demonstrates solid engineering, it faces maintenance challenges due to dependency on specific versions of Nginx and mruby, and the use of an outdated base image in the Dockerfile. The ngx_devel_kit dependency provides reusable helpers for Nginx module development, such as variable handling and HTTP manipulation functions, which exhibit good craftsmanship and could be extracted for use in other Nginx modules.

RATING: 7.9/10 MAINT: active DRIFT: medium
▸ 1 reusable components found
hydroshare/hydroshare ★ 199 43 APPLICATION

HydroShare is a Django-based web application for sharing, managing, and publishing hydrologic data and models. It provides a rich resource management system with support for various file types (NetCDF, GeoTIFF, timeseries, etc.), fine-grained access control (groups, communities, privileges), metadata extraction, and discovery via a Vue.js frontend. The system uses PostgreSQL, Redis, Celery, MinIO (S3-compatible storage), and MongoDB for indexing. It exposes REST APIs for programmatic access and includes background tasks for bag creation, metadata extraction, and DOI registration. While primarily an application, it incorporates data engineering patterns for scientific metadata handling and file type aggregation.

RATING: 7.9/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
owasp-modsecurity/ModSecurity ★ 9799 1753 APPLICATION

ModSecurity v3 (libmodsecurity) is a C++17 Web Application Firewall (WAF) rule engine that parses SecLang configuration and rules, then evaluates them against HTTP transaction data. It is a library rather than a standalone server: connectors such as nginx or IIS feed requests through Transaction phase methods (processConnection, processURI, processRequestHeaders, processRequestBody, processResponseHeaders, processResponseBody, processLogging). The engine resolves ModSecurity variables (ARGS, REQUEST_HEADERS, FILES, TX, etc.), applies transformation pipelines (base64Decode, urlDecode, normalisePath, removeComments, htmlEntityDecode), evaluates operators (rx, pm, ipMatch, detectSQLi/detectXSS via libinjection, verifyCC, geoLookup), and executes actions (deny, allow, redirect, setvar, ctl:*). It supports multipart/JSON/XML/urlencoded request body parsing, audit logging through serial/parallel/HTTPS writers, and persistent collections on LMDB or in-memory backends. The code is organized around plugin-style base classes and factory instantiation for actions, operators, transformations, and variables, with a Bison/Flex generated parser for the SecLang grammar. Although the repository contains a rich JSON-based regression-test corpus, its character is overwhelmingly an application/library, not a data-research project. Architecture is modular but carries legacy baggage: autotools build system, extensive #ifdef feature gates (CURL, LMDB, Lua, libxml2, GeoIP/MaxMind, ssdeep, PCRE/PCRE2), manual memory management, and some stubbed operators. Duplicated CI workflows and long-standing TODOs indicate medium technical drift, but the project remains actively maintained and is a solid, widely deployed security library with several genuinely reusable low-level components.

RATING: 7.8/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
linuxserver/docker-bookstack ★ 1004 138 APPLICATION

This repository packages the BookStack wiki application into a Docker container. It provides Dockerfiles for building images on x86_64 and ARM64, using a base Alpine image with Nginx and PHP-FPM. Container initialization scripts handle database connection waiting, app key generation, Laravel migrations, and optional async queue worker. The repository includes a Jenkins pipeline and GitHub Actions workflows for automated builds and multi-registry releases. The codebase is well-structured, with clear separation of concerns between base image configuration, service management via s6-overlay, and application setup logic. It is a production-grade container build for self-hosting BookStack.

RATING: 7.8/10 MAINT: active DRIFT: low
▸ 2 reusable components found
apache/skywalking-nginx-lua ★ 199 69 APPLICATION

This repository contains the Apache SkyWalking Nginx Agent, a Lua-based library that provides distributed tracing capabilities for Nginx and OpenResty deployments. The agent integrates with Nginx's Lua API to automatically trace incoming and outgoing HTTP requests, propagate trace context between services using custom headers (sw8 and sw8-correlation), and report trace data to a SkyWalking OAP server. The architecture uses Nginx's phased execution model (init_worker, rewrite, body_filter, log) to manage the tracing lifecycle, with a shared dictionary for buffering trace segments and a timer for periodic reporting and heartbeats. The codebase demonstrates strong engineering practices with clear separation of concerns, comprehensive error handling, and performance optimizations like table pooling to reduce garbage collection pressure in LuaJIT. Several components show particular craftsmanship and reusability: the utility module provides high-performance table pooling and ID generation; the correlation context module implements lightweight context propagation via base64-encoded headers; and the segment reference module handles trace context serialization for cross-process tracing.

RATING: 7.8/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
singh-inder/supabase-automated-self-host ★ 505 80 APPLICATION

This repository provides a fully automated, one-command deployment of a self-hosted Supabase stack. The setup script (`setup.sh`) orchestrates the entire process: it installs dependencies, clones the repository, generates cryptographic secrets and JWT tokens, configures environment variables, and layers optional docker-compose overrides for Authelia 2FA, Nginx or Caddy reverse proxy, and SSL via Let's Encrypt. The architecture is a Docker Compose multi-service deployment including Supabase Studio, Kong API gateway, GoTrue auth, PostgREST, Realtime, Storage, Edge Functions, and a custom Postgres image. The code is production-grade with robust error handling, CI/CD pipelines (GitHub Actions) that test every configuration matrix (caddy/nginx, basic auth/authelia/redis), and comprehensive integration tests covering CRUD operations, storage, realtime subscriptions, and edge functions. The repository also includes advanced utilities for key management (asymmetric JWTs, opaque API keys) and a sophisticated Postgres 15-to-17 upgrade script (`upgrade-pg17.sh`) that handles binary extraction, pg_upgrade, and post-migration patches. While primarily a deployment tool, the scripts demonstrate high craftsmanship and are safely reusable as templates for similar self-hosting scenarios.

RATING: 7.7/10 MAINT: maintained DRIFT: low
▸ 4 reusable components found
itiligent/Easy-Guacamole-Installer ★ 502 90 APPLICATION

This repository provides a comprehensive, modular set of Bash scripts to automate the installation and configuration of Apache Guacamole—an open-source remote desktop gateway. The primary orchestrator '1-setup.sh' handles interactive prompts and silent install variables to deploy Guacamole server and client from source, integrate MySQL/MariaDB as the backend database, set up Nginx as a reverse proxy, and optionally configure TLS (self-signed or Let's Encrypt), multi-factor authentication (TOTP, Duo, LDAP), and extra UI features like quick-connect and session recording storage. The scripts are well-structured with extensive error checking, logging, distro-specific workarounds, and support for modular post-install add-ons. Though not a library for reuse, the code demonstrates solid shell scripting craftsmanship, security hardening (fail2ban integration, firewall rules), and separation of concerns. The repository serves as a turnkey deployment toolkit for production-grade Guacamole environments.

RATING: 7.7/10 MAINT: active DRIFT: low
▸ 3 reusable components found
neuland/micro-frontends ★ 4680 473 APPLICATION

This repository is the source code for the micro-frontends.org website, an educational resource explaining the Micro Frontends architectural pattern. It contains a Jekyll-based static site with detailed tutorials, along with multiple self-contained example applications (plain HTML, client-side composition, universal composition, and data-fetching) that demonstrate key Micro Frontends concepts. The example code is organized by team (red, blue, green) and uses Custom Elements, Server-Side Includes (SSI), Docker Compose, and Nginx to illustrate how to build independent frontend fragments that can be composed into a cohesive application. The repository serves primarily as a learning tool and reference implementation, not a production-ready framework.

RATING: 7.2/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
mashirozx/Pixiv-Nginx ★ 1992 200 APPLICATION

This repository provides a preconfigured Nginx reverse proxy distribution designed to bypass regional internet censorship (primarily for Pixiv, but also covering GitHub, Steam, Discord, and other services). It includes a portable Nginx binary, self-signed SSL certificate generation scripts, and a set of modular site-specific configuration files that rewrite SNI and proxy requests to real upstream IP addresses. The system requires no VPN; instead, it modifies the user's `hosts` file to redirect target domains to localhost, where Nginx intercepts the traffic. The primary entry points are Windows batch scripts (e.g., `5.调试工具(这个功能全).bat`) for starting, stopping, and reloading Nginx, while the core configuration is in `conf/nginx.conf` which includes reusable shared proxy parameters and site-specific configs. Certificate generation is handled by a standalone batch script folder (`自签证书傻瓜式批处理包/`) that creates a root CA and signs server certificates for all proxied domains. The repository is not a development framework or data pipeline; it is an end-user tool for circumventing censorship, with a strong emphasis on easy setup and maintenance through regular IP list updates.

RATING: 7.0/10 MAINT: active DRIFT: medium
▸ 2 reusable components found
midoks/mdserver-web ★ 4521 717 APPLICATION

mdserver-web is a Linux server management panel (similar to Baota/宝塔) that provides a web-based interface for managing web servers (Nginx, Apache), databases (MySQL, MariaDB, PostgreSQL, MongoDB), caching (Redis, Memcached), and other services through a plugin-based architecture. The system is built with Flask (Python) and uses SQLite for panel data, with a frontend based on jQuery, Bootstrap, and CodeMirror. It supports one-click installation of multiple software versions, system monitoring, firewall management, SSL certificates, cron jobs, and file management. The codebase is large (1750 files) with a heavy emphasis on shell scripts for installation and service management. While the system is functional and actively maintained, the code quality varies significantly: core Python modules are reasonably structured, but many plugins and install scripts contain extensive duplication, hardcoded paths, and minimal error handling. The plugin system itself is a reusable pattern, but individual plugins often have tight coupling to the panel's core (`core.mw`). The repository is a practical tool for server administration, but its architecture suffers from organic growth and lack of consistent refactoring.

RATING: 6.8/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
$ loading more...
$ submit: