shibayan / AppServiceProxy.SiteExtension

Site Extension-based Reverse Proxy compatible with Azure Functions Proxies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App Service Proxy Site Extension

Build Downloads NuGet License Terraform Registry

Site Extension-based Reverse Proxy compatible with Azure Functions Proxies

Motivation

With the permanent removal of Azure Functions Proxies from Azure Functions v4, there is no longer a readily available and inexpensive L7 reverse proxy in Azure.

This project provides an alternative implementation of a VNET-integrated gateway built using Azure Functions Proxies, and secure proxies authenticated in combination with App Service Authentication.

Features

  • All features of the App Service is available
    • App Service Authentication
    • Custom Domain
    • SSL / TLS (Managed Certificate / Key Vault Certificate)
    • VNET Integration
    • Service Endpoint / Private Endpoint
  • .NET 7 and YARP-based high-performance reverse proxy
  • Compatibility with Azure Functions Proxies (proxies.json)
  • Easy to setup with Azure Portal or ARM Template
  • Support for Git integration and CI pipelines

Quick Start

Azure (Public) Azure China Azure Government

Manual Installation

Since this application is based on .NET 7 and Site Extension, it requires a App Service (Windows) with .NET 7 enabled.

You need to specify the App Service Proxy or AppServiceProxy.SiteExtension for installation.

Azure Portal

site extensions

ARM Template

{
  "apiVersion": "2022-09-01",
  "name": "AppServiceProxy.SiteExtension",
  "type": "siteextensions",
  "dependsOn": [
    "[resourceId('Microsoft.Web/sites', variables('webAppName'))]"
  ]
}

Bicep

resource symbolicname 'Microsoft.Web/sites/siteextensions@2022-09-01' = {
  name: '${webApp.name}/AppServiceProxy.SiteExtension'
}

Terraform

See also App Service Proxy Terraform module repository.

Usage

Create proxies.json into wwwroot directory.

{
  "$schema": "http://json.schemastore.org/proxies",
  "proxies": {
    "proxy1": {
      "matchCondition": {
        "methods": [ "GET" ],
        "route": "/{*path}"
      },
      "backendUri": "https://shibayan.jp/{path}"
    }
  }
}

Appendix: proxies.json Reference

License

This project is licensed under the MIT License

About

Site Extension-based Reverse Proxy compatible with Azure Functions Proxies

License:MIT License


Languages

Language:C# 95.2%Language:Bicep 4.8%