An open API service indexing awesome lists of open source software.

https://github.com/shibayan/appserviceproxy.siteextension

Site Extension-based Reverse Proxy compatible with Azure Functions Proxies
https://github.com/shibayan/appserviceproxy.siteextension

azure azure-app-service azure-site-extension reverse-proxy-server

Last synced: 6 months ago
JSON representation

Site Extension-based Reverse Proxy compatible with Azure Functions Proxies

Awesome Lists containing this project

README

          

# App Service Proxy Site Extension

[![Build](https://github.com/shibayan/AppServiceProxy.SiteExtension/workflows/Build/badge.svg)](https://github.com/shibayan/AppServiceProxy.SiteExtension/actions/workflows/build.yml)
[![Downloads](https://badgen.net/nuget/dt/AppServiceProxy.SiteExtension)](https://www.nuget.org/packages/AppServiceProxy.SiteExtension/)
[![NuGet](https://badgen.net/nuget/v/AppServiceProxy.SiteExtension)](https://www.nuget.org/packages/AppServiceProxy.SiteExtension/)
[![License](https://badgen.net/github/license/shibayan/AppServiceProxy.SiteExtension)](https://github.com/shibayan/AppServiceProxy.SiteExtension/blob/master/LICENSE)
[![Terraform Registry](https://badgen.net/badge/terraform/registry/5c4ee5)](https://registry.terraform.io/modules/shibayan/appservice-proxy/azurerm/latest)

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](https://user-images.githubusercontent.com/1356444/141622631-7d5c71c8-da20-4353-a898-141fdda73814.png)

- [Tip 21 - Adding Extensions to Web Apps in Azure App Service | Azure Tips and Tricks](https://microsoft.github.io/AzureTipsAndTricks/blog/tip21.html)

### ARM Template

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

### Bicep

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

### Terraform

See also [App Service Proxy Terraform module](https://github.com/shibayan/terraform-azurerm-appservice-proxy) repository.

## Usage

Create `proxies.json` into `wwwroot` directory.

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

## Appendix: `proxies.json` Reference

- [Advanced configuration - Work with proxies in Azure Functions | Microsoft Docs](https://docs.microsoft.com/en-us/azure/azure-functions/functions-proxies#advanced-configuration)

## License

This project is licensed under the [MIT License](https://github.com/shibayan/AppServiceProxy.SiteExtension/blob/master/LICENSE)