Skip to content

Commit

Permalink
Update more links
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan committed Feb 14, 2025
1 parent 80c67b3 commit 5f56033
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/designs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Config based proxies are common and we'll need to support at least basic proxy s

We have three relevant components that already have config systems: Kestrel, UrlRewrite, and ReverseProxy.

- [Kestrel](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.1#endpoint-configuration)
- [Kestrel](https://learn.microsoft.com/aspnet/core/fundamentals/servers/kestrel/endpoints)
- [UrlRewrite](https://github.com/dotnet/aspnetcore/blob/f4d81e3af2b969744a57d76d4d622036ac514a6a/src/Middleware/Rewrite/sample/UrlRewrite.xml#L1-L11)
- [ReverseProxy](https://github.com/dotnet/yarp/blob/b2cf5bdddf7962a720672a75f2e93913d16dfee7/samples/IslandGateway.Sample/appsettings.json#L10-L34)

Expand Down
2 changes: 1 addition & 1 deletion docs/designs/yarp-tunneling.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Introduction
While many organizations are moving their computing to the cloud, there are occasions where you need to be able to run some services in a local datacenter. The problem then is if you need to be able to communicate with those services from the cloud. Creating a VPN network connection to Azure or other cloud provider is possible, but usually involves a lot of red tape and configuration complexity as the two networks need to be integrated.

If all that the cloud needs to access is resources that are exposed over http, then a simpler solution is to have a gateway that can route traffic to the remote resource. Additionally, outbound connections over http(s) are not usually blocked, so having a on-prem gateway make an outbound connection to the cloud, is the easiest way to establish the route. This is the basis behind the [Azure Relay](https://docs.microsoft.com/en-us/azure/azure-relay/relay-what-is-it) service offering.
If all that the cloud needs to access is resources that are exposed over http, then a simpler solution is to have a gateway that can route traffic to the remote resource. Additionally, outbound connections over http(s) are not usually blocked, so having a on-prem gateway make an outbound connection to the cloud, is the easiest way to establish the route. This is the basis behind the [Azure Relay](https://learn.microsoft.com/azure/azure-relay/relay-what-is-it) service offering.

That is the principle of the tunnel feature for YARP. You operate two instances of the YARP proxy service, configured as a tunnel. The advantage over Azure Relay is that using a reverse proxy as an on-prem gateway means that both cloud and back end services can be used without needing to update the application other than addresses. This is particularly useful for services that may have been written by a 3rd party, or are no longer under active development, and so making changes to the configuration is complicated and expensive. Relay requires the sender and reciever to be updated to use its connection protocol.

Expand Down
2 changes: 1 addition & 1 deletion samples/BasicYarpSample/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// Base URLs the server listens on, must be configured independently of the routes below.
// Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints
// Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/aspnet/core/fundamentals/servers/kestrel/endpoints
"Urls": "http://localhost:5000;https://localhost:5001",

//Sets the Logging level for ASP.NET
Expand Down
2 changes: 1 addition & 1 deletion samples/ReverseProxy.Auth.Sample/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Authentication & Authorization sample

This sample shows how the YARP proxy can be integrated with the ASP.NET [authentication](https://docs.microsoft.com/aspnet/core/security/authentication) and [authorization](https://docs.microsoft.com/en-us/aspnet/core/security/authorization/introduction) system to specify claims requirements on routes that will be enforced by the proxy before it will forward applicable requests.
This sample shows how the YARP proxy can be integrated with the ASP.NET [authentication](https://docs.microsoft.com/aspnet/core/security/authentication) and [authorization](https://docs.microsoft.com/aspnet/core/security/authorization/introduction) system to specify claims requirements on routes that will be enforced by the proxy before it will forward applicable requests.

The sample includes the following parts:

Expand Down
2 changes: 1 addition & 1 deletion samples/ReverseProxy.Config.Sample/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// Base URLs the server listens on, must be configured independently of the routes below.
// Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints
// Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/aspnet/core/fundamentals/servers/kestrel/endpoints
"Urls": "http://localhost:5000;https://localhost:5001",

//Sets the Logging level for ASP.NET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal static class ConfigurationReadingExtensions
internal static TimeSpan? ReadTimeSpan(this IConfiguration configuration, string name)
{
// Format "c" => [-][d'.']hh':'mm':'ss['.'fffffff].
// You also can find more info at https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier
// You also can find more info at https://docs.microsoft.com/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier
return configuration[name] is string value ? TimeSpan.ParseExact(value, "c", CultureInfo.InvariantCulture) : null;
}

Expand Down
4 changes: 2 additions & 2 deletions src/ReverseProxy/Configuration/HttpClientConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public sealed record HttpClientConfig
/// Note: If you're using an encoding other than UTF-8 here, then you may also need to configure your server to accept request headers with such an encoding via the corresponding options for the server.
/// <para>
/// For example, when using Kestrel as the server, use <see cref="KestrelServerOptions.RequestHeaderEncodingSelector"/> to
/// <see href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/options">configure Kestrel</see> to use the same encoding.
/// <see href="https://learn.microsoft.com/aspnet/core/fundamentals/servers/kestrel/options">configure Kestrel</see> to use the same encoding.
/// </para>
/// </remarks>
public string? RequestHeaderEncoding { get; init; }
Expand All @@ -78,7 +78,7 @@ public sealed record HttpClientConfig
/// Note: If you're using an encoding other than ASCII here, then you may also need to configure your server to send response headers with such an encoding via the corresponding options for the server.
/// <para>
/// For example, when using Kestrel as the server, use <see cref="KestrelServerOptions.ResponseHeaderEncodingSelector"/> to
/// <see href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/options">configure Kestrel</see> to use the same encoding.
/// <see href="https://learn.microsoft.com/aspnet/core/fundamentals/servers/kestrel/options">configure Kestrel</see> to use the same encoding.
/// </para>
/// </remarks>
public string? ResponseHeaderEncoding { get; init; }
Expand Down

0 comments on commit 5f56033

Please sign in to comment.