Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 96a8b1b

Browse files
authored
Merge pull request #642 from justcoding121/master
netcoreapp2.1 target removed, use netstandard 2.1
2 parents e951ce9 + 35e3d3a commit 96a8b1b

18 files changed

+44
-60
lines changed

examples/Titanium.Web.Proxy.Examples.Basic/Titanium.Web.Proxy.Examples.Basic.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net461;netcoreapp3.0</TargetFrameworks>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
77
<LangVersion>7.1</LangVersion>
88
</PropertyGroup>

src/Titanium.Web.Proxy/ExplicitClientHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ await clientStreamWriter.WriteResponseAsync(connectArgs.HttpClient.Response,
210210
options.CertificateRevocationCheckMode = X509RevocationMode.NoCheck;
211211
await sslStream.AuthenticateAsServerAsync(options, cancellationToken);
212212

213-
#if NETCOREAPP2_1
213+
#if NETSTANDARD2_1
214214
clientConnection.NegotiatedApplicationProtocol = sslStream.NegotiatedApplicationProtocol;
215215
#endif
216216

@@ -336,7 +336,7 @@ await TcpHelper.SendRaw(clientStream, connection.Stream, BufferPool,
336336
await connection.StreamWriter.WriteLineAsync(cancellationToken);
337337
await connection.StreamWriter.WriteLineAsync("SM", cancellationToken);
338338
await connection.StreamWriter.WriteLineAsync(cancellationToken);
339-
#if NETCOREAPP2_1
339+
#if NETSTANDARD2_1
340340
await Http2Helper.SendHttp2(clientStream, connection.Stream,
341341
() => new SessionEventArgs(this, endPoint, cancellationTokenSource)
342342
{

src/Titanium.Web.Proxy/Extensions/SslExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal static string GetServerName(this ClientHelloInfo clientHelloInfo)
2828
return null;
2929
}
3030

31-
#if NETCOREAPP2_1 || NETSTANDARD2_1
31+
#if NETSTANDARD2_1
3232
internal static List<SslApplicationProtocol> GetAlpn(this ClientHelloInfo clientHelloInfo)
3333
{
3434
if (clientHelloInfo.Extensions != null && clientHelloInfo.Extensions.TryGetValue("ALPN", out var alpnExtension))
@@ -78,7 +78,7 @@ internal static Task AuthenticateAsServerAsync(this SslStream sslStream, SslServ
7878
#endif
7979
}
8080

81-
#if !NETCOREAPP2_1 && !NETSTANDARD2_1
81+
#if !NETSTANDARD2_1
8282
internal enum SslApplicationProtocol
8383
{
8484
Http11,

src/Titanium.Web.Proxy/Helpers/HttpHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private static async Task<int> startsWith(ICustomStreamReader clientStreamReader
167167
while (i < lengthToCheck)
168168
{
169169
int peeked = await clientStreamReader.PeekBytesAsync(buffer, i, i, lengthToCheck - i, cancellationToken);
170-
if (peeked == 0)
170+
if (peeked <= 0)
171171
return -1;
172172

173173
peeked += i;

src/Titanium.Web.Proxy/Http2/Http2Helper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETCOREAPP2_1 || NETSTANDARD2_1
1+
#if NETSTANDARD2_1
22
using System;
33
using System.Collections.Concurrent;
44
using System.Collections.Generic;

src/Titanium.Web.Proxy/Network/Tcp/TcpClientConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.IO;
33
using System.Net;
4-
#if NETCOREAPP2_1 || NETSTANDARD2_1
4+
#if NETSTANDARD2_1
55
using System.Net.Security;
66
#endif
77
using System.Net.Sockets;

src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
391391
CertificateRevocationCheckMode = proxyServer.CheckCertificateRevocation
392392
};
393393
await sslStream.AuthenticateAsClientAsync(options, cancellationToken);
394-
#if NETCOREAPP2_1 || NETSTANDARD2_1
394+
#if NETSTANDARD2_1
395395
negotiatedApplicationProtocol = sslStream.NegotiatedApplicationProtocol;
396396
#endif
397397

src/Titanium.Web.Proxy/Network/Tcp/TcpServerConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22
using System.Net;
3-
#if NETCOREAPP2_1 || NETSTANDARD2_1
3+
#if NETSTANDARD2_1
44
using System.Net.Security;
55
#endif
66
using System.Net.Sockets;

src/Titanium.Web.Proxy/RequestHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using System.Net;
55
using System.Net.Sockets;
6-
#if NETCOREAPP2_1 || NETSTANDARD2_1
6+
#if NETSTANDARD2_1
77
using System.Net.Security;
88
#endif
99
using System.Text.RegularExpressions;

src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp2.1</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
55
<RootNamespace>Titanium.Web.Proxy</RootNamespace>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
77
<SignAssembly>True</SignAssembly>
@@ -35,15 +35,6 @@
3535
</PackageReference>
3636
</ItemGroup>
3737

38-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
39-
<PackageReference Include="Microsoft.Win32.Registry">
40-
<Version>4.6.0</Version>
41-
</PackageReference>
42-
<PackageReference Include="System.Security.Principal.Windows">
43-
<Version>4.6.0</Version>
44-
</PackageReference>
45-
</ItemGroup>
46-
4738
<ItemGroup>
4839
<Compile Update="Network\WinAuth\Security\Common.cs">
4940
<ExcludeFromSourceAnalysis>True</ExcludeFromSourceAnalysis>

0 commit comments

Comments
 (0)