This commit is contained in:
snltty
2024-12-07 13:37:14 +08:00
parent d9f8a230b6
commit b602461e82
13 changed files with 53 additions and 58 deletions

View File

@@ -57,9 +57,9 @@ jobs:
docker tag snltty/linker-musl-x64:latest snltty/linker-musl:amd64 && \
docker push snltty/linker-musl:amd64 && \
docker manifest create snltty/linker-musl:latest snltty/linker-musl:amd64 snltty/linker-musl:arm64 snltty/linker-musl:arm && \
docker manifest create snltty/linker-musl:v1.6.1 snltty/linker-musl:amd64 snltty/linker-musl:arm64 snltty/linker-musl:arm && \
docker manifest create snltty/linker-musl:v1.6.2 snltty/linker-musl:amd64 snltty/linker-musl:arm64 snltty/linker-musl:arm && \
docker manifest push snltty/linker-musl:latest && \
docker manifest push snltty/linker-musl:v1.6.1 && \
docker manifest push snltty/linker-musl:v1.6.2 && \
docker pull --platform linux/arm/v7 snltty/linker-debian-arm:latest && \
docker tag snltty/linker-debian-arm:latest snltty/linker-debian:arm && \
docker push snltty/linker-debian:arm && \
@@ -70,6 +70,6 @@ jobs:
docker tag snltty/linker-debian-x64:latest snltty/linker-debian:amd64 && \
docker push snltty/linker-debian:amd64 && \
docker manifest create snltty/linker-debian:latest snltty/linker-debian:amd64 snltty/linker-debian:arm64 snltty/linker-debian:arm && \
docker manifest create snltty/linker-debian:v1.6.1 snltty/linker-debian:amd64 snltty/linker-debian:arm64 snltty/linker-debian:arm && \
docker manifest create snltty/linker-debian:v1.6.2 snltty/linker-debian:amd64 snltty/linker-debian:arm64 snltty/linker-debian:arm && \
docker manifest push snltty/linker-debian:latest && \
docker manifest push snltty/linker-debian:v1.6.1
docker manifest push snltty/linker-debian:v1.6.2

View File

@@ -33,11 +33,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
with:
tag_name: v1.6.1
release_name: v1.6.1.${{ steps.date.outputs.today }}
tag_name: v1.6.2
release_name: v1.6.2.${{ steps.date.outputs.today }}
draft: false
prerelease: false
body: "1. 优化中继节点\r\n2. 优化虚拟网卡的端口转发,仅有变化时重建列表\r\n3. 优化网点对网和网对网,目标下线后,更新路由\r\n4. 优化端口转发,端口监听失败多尝试几次"
body: "1. 修复UI\r\n2. 修复服务端重启无法关闭内网穿透的问题\r\n3. 修复网络掩码计算错误"
- name: upload-win-x86-oss
id: upload-win-x86-oss
uses: tvrcgo/oss-action@v0.1.1
@@ -47,7 +47,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-win-x86.zip
target-path: /downloads/linker/v1.6.1/linker-win-x86.zip
target-path: /downloads/linker/v1.6.2/linker-win-x86.zip
- name: upload-win-x86
id: upload-win-x86
uses: actions/upload-release-asset@master
@@ -67,7 +67,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-win-x64.zip
target-path: /downloads/linker/v1.6.1/linker-win-x64.zip
target-path: /downloads/linker/v1.6.2/linker-win-x64.zip
- name: upload-win-x64
id: upload-win-x64
uses: actions/upload-release-asset@master
@@ -87,7 +87,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-win-arm64.zip
target-path: /downloads/linker/v1.6.1/linker-win-arm64.zip
target-path: /downloads/linker/v1.6.2/linker-win-arm64.zip
- name: upload-win-arm64
id: upload-win-arm64
uses: actions/upload-release-asset@master
@@ -107,7 +107,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-linux-x64.zip
target-path: /downloads/linker/v1.6.1/linker-linux-x64.zip
target-path: /downloads/linker/v1.6.2/linker-linux-x64.zip
- name: upload-linux-x64
id: upload-linux-x64
uses: actions/upload-release-asset@master
@@ -127,7 +127,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-linux-arm.zip
target-path: /downloads/linker/v1.6.1/linker-linux-arm.zip
target-path: /downloads/linker/v1.6.2/linker-linux-arm.zip
- name: upload-linux-arm
id: upload-linux-arm
uses: actions/upload-release-asset@master
@@ -147,7 +147,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-linux-arm64.zip
target-path: /downloads/linker/v1.6.1/linker-linux-arm64.zip
target-path: /downloads/linker/v1.6.2/linker-linux-arm64.zip
- name: upload-linux-arm64
id: upload-linux-arm64
uses: actions/upload-release-asset@master
@@ -167,7 +167,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-linux-musl-x64.zip
target-path: /downloads/linker/v1.6.1/linker-linux-musl-x64.zip
target-path: /downloads/linker/v1.6.2/linker-linux-musl-x64.zip
- name: upload-linux-musl-x64
id: upload-linux-musl-x64
uses: actions/upload-release-asset@master
@@ -187,7 +187,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-linux-musl-arm.zip
target-path: /downloads/linker/v1.6.1/linker-linux-musl-arm.zip
target-path: /downloads/linker/v1.6.2/linker-linux-musl-arm.zip
- name: upload-linux-musl-arm
id: upload-linux-musl-arm
uses: actions/upload-release-asset@master
@@ -207,7 +207,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-linux-musl-arm64.zip
target-path: /downloads/linker/v1.6.1/linker-linux-musl-arm64.zip
target-path: /downloads/linker/v1.6.2/linker-linux-musl-arm64.zip
- name: upload-linux-musl-arm64
id: upload-linux-musl-arm64
uses: actions/upload-release-asset@master
@@ -227,7 +227,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-osx-x64.zip
target-path: /downloads/linker/v1.6.1/linker-osx-x64.zip
target-path: /downloads/linker/v1.6.2/linker-osx-x64.zip
- name: upload-osx-x64
id: upload-osx-x64
uses: actions/upload-release-asset@master
@@ -247,7 +247,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-osx-arm64.zip
target-path: /downloads/linker/v1.6.1/linker-osx-arm64.zip
target-path: /downloads/linker/v1.6.2/linker-osx-arm64.zip
- name: upload-osx-arm64
id: upload-osx-arm64
uses: actions/upload-release-asset@master
@@ -277,7 +277,7 @@ jobs:
key-secret: ${{ secrets.ALIYUN_OSS_SECRET }}
bucket: ide-qbcode
asset-path: ./public/publish-zip/linker-windows-route.zip
target-path: /downloads/linker/v1.6.1/linker-windows-route.zip
target-path: /downloads/linker/v1.6.2/linker-windows-route.zip
- name: upload-version-oss
id: upload-version-oss
uses: tvrcgo/oss-action@v0.1.1

View File

@@ -38,6 +38,6 @@ jobs:
- name: Push
run: |
nuget push ./linker.tunnel/bin/release/linker.tunnel.1.6.1.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_KEY }} -NoSymbol
nuget push ./linker.libs/bin/release/linker.libs.1.6.1.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_KEY }} -NoSymbol
nuget push ./linker.tun/bin/release/linker.tun.1.6.1.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_KEY }} -NoSymbol
nuget push ./linker.tunnel/bin/release/linker.tunnel.1.6.2.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_KEY }} -NoSymbol
nuget push ./linker.libs/bin/release/linker.libs.1.6.2.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_KEY }} -NoSymbol
nuget push ./linker.tun/bin/release/linker.tun.1.6.2.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_KEY }} -NoSymbol

View File

@@ -96,7 +96,6 @@ namespace linker.libs
}
static List<string> starts = new() { "10.", "100.", "192.168.", "172." };
public static ushort GetRouteLevel(string server, out List<IPAddress> result)
{
@@ -163,7 +162,6 @@ namespace linker.libs
}
private static byte[] ipv6LocalBytes = new byte[] { 254, 128, 0, 0, 0, 0, 0, 0 };
public static IPAddress[] GetIPV6()
{
@@ -194,19 +192,17 @@ namespace linker.libs
return Array.Empty<IPAddress>();
}
public static byte PrefixValue2Length(uint ip)
{
byte maskLength = 32;
for (int i = 0; i < sizeof(uint); i++)
int maskLength = 32, i;
for (i = 0; i < sizeof(uint) * 8; i++)
{
if (((ip >> (i * 8)) & 0x000000ff) != 0)
if (((ip >> i) & 0x01) != 0)
{
break;
}
maskLength -= 8;
}
return maskLength;
return (byte)(maskLength - i);
}
public static uint PrefixLength2Value(byte prefixLength)
{
@@ -219,7 +215,6 @@ namespace linker.libs
return new IPAddress(BitConverter.GetBytes(BinaryPrimitives.ReverseEndianness(prefixIP)));
}
public static uint IP2Value(IPAddress ip)
{
return BinaryPrimitives.ReadUInt32BigEndian(ip.GetAddressBytes());
@@ -229,7 +224,6 @@ namespace linker.libs
return new IPAddress(BitConverter.GetBytes(BinaryPrimitives.ReverseEndianness(value)));
}
public static IPAddress NetworkIP2IP(IPAddress ip, uint prefixIP)
{
return NetworkValue2Ip(BinaryPrimitives.ReadUInt32BigEndian(ip.GetAddressBytes()), prefixIP);

View File

@@ -14,9 +14,9 @@
<Copyright>snltty</Copyright>
<PackageProjectUrl>https://github.com/snltty/linker</PackageProjectUrl>
<RepositoryUrl>https://github.com/snltty/linker</RepositoryUrl>
<Version>1.6.1</Version>
<AssemblyVersion>1.6.1</AssemblyVersion>
<FileVersion>1.6.1</FileVersion>
<Version>1.6.2</Version>
<AssemblyVersion>1.6.2</AssemblyVersion>
<FileVersion>1.6.2</FileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>

Binary file not shown.

View File

@@ -16,9 +16,9 @@
<PackageProjectUrl>https://github.com/snltty/linker</PackageProjectUrl>
<RepositoryUrl>https://github.com/snltty/linker</RepositoryUrl>
<PackageReleaseNotes>linker tun</PackageReleaseNotes>
<Version>1.6.1</Version>
<AssemblyVersion>1.6.1</AssemblyVersion>
<FileVersion>1.6.1</FileVersion>
<Version>1.6.2</Version>
<AssemblyVersion>1.6.2</AssemblyVersion>
<FileVersion>1.6.2</FileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -16,9 +16,9 @@
<PackageProjectUrl>https://github.com/snltty/linker</PackageProjectUrl>
<RepositoryUrl>https://github.com/snltty/linker</RepositoryUrl>
<PackageReleaseNotes>linker tunnel</PackageReleaseNotes>
<Version>1.6.1</Version>
<AssemblyVersion>1.6.1</AssemblyVersion>
<FileVersion>1.6.1</FileVersion>
<Version>1.6.2</Version>
<AssemblyVersion>1.6.2</AssemblyVersion>
<FileVersion>1.6.2</FileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -21,17 +21,16 @@
<Title>linker</Title>
<Authors>snltty</Authors>
<Company>snltty</Company>
<Description>1. 优化中继节点
2. 优化虚拟网卡的端口转发,仅有变化时重建列表
3. 优化网点对网和网对网,目标下线后,更新路由
4. 优化端口转发,端口监听失败多尝试几次</Description>
<Description>1. 修复UI
2. 修复服务端重启无法关闭内网穿透的问题
3. 修复网络掩码计算错误</Description>
<Copyright>snltty</Copyright>
<PackageProjectUrl>https://github.com/snltty/linker</PackageProjectUrl>
<RepositoryUrl>https://github.com/snltty/linker</RepositoryUrl>
<PackageReleaseNotes>linker</PackageReleaseNotes>
<Version>1.6.1</Version>
<AssemblyVersion>1.6.1</AssemblyVersion>
<FileVersion>1.6.1</FileVersion>
<Version>1.6.2</Version>
<AssemblyVersion>1.6.2</AssemblyVersion>
<FileVersion>1.6.2</FileVersion>
</PropertyGroup>

View File

@@ -4,6 +4,7 @@ using linker.plugins.client;
using linker.plugins.messenger;
using linker.plugins.tuntap.messenger;
using linker.libs;
using linker.libs.extends;
namespace linker.plugins.tuntap.lease
{
@@ -39,7 +40,8 @@ namespace linker.plugins.tuntap.lease
});
if (resp.Code == MessageResponeCodes.OK)
{
return MemoryPackSerializer.Deserialize<LeaseInfo>(resp.Data.Span);
LeaseInfo info = MemoryPackSerializer.Deserialize<LeaseInfo>(resp.Data.Span);
return info;
}
return new LeaseInfo { IP = IPAddress.Any, PrefixLength = 24 };
}

View File

@@ -4,6 +4,7 @@ using System.Net;
using linker.libs;
using MemoryPack;
using System.Collections.Concurrent;
using linker.libs.extends;
namespace linker.plugins.tuntap.lease
{

View File

@@ -33,16 +33,16 @@ do
fi
done
cd public/publish/docker/linux-${p}-x64/${f}
docker buildx build -f ${target}/public/publish/docker/linux-${p}-x64/${f}/Dockerfile-${p} --platform="linux/x86_64" --force-rm -t "${image}-${p}-x64:latest" -t "${image}-${p}-x64:v1.6.1" . --push
docker buildx build -f ${target}/public/publish/docker/linux-${p}-x64/${f}/Dockerfile-${p} --platform="linux/x86_64" --force-rm -t "${image}-${p}-x64:latest" -t "${image}-${p}-x64:v1.6.2" . --push
cd ../../../../../
cd public/publish/docker/linux-${p}-arm64/${f}
docker buildx build -f ${target}/public/publish/docker/linux-${p}-arm64/${f}/Dockerfile-${p} --platform="linux/arm64" --force-rm -t "${image}-${p}-arm64:latest" -t "${image}-${p}-arm64:v1.6.1" . --push
docker buildx build -f ${target}/public/publish/docker/linux-${p}-arm64/${f}/Dockerfile-${p} --platform="linux/arm64" --force-rm -t "${image}-${p}-arm64:latest" -t "${image}-${p}-arm64:v1.6.2" . --push
cd ../../../../../
cd public/publish/docker/linux-${p}-arm/${f}
docker buildx build -f ${target}/public/publish/docker/linux-${p}-arm/${f}/Dockerfile-${p} --platform="linux/arm/v7" --force-rm -t "${image}-${p}-arm:latest" -t "${image}-${p}-arm:v1.6.1" . --push
docker buildx build -f ${target}/public/publish/docker/linux-${p}-arm/${f}/Dockerfile-${p} --platform="linux/arm/v7" --force-rm -t "${image}-${p}-arm:latest" -t "${image}-${p}-arm:v1.6.2" . --push
cd ../../../../../
done
done

View File

@@ -1,6 +1,5 @@
v1.6.1
2024-12-07 01:21:43
1. 优化中继节点
2. 优化虚拟网卡的端口转发,仅有变化时重建列表
3. 优化网点对网和网对网,目标下线后,更新路由
4. 优化端口转发,端口监听失败多尝试几次
v1.6.2
2024-12-07 13:37:13
1. 修复UI
2. 修复服务端重启无法关闭内网穿透的问题
3. 修复网络掩码计算错误