This commit is contained in:
snltty
2025-06-23 16:45:22 +08:00
parent 2c2f225067
commit 4a4ca3351d
4 changed files with 36 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
---
sidebar_position: 4
---
# 1.2、点对网动态路由
:::tip[动态路由]
1. 默认情况下在B上配置一个局域网IP这条信息被A获取A上给系统添加一条路由且在linker程序内标记这条路由的数据包要发送给B然后A上就可以访问了
2. 也有特殊情况你想手动在A上添加路由这些路由是动态的你有别的系统去管理它们这时候在linker没有标记虽然有路由但linker不知道要发给B还是C
3. 那就需要以下操作,往`configs/ip-list.lin`文件内写入标记记录,格式是`路由ip,掩码长度,目标虚拟ip`,比如`192.168.188.0,24,10.18.18.2`,每行一条记录
```
192.168.188.0,24,10.18.18.2
192.168.189.0,24,10.18.18.3
```
:::

View File

@@ -2,7 +2,7 @@
sidebar_position: 5
---
# 1.2、网对网
# 1.3、网对网
:::tip[在网关]

View File

@@ -49,7 +49,7 @@ namespace linker.messenger.updater
LoggerHelper.Instance.Error(ex);
updateInfo.Status = status;
}
}
/// <summary>
/// 下载更新
@@ -68,7 +68,7 @@ namespace linker.messenger.updater
updateInfo.Current = 0;
updateInfo.Length = 0;
if (string.IsNullOrWhiteSpace(url) )
if (string.IsNullOrWhiteSpace(url))
{
updateInfo.Status = status;
return;
@@ -87,9 +87,22 @@ namespace linker.messenger.updater
using HttpResponseMessage response = await httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
response.EnsureSuccessStatusCode();
updateInfo.Length = response.Content.Headers.ContentLength ?? 0;
try
{
DriveInfo drive = new DriveInfo(Path.GetPathRoot(savePath));
if (drive.AvailableFreeSpace < updateInfo.Length)
{
LoggerHelper.Instance.Error($"file size {updateInfo.Length}byte,device free space {drive.AvailableFreeSpace} byte");
updateInfo.Status = status;
return;
}
}
catch (Exception)
{
}
using Stream contentStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
using FileStream fileStream = new FileStream(savePath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
byte[] buffer = new byte[4096];
int readBytes = 0;

View File

@@ -1,5 +1,5 @@
v1.8.5
2025-06-23 15:14:21
2025-06-23 16:45:22
1. 一些累计更新
2. 备用信标服务器
3. 设置默认中继节点