This commit is contained in:
snltty
2024-06-23 20:41:38 +08:00
parent 73d21ec1fe
commit 4605251940
23 changed files with 43 additions and 9 deletions

View File

@@ -11,16 +11,13 @@
<div align="center">
<p><img src="./readme/logo.png" height="150"></p>
# linker
# linker、link anywhere
![GitHub Repo stars](https://img.shields.io/github/stars/snltty/linker?style=social)
![GitHub Repo forks](https://img.shields.io/github/forks/snltty/linker?style=social)
[![star](https://gitee.com/snltty/linker/badge/star.svg?theme=dark)](https://gitee.com/snltty/linker/stargazers)
[![fork](https://gitee.com/snltty/linker/badge/fork.svg?theme=dark)](https://gitee.com/snltty/linker/members)
<a href="https://jq.qq.com/?_wv=1027&k=ucoIVfz4" target="_blank">QQ 群1121552990</a>
</div>
## 简单说明
@@ -28,6 +25,7 @@
2. SSL加密
3. 使用了一些第三方库 **MemoryPack** 、**tun2socks** 、 **msquic**
4. 使用了winform、aardio 做窗体
5. <a href="https://jq.qq.com/?_wv=1027&k=ucoIVfz4" target="_blank">加入 QQ 群1121552990</a>
## 主要功能

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="linker.tray.win" libEmbed="true" icon="..\linker\favicon.ico" ui="win" output="linker.tray.win.exe" CompanyName="snltty" FileDescription="linker.tray.win" LegalCopyright="Copyright (C) snltty 2024" ProductName="linker.tray.win" InternalName="linker.install.win" FileVersion="0.0.0.28" ProductVersion="0.0.0.28" publishDir="/dist/" dstrip="false" local="false" ignored="false">
<project ver="10" name="linker.tray.win" libEmbed="true" icon="..\linker\favicon.ico" ui="win" output="linker.tray.win.exe" CompanyName="snltty" FileDescription="linker.tray.win" LegalCopyright="Copyright (C) snltty 2024" ProductName="linker.tray.win" InternalName="linker.install.win" FileVersion="0.0.0.31" ProductVersion="0.0.0.31" publishDir="/dist/" dstrip="false" local="false" ignored="false">
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
<file name="favicon.ico" path="res\favicon.ico" comment="res\favicon.ico"/>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 40 KiB

BIN
linker.web/public/logo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -90,6 +90,7 @@ export default {
getSignInfo().then((res)=>{
globalData.value.signin.Connected = res.Connected;
globalData.value.signin.Connecting = res.Connecting;
globalData.value.signin.Version = res.Version;
setTimeout(()=>{
_getSignInfoInfo();
},1000);

View File

@@ -1,7 +1,7 @@
<template>
<div class="status-server-wrap" :class="{ connected: state.connected }">
<a href="javascript:;" @click="handleConfig">
<template v-if="state.connected">已连接信标服务器</template>
<template v-if="state.connected">已连接信标服务器{{state.version}}</template>
<template v-else>请连接信标服务器</template>
</a>
</div>
@@ -39,6 +39,7 @@ export default {
loading: false,
connected: computed(() => globalData.value.signin.Connected),
connecting: computed(() => globalData.value.signin.Connecting),
version: computed(() => globalData.value.signin.Version),
server: computed(() => globalData.value.config.Client.Server),
serverLength: computed(() => (globalData.value.config.Running.Client.Servers || []).length),
form: {

View File

@@ -11,7 +11,7 @@ export const provideGlobalData = () => {
height: 0,
config: { Common: {}, Client: {}, Running: {} },
configed: false,
signin: { Connected: false, Connecting: false },
signin: { Connected: false, Connecting: false, Version: 'v1.0.0.0' },
groupid: ''
});
subWebsocketState((state) => {

View File

@@ -19,6 +19,8 @@ namespace linker.client
public bool Connecting => connecting;
public bool Connected => Connection != null && Connection.Connected;
public string Version { get; set; }
private int networdkEnabledTimes = 0;
/// <summary>
/// 上线事件

View File

@@ -94,6 +94,8 @@ namespace linker.client
return;
}
await GetServerVersion();
GCHelper.FlushMemory();
clientSignInState.PushNetworkEnabled();
@@ -225,5 +227,26 @@ namespace linker.client
clientSignInState.Connection?.Disponse(6);
return false;
}
/// <summary>
/// 获取服务器版本
/// </summary>
/// <returns></returns>
private async Task GetServerVersion()
{
MessageResponeInfo resp = await messengerSender.SendReply(new MessageRequestWrap
{
Connection = clientSignInState.Connection,
MessengerId = (ushort)SignInMessengerIds.Version,
});
if (resp.Code == MessageResponeCodes.OK)
{
clientSignInState.Version = MemoryPackSerializer.Deserialize<string>(resp.Data.Span);
}
else
{
clientSignInState.Version = "v1.0.0.0";
}
}
}
}

View File

@@ -126,7 +126,7 @@ namespace linker.config
public ConfigCommonInfo Common { get; set; } = new ConfigCommonInfo();
[JsonIgnore]
public string Version { get; set; } = "1.0.0.1";
public string Version { get; set; } = "v1.1.0.0";
[JsonIgnore]
public bool Elevated { get; set; }
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -127,6 +127,13 @@ namespace linker.plugins.signin.messenger
}
}
[MessengerId((ushort)SignInMessengerIds.Version)]
public void Version(IConnection connection)
{
connection.Write(MemoryPackSerializer.Serialize(config.Data.Version));
}
}
[MemoryPackable]

View File

@@ -12,6 +12,8 @@
Servers = 5,
ServersForward = 6,
Version = 7,
None = 99
}
}

View File

@@ -12,7 +12,7 @@ call npm run build
cd ../
for %%r in (win-x64,win-arm64) do (
dotnet publish ./linker.service -c release -f net8.0 -o public/extends/%%r/ -r %%r -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true -p:TieredPGO=true -p:DebugType=none -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true -p:DebuggerSupport=false -p:EnableUnsafeBinaryFormatterSerialization=false -p:EnableUnsafeUTF7Encoding=false -p:HttpActivityPropagationSupport=false -p:InvariantGlobalization=true -p:MetadataUpdaterSupport=false -p:UseSystemResourceKeys=true
dotnet publish ./linker.service -c release -f net8.0 -o public/extends/%%r/linker-%%r/ -r %%r -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true -p:TieredPGO=true -p:DebugType=none -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true -p:DebuggerSupport=false -p:EnableUnsafeBinaryFormatterSerialization=false -p:EnableUnsafeUTF7Encoding=false -p:HttpActivityPropagationSupport=false -p:InvariantGlobalization=true -p:MetadataUpdaterSupport=false -p:UseSystemResourceKeys=true
echo F|xcopy "linker.tray.win\\dist\\*" "public\\extends\\%%r\\linker-%%r\\*" /s /f /h /y
echo F|xcopy "linker\\msquic.dll" "public\\extends\\%%r\\linker-%%r\\msquic.dll" /s /f /h /y
echo F|xcopy "linker\\msquic-openssl.dll" "public\\extends\\%%r\\linker-%%r\\msquic-openssl.dll" /s /f /h /y

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 40 KiB