diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml
index f27c1b1..fae8a5d 100644
--- a/.github/workflows/publish-beta.yml
+++ b/.github/workflows/publish-beta.yml
@@ -13,11 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - name: Setup .NET
- uses: actions/setup-dotnet@v2
+ - uses: actions/checkout@v4
+ - name: Setup dotNET
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: 8.0.x
+ dotnet-version: 9.x
- name: Build
run: |
dotnet pack --version-suffix $(date "+%Y.%m%d-beta%H%M") -c Release -o out NewLife.MQTT/NewLife.MQTT.csproj
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 4151470..5b04729 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -13,9 +13,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup dotNET
- uses: actions/setup-dotnet@v3
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: 8.x
+ dotnet-version: 9.x
- name: Build
run: |
dotnet pack -c Release -o out NewLife.MQTT/NewLife.MQTT.csproj
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a74a004..3722781 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -15,9 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup dotNET
- uses: actions/setup-dotnet@v3
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: 8.x
+ dotnet-version: 9.x
- name: Build
run: |
dotnet build -c Release
diff --git a/NewLife.MQTT/ProxyProtocol/ProxyCodec.cs b/NewLife.MQTT/ProxyProtocol/ProxyCodec.cs
index 37c8645..90ca0ae 100644
--- a/NewLife.MQTT/ProxyProtocol/ProxyCodec.cs
+++ b/NewLife.MQTT/ProxyProtocol/ProxyCodec.cs
@@ -16,7 +16,7 @@ public class ProxyCodec : Handler
///
public override Object? Read(IHandlerContext context, Object message)
{
- if (message is IPacket pk && context is NetHandlerContext ctx && ctx.Data is ReceivedEventArgs e)
+ if (message is IPacket pk && context is NetHandlerContext ctx)
{
var data = pk.GetSpan();
if (ProxyMessage.FastValidHeader(data))
@@ -30,7 +30,7 @@ public class ProxyCodec : Handler
ext["Proxy"] = msg;
// 修改远程地址
- e.Remote = msg.GetClient().EndPoint;
+ ctx.Remote = msg.GetClient().EndPoint;
}
message = pk.Slice(rs);
@@ -50,7 +50,7 @@ public class ProxyCodec : Handler
ext["Proxy"] = msg;
// 修改远程地址
- e.Remote = msg.Client!.EndPoint;
+ ctx.Remote = msg.Client!.EndPoint;
}
message = pk.Slice(rs);
diff --git a/NewLife.MqttServer/NewLife.MqttServer.csproj b/NewLife.MqttServer/NewLife.MqttServer.csproj
index a2c2932..817eb98 100644
--- a/NewLife.MqttServer/NewLife.MqttServer.csproj
+++ b/NewLife.MqttServer/NewLife.MqttServer.csproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ net6.0;net8.0;net9.0
MqttServer
NewLife.MQTTServer
新生命MQTT服务器
@@ -16,13 +16,13 @@
$(VersionPrefix).*
false
..\Bin\Server
- false
+ true
latest
-
+
diff --git a/Test/Test.csproj b/Test/Test.csproj
index c8f16a9..d64eab9 100644
--- a/Test/Test.csproj
+++ b/Test/Test.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0
+ net9.0
新生命开发团队
©2002-2022 NewLife
1.0
diff --git a/XUnitTestClient/XUnitTestClient.csproj b/XUnitTestClient/XUnitTestClient.csproj
index ba34c00..204180e 100644
--- a/XUnitTestClient/XUnitTestClient.csproj
+++ b/XUnitTestClient/XUnitTestClient.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
..\Bin\UnitTest
false
false