This commit is contained in:
snltty
2025-06-14 14:51:14 +08:00
parent 2e2fccb986
commit 2f8a304b3d
82 changed files with 155 additions and 210 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>linker.web</title><link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/><script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script><script defer="defer" src="js/chunk-vendors.81af7d4e.js"></script><script defer="defer" src="js/app.665d3555.js"></script><link href="css/chunk-vendors.d8267b33.css" rel="stylesheet"><link href="css/app.f83ea0ab.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but linker.web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>linker.web</title><link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/><script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script><script defer="defer" src="js/chunk-vendors.81af7d4e.js"></script><script defer="defer" src="js/app.f81ec974.js"></script><link href="css/chunk-vendors.d8267b33.css" rel="stylesheet"><link href="css/app.f83ea0ab.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but linker.web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +0,0 @@
---
sidebar_position: 10
---
# 2.10、信标密钥
:::tip[说明]
1. 服务端默认信标密钥为空,表示所有客户端皆可连接信标服务器,你可以填写密钥,不为空时,客户端需要填写正确的密钥才能连接
2. 在服务端 `configs/server.json` 复制信标密钥(`SignIn->SecretKey`),在客户端中填写
![Docusaurus Plushie](./img/signin.png)
:::

View File

@@ -0,0 +1,16 @@
---
sidebar_position: 10
---
# 2.10、导出配置
:::tip[说明]
1. 首次运行手动初始化的客户端拥有完全管理权限,可导出配置,用以作为组网其它设备运行
2. 可以指定导出的设备名,管理端口,管理密码,和本客户端的其它配置信息,比如设定好的中继密钥什么的
3. 可以指定导出的配置拥有什么权限
4. `下载`则导出压缩包,可以复制到其它电脑上直接运行
5. `复制`导出的配置复制到剪贴板,对应初始化配置时的`粘贴配置`
6. `保存`导出的配置保存到服务器,对应初始化配置时的`在线导入`
![](./img/export.jpg)
:::

View File

@@ -24,15 +24,3 @@ sc stop 服务名
sc delete 服务名
```
:::
## 2、如果需要多开
:::tip[说明]
1. 由于linker使用当前目录下的`configs`文件夹里的配置文件,所以不能使用同一程序多开,需要使用多份程序,**不要把`configs`文件夹也复制过去**
2. 客户端托盘无法多开,所以需要客户端多开时,**需要你手动安装服务**,不能使用托盘安装服务
3. 客户端会监听`1804` 管理接口,所以,在初始化时,你需要各个客户端**使用不同的端口**
#### 在初始化时,`接口端口`,和`网页端口`,需要各个客户端设置为不一样的端口
![](./img/client.png)
:::

View File

@@ -6,7 +6,7 @@ sidebar_position: 7
## 1、服务端手动修改配置文件
这是自建服务器需要配置的,没有服务器则跳过**`运行起来就可以了没有配置只有一个server.json只需要把对应的密钥填到客户端即可`**
这是自建服务器需要配置的,没有服务器则跳过
:::tip[服务端运行流程]
1. 运行程序在configs目录下会生成 common.json server.json
@@ -18,47 +18,57 @@ sidebar_position: 7
server.json
```
{
//中继
"Relay": {
//中继密钥,客户端密钥不准确时无法使用本中继
"SecretKey": "",
"Cdkey": {
//cdkey 加密密钥
"SecretKey": "snltty"
},
},
//信标服务器端口
"ServicePort": 1802,
//内网穿透配置
"SForward": {
//内网穿透密钥
"SecretKey": "",
"BufferSize": 3,
//web端口用于按域名穿透
"WebPort": 0,
//隧道端口范围,用于按端口穿透
"TunnelPortRange": [
10000,
60000
]
},
//登入信标密钥,默认为空,即为所有客户端均可登入本信标服务器
"SignIn": {
"SecretKey": "",
"CleanDays": 7 //当一组内的所有设备都超过7天未上线则清理
},
//更新密钥,客户端密钥不正确时,只能更新自己本身
"Updater": {
"SecretKey": ""
}
//中继
"Relay": {
//中继密钥,客户端密钥不准确时无法使用本中继
"SecretKey": "",
},
//信标服务器端口
"ServicePort": 1802,
//内网穿透配置
"SForward": {
//内网穿透密钥
"SecretKey": "",
"BufferSize": 3,
//web端口用于按域名穿透
"WebPort": 0,
//隧道端口范围,用于按端口穿透
"TunnelPortRange": [
10000,
60000
]
},
//登入信标密钥,默认为空,即为所有客户端均可登入本信标服务器
"SignIn": {
"SecretKey": "",
"CleanDays": 7 //当一组内的所有设备都超过7天未上线则清理
},
//虚拟网卡
"Tuntap": {
//自动分配IP
"Lease": {
"IPDays": 7, //ip租期
"NetworkDays": 30 //网络租期
}
},
//更新密钥,客户端密钥不正确时,只能更新自己本身
"Updater": {
"SecretKey": ""
}
}
```
action.json这个可以不管等用得上自定义验证的时候就知道了
```
{
"SignInActionUrl": "", //登入信标的验证接口
"RelayActionUrl": "", //中继验证接口
"SForwardActionUrl": ""//服务器穿透的验证接口
"SignInActionUrl": "", //登入信标的验证接口
"RelayActionUrl": "", //中继验证接口
"SForwardActionUrl": ""//服务器穿透的验证接口
}
```
:::

View File

@@ -8,23 +8,34 @@ sidebar_position: 8
## 1、客户端使用web初始化
:::tip[说明]
1. 运行程序后,浏览器打开<a href="http://127.0.0.1:1804" target="_blank">http://127.0.0.1:1804</a>
2. 如果你自己部署了服务端,你可以勾选**我有服务器**,填写你部署的服务端的各种信息
1. 运行程序后,浏览器打开<a href="http://127.0.0.1:1804" target="_blank">http://127.0.0.1:1804</a>填写信息进行初始化
2. 只勾选客户端
3. 你可以勾选**我有服务器**,填写你部署的服务端的各种信息,默认使用公共服务器`linker.snltty.com:1802`
4. 有一点很重要,当多个客户端的`分组名、分组密码`均一致时,相互可见,同一服务器可以任意多分组,不同分组之间互不干扰
![](./img/mode.png)
![](./img/client.png)
![](./img/save.png)
![](./img/client1.jpg)
![](./img/client2.jpg)
![](./img/client3.jpg)
对应配置文件 client.json
```
{
"Name": "A", //客户端名
"AccessBits": '11111111111', //按下标1有权限0无权限可以看`src/linker.messenger.api/Config.cs`里的`AccessValue`枚举
//顶级满权限
"FullAccess": true,
//按下标1有权限0无权限可以看`src/linker.messenger.api/Config.cs`里的`AccessValue`枚举
"AccessBits": "1111111111111111111111111111111111111111111111111111111111111111",
//管理接口
"CApi": {
"ApiPassword": "snltty", //api密码
"WebPort": 1804, //web端口
"WebRoot": "./web/" //web根目录
},
//cdkey
"Cdkey": {
"SecretKey": "snltty"
},
//服务器
"Servers": [
{
"Name": "Linker", //信标服务器名称
@@ -33,6 +44,7 @@ sidebar_position: 8
"UserId": "8225e9d4-0ac7-4d76-9946-c4fe04ad4696" //用户标识,多个客户端可相同
}
],
//分组
"Groups": [
{
"Name": "snltty", //分组名
@@ -40,6 +52,7 @@ sidebar_position: 8
"Password": "snltty" //分组密码
}
],
//中继
"Relay": {
"Servers": [
{
@@ -49,12 +62,15 @@ sidebar_position: 8
}
]
},
//内网穿透
"SForward": {
"SecretKey": "snltty" //服务器穿透密钥
},
//更新
"Updater": {
"SecretKey": "snltty" //更新密钥
},
//自定义验证
"Action": {
"Args": {} //自定义验证的参数
}

View File

@@ -1,8 +1,8 @@
---
sidebar_position: 11
sidebar_position: 99
---
# 2.11、特别说明ikuai
# 2.99、特别说明ikuai
:::tip[ikuai特别说明]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

View File

@@ -19,23 +19,8 @@ sidebar_position: 1
:::tip[说明]
1. 按顺序打洞,你可以调整顺序,优先使用哪些打洞协议
2. 能使用路由器端口映射时,优先`TcpPortMap``UdpPortMap`
3. 能使用TCP打洞时优先`TcpP2PNAT``TcpNutssb`
4. 没有QOS限速时优先`udp`,端口转发不支持`udp`
5. `msquic`永远作为最后的备选,网卡不支持`msquic`
![Docusaurus Plushie](./img/transport.png)
:::
## 3、调整网关层级
:::danger[说明]
1. TCP打洞UDP打洞大都依赖于网关层级默认网关层级是自动计算的你也可以手动指定网关层级这很有可能有助于打洞
2. 如果你看到 `网关 : 1 + 0`,层级只有`1`,那大概率是你连接的服务器走了什么奇怪的线路,这会打洞失败
![Docusaurus Plushie](./img/tunnel.png)
:::
2. 如果你不想打洞,可以禁用所有打洞协议
3. `按喜好调整好即可,往后的所有通信都是自动的,无需其它操作`
![Docusaurus Plushie](./img/p2p.jpg)
:::

View File

@@ -4,15 +4,15 @@ sidebar_position: 2
# 3.2、中继
前提是你自建信标服务器,如果使用`linker.snltty.com:1802`服务器,这不需要这些操作,此服务器提供一些公开的中继服务
## 1、主服务器中继
:::tip[说明]
在服务端 `configs/server.json` 复制中继密钥(`Relay->SecretKey`),在客户端中填写
1. 如果你自建信标服务器,在服务端 `configs/server.json` 复制中继密钥(`Relay->SecretKey`),在客户端中填写如果密钥正确则可以管理服务器的中继cdkey发布cdkey给别人使用
2. 如果你使用别人的服务器你没有密钥可以不填写则需要使用别人服务器的公开中继节点或使用他提供的cdkey
3. `按喜好调整好即可,往后的所有通信都是自动的,无需其它操作`
![Docusaurus Plushie](./img/relay.png)
![Docusaurus Plushie](./img/relay.jpg)
:::

View File

@@ -1,31 +0,0 @@
---
sidebar_position: 3
---
# 3.3、端口映射
:::tip[说明]
1. 当拥有外网IP时可使用`UPNP``NAT-PMP`进行P2P连接`PCP`暂未支持
2. 这与打洞效果是一致的同样是P2P连接唯一不同的是打洞是随机端口端口映射是固定端口
:::
## 1、自动映射
:::tip[说明]
1. 默认情况下linker会使用`18180`端口自动映射,这适用于家庭网络
2. 当然也有可能映射失败,这时你可以手动配置,手动配置优先级高于自动映射
:::
## 2、手动配置
:::tip[说明]
1. 在光猫或者路由器添加端口映射
2. 在linker对应客户端上填写相应的内网端口和外网端口
3. 打洞协议 `TcpPortMap``UdpPortMap` 用于端口映射连接,调整顺序可以让其优先使用端口映射连接
![Docusaurus Plushie](./img/portmap.png)
![Docusaurus Plushie](./img/portmap1.png)
:::

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

View File

@@ -5,10 +5,8 @@ sidebar_position: 2
# 1.1、点对网
:::danger[重要]
1. 你要确定你知道你在搞什么如果只是简单的P2P通信上面的内容已经够了以下的东西不要看不要看不要看
2. 确定要搞,那么请看示意图(仅示例,以下绿色内容与此图无关)
![Docusaurus Plushie](./img/tuntap12n.jpg)
你要确定你知道你在搞什么如果只是简单的P2P通信上面的内容已经够了以下的东西不要看不要看不要看
:::
@@ -23,27 +21,12 @@ sidebar_position: 2
BCDEDIT -SET TESTSIGNING ON
```
3. 或者安装一个<a href="https://www.microsoft.com/zh-cn/download/details.aspx?id=46148" target="_blank">KB3033929补丁</a>,然后重启系统
3. macos需要你自己在**被访问端**添加NAT转发
```
# 开启ip转发
sudo sysctl -w net.ipv4.ip_forward=1
# 配置NAT转发规则
# 在/etc/pf.conf文件中添加以下规则,10.18.18.0/24是来源网段
nat on en0 from 10.18.18.0/24 to any -> (en0)
# 加载规则
sudo pfctl -f /etc/pf.conf -e
```
:::danger[重点]
1. 如图配置第一条配置,`目标IP`填写`0.0.0.0`,则`路由IP`就是真实内网网段,其它客户端可以通过`192.168.1.0/24`网段访问到`公司城中-linux`的`192.168.1.0/24`网段
2. 如图配置第二条配置,`目标IP`填写`192.168.1.0/24`,则`路由IP`伪虚假网段,`目标IP`为真实内网网段,其它客户端可以通过一个`假的` `192.168.18.0/24`网段访问到`公司城中-linux`的`192.168.1.0/24`网段
3. 注意,两条配置不能同时使用
4. 网段映射其实就是 按`目标IP``目标掩码`计算出网络号,将网络号覆盖`路由IP`得到最终的访问IP
5. 当前网段映射仅支持IPV4`ICMP`、`TCP`、`UDP`、如需更多协议,请联系作者添加
1. 仅配置路由ip时可以通过192.168.0.x访问对方的192.168.0.x
2. 如果你多个客户端之间的ip存在冲突则路由ip可以配置一个虚假网段,然后目标IP填写真实网段连接192.168.185.x时会被替换为 192.168.0.x实际访问到192.168.0.x
![Docusaurus Plushie](./img/tuntap12n-1.jpg)
![Docusaurus Plushie](./img/tuntap12n-2.jpg)
![Docusaurus Plushie](./img/tuntap12n-3.jpg)
![Docusaurus Plushie](./img/tuntap3.jpg)
:::
@@ -52,22 +35,8 @@ sudo pfctl -f /etc/pf.conf -e
:::tip[2、情况2你的设备无法使用NAT转发时]
1. 你的设备无法使用NAT转发(一般出现在低版本windows下win10以下),那你只能使用端口转发功能来访问你当前设备局域网下的其它设备
2. 按如下配置。当其它设备通过`10.18.18.18:33890` 访问`公司-linux`时,将访问到`公司-linux`局域网的`192.168.1.35:3389`
3. macos下需要你自己在**被访问端**添加端口转发
```
//编辑 pf 配置文件
sudo nano /etc/pf.conf
//添加转发规则
rdr pass on en0 inet proto tcp from any to any port 33890 -> 192.168.1.35 port 3389
rdr pass on en0 inet proto udp from any to any port 33890 -> 192.168.1.35 port 3389
//启用并重新加载 pf
sudo pfctl -f /etc/pf.conf
sudo pfctl -e
```
![Docusaurus Plushie](./img/tuntap-forward.jpg)
2. 按如下配置。当其它设备通过`10.18.18.18:33890` 访问`公司城中-debian`时,将访问到`公司城中-debianx`局域网的`192.168.1.35:3389`
![Docusaurus Plushie](./img/tuntap4.jpg)
:::

View File

@@ -21,7 +21,6 @@ sidebar_position: 1
3. 开启网卡成功后使用对方ip 即可访问目标设备,首次访问时需要打洞或者中继操作,时间可能会比较久,耐心等待
4. 可以勾选`显示延迟`,`自动连接`(勾选此两项,网卡启动成功后将会自动连接各个客户端)
![Docusaurus Plushie](./img/tuntap1.png)
![Docusaurus Plushie](./img/tuntap2.png)
![Docusaurus Plushie](./img/tuntap3.png)
![Docusaurus Plushie](./img/tuntap1.jpg)
![Docusaurus Plushie](./img/tuntap2.jpg)
:::

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -14,14 +14,12 @@ sidebar_position: 2
:::tip[说明]
1. 当你拥有配置权限时,你可以配置任意一台设备的端口转发
2. 关闭状态时,可双击栏目修改
2. 关闭状态时,可修改配置
3.**监听端口****0** 时,启动,会随机本地端口
3. **目标服务**为目标设备上的服务,可以是目标设备本机的服务,也可以是目标设备局域网内的服务
4. 启动后,可以通过访问段的监听端口访问到目标设备的目标服务,本示例中,可以在`家中-win11`上访问`127.0.0.1:64787`最终访问到`家中-debian``127.0.0.1:80`
![Docusaurus Plushie](./img/forward1.png)
![Docusaurus Plushie](./img/forward2.png)
![Docusaurus Plushie](./img/forward3.png)
通过本机的**55950**端口,访问到了对方的**80**端口,第一次访问时,会去打洞或者中继,请耐心等待
![Docusaurus Plushie](./img/forward4.png)
![Docusaurus Plushie](./img/forward1.jpg)
![Docusaurus Plushie](./img/forward2.jpg)
![Docusaurus Plushie](./img/forward3.jpg)
:::

View File

@@ -13,10 +13,19 @@ sidebar_position: 3
## 1、配置IP
:::tip[说明]
1. 访问端启动socks5被访问端配置IP(被访问端可以不启动socks5)
2. 配置IP与虚拟网卡相似目标端配置被访问的IP让linker知道当从socks5访问某个IP时应该通过隧道转发到那个客户端
3. 配置好后你可以使用编程的方式通过socks5 去连接对端的`192.168.1.35/24`设备,或者配置系统代理
![Docusaurus Plushie](./img/socks51.png)
![Docusaurus Plushie](./img/socks52.png)
访问端启动socks5
![Docusaurus Plushie](./img/socks51.jpg)
被访问端端配置IP
![Docusaurus Plushie](./img/socks52.jpg)
有两种办法
1. 仅配置路由ip可以直接连接192.168.1.x
2. 如果你多个客户端之间的ip存在冲突则路由ip可以配置一个虚假网段然后目标IP填写真实网段然后连接192.168.18.x最后会被替换为 192.168.1.x实际访问到192.168.1.x
![Docusaurus Plushie](./img/socks53.jpg)
![Docusaurus Plushie](./img/socks54.jpg)
:::

View File

@@ -18,15 +18,15 @@ sidebar_position: 4
3. `TunnelPortRange` 用于开放一个端口范围提供给客户端动态添加端口监听每个端口对应不同的TCP+UDP服务
4. `SecretKey` 为密钥,客户端填写此密钥,才能使用穿透
![Docusaurus Plushie](./img/sforward2.png)
![Docusaurus Plushie](./img/sforward1.jpg)
:::
## 2、配置端口转发
:::tip[说明]
1. 当你拥有管理权限时,你可以管理任意一台设备的内网穿透映射
2. 使用`WebPort`时,需要使用域名,比如我使用了`aaa.linker.snltty.com`,我已经将`*.linker.snltty.com`泛解析到我的服务器,那么通过`aaa.linker.snltty.com:8080`即可访问到我本机的`127.0.0.1:80`
2. 使用`WebPort`时,需要使用域名,比如我使用了`a.linker.snltty.com`,我已经将`*.linker.snltty.com`泛解析到我的服务器,那么通过`a.linker.snltty.com:8080`即可访问到我本机的`127.0.0.1:80`
3. 使用`TunnelPortRange`时,需要使用端口,比如我使用了`12345`,那么通过`服务器域名:12345`或者`服务器IP:12345`都可以访问到我本机的`127.0.0.1:80`
![Docusaurus Plushie](./img/sforward3.png)
![Docusaurus Plushie](./img/sforward4.png)
![Docusaurus Plushie](./img/sforward2.jpg)
![Docusaurus Plushie](./img/sforward3.jpg)
:::

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

View File

@@ -1,15 +0,0 @@
---
sidebar_position: 5
---
# 5、导出配置和管理权限
:::tip[说明]
1.<a href="../2、首次运行/2.1、安装">首次运行,安装</a>,此设备拥有完全管理权限,可导出配置,用以作为组网子设备运行
2. 导出配置可指定设备名,以及其管理密码,建议使用与管理设备不同的管理密码,如果指定为`单设备`,则此配置仅可同时运行于一台设备,无法重复连接服务端(当相同配置的设备离线后,另外的设备可以连接)
3. 在运行中,拥有`配置权限`的设备仍然可以实时修改其它设备的权限但是有一个限制仅当B是A的子集时A可管理B的权限表现为 `~A & B == 0`
4. 对于拥有`导出配置`权限的子设备,可再次导出配置,但,不超过自身权限,无法指定管理密码,必须为单设备
5. 导出配置得到一个`.zip`压缩包,可以直接解压运行,或者将`configs`复制到新下载程序的文件夹,然后运行程序
![Docusaurus Plushie](./img/access.png)
:::

View File

@@ -12,7 +12,7 @@ sidebar_position: 6
### 1.1、静态配置
![Docusaurus Plushie](./img/action1.png)
![Docusaurus Plushie](./img/action1.jpg)
### 1.2、动态配置示例
以javascript 为例,设置参数方法:
@@ -28,7 +28,7 @@ ws.onopen = () => {
}
```
### 1.3、结果示例
![Docusaurus Plushie](./img/action.png)
![Docusaurus Plushie](./img/action2.jpg)
### 1.4、额外数据

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

View File

@@ -101,6 +101,8 @@ namespace linker.tunnel.connection
SocketReceiveFromResult result = await UdpClient.ReceiveFromAsync(buffer.AsMemory(), ep, cancellationTokenSource.Token).ConfigureAwait(false);
if (result.ReceivedBytes == 0)
{
if (LoggerHelper.Instance.LoggerLevel <= LoggerTypes.DEBUG)
LoggerHelper.Instance.Error($"tunnel connection writer offline 0");
break;
}
await CallbackPacket(buffer, 0, result.ReceivedBytes).ConfigureAwait(false);
@@ -115,6 +117,8 @@ namespace linker.tunnel.connection
}
finally
{
if (LoggerHelper.Instance.LoggerLevel <= LoggerTypes.DEBUG)
LoggerHelper.Instance.Error($"tunnel connection writer offline {cancellationTokenSource.IsCancellationRequested}");
Dispose();
if (LoggerHelper.Instance.LoggerLevel <= LoggerTypes.DEBUG)
LoggerHelper.Instance.Error($"tunnel connection writer offline {ToString()}");
@@ -301,8 +305,6 @@ namespace linker.tunnel.connection
return false;
}
public void Dispose()
{
if (uUdpClient == null) return;

View File

@@ -12,6 +12,7 @@ using System.Text;
using linker.tunnel.wanport;
using System.Security.Cryptography.X509Certificates;
using linker.libs.timer;
using System;
namespace linker.tunnel.transport
{
@@ -294,7 +295,7 @@ namespace linker.tunnel.transport
socket.WindowsUdpBug();
socket.ReuseBind(new IPEndPoint(IPAddress.IPv6Any, local.Port));
socket.Ttl = 2;
_ = socket.SendToAsync(new byte[0], SocketFlags.None, ip);
_ = socket.SendToAsync(endBytes, SocketFlags.None, ip);
socket.SafeClose();
}
}
@@ -488,9 +489,13 @@ namespace linker.tunnel.transport
//是认证结束的消息表示双方能通信了接下来直接跟QUIC交换数据就可以了
if (memory.Length == endBytes.Length && memory.Span.SequenceEqual(endBytes))
{
token.RemoteEP = result.RemoteEndPoint as IPEndPoint;
tcs.TrySetResult(result.RemoteEndPoint.AddressFamily);
_ = Connect2Quic(bufferSize, token);
if (tcs != null && tcs.Task.IsCompleted == false)
{
token.RemoteEP = result.RemoteEndPoint as IPEndPoint;
tcs.TrySetResult(result.RemoteEndPoint.AddressFamily);
_ = Connect2Quic(bufferSize, token);
}
break;
}
else
@@ -557,7 +562,7 @@ namespace linker.tunnel.transport
/// <param name="remote"></param>
/// <param name="remoteEp"></param>
/// <returns></returns>
private static async Task CopyToAsync(byte bufferSize, Socket local, Socket remote, IPEndPoint remoteEp)
private async Task CopyToAsync(byte bufferSize, Socket local, Socket remote, IPEndPoint remoteEp)
{
byte[] buffer = new byte[(1 << bufferSize) * 1024];
IPEndPoint tempEp = new IPEndPoint(IPAddress.Any, IPEndPoint.MinPort);
@@ -567,7 +572,14 @@ namespace linker.tunnel.transport
{
SocketReceiveFromResult result = await local.ReceiveFromAsync(buffer, tempEp).ConfigureAwait(false);
if (result.ReceivedBytes == 0) break;
await remote.SendToAsync(buffer.AsMemory(0, result.ReceivedBytes), remoteEp).ConfigureAwait(false);
if (result.ReceivedBytes == endBytes.Length && buffer.AsMemory(0, result.ReceivedBytes).Span.SequenceEqual(endBytes))
{
}
else
{
await remote.SendToAsync(buffer.AsMemory(0, result.ReceivedBytes), remoteEp).ConfigureAwait(false);
}
}
}
catch (Exception ex)

View File

@@ -337,7 +337,7 @@ namespace linker.tunnel.transport
socket.WindowsUdpBug();
socket.ReuseBind(local);
socket.Ttl = (short)(tunnelTransportInfo.Local.RouteLevel);
_ = socket.SendToAsync(Array.Empty<byte>(), SocketFlags.None, ip);
_ = socket.SendToAsync(endBytes, SocketFlags.None, ip);
socket.SafeClose();
}
catch (Exception ex)

View File

@@ -1,11 +1,6 @@
<template>
<div>
<el-form ref="formDom" :model="state.form" :rules="state.rules" label-width="8rem">
<el-form-item label="" label-width="0">
<div class="t-c w-100">
<p>端口为0不监听相同分组之间的客户端相互可见</p>
</div>
</el-form-item>
<el-form-item label="" label-width="0">
<el-row class="w-100">
<el-col :sm="12" :xs="24">
@@ -47,7 +42,7 @@
<el-row class="w-100">
<el-col :span="24">
<el-form-item label-width="8rem" prop="hasServer">
<el-checkbox v-model="state.form.hasServer" label="我有服务器(私有部署)" size="large" />
<el-checkbox v-model="state.form.hasServer" label="我有服务器(自建服务器)" size="large" />
</el-form-item>
</el-col>
</el-row>

View File

@@ -1,5 +1,5 @@
v1.8.3
2025-06-13 23:36:53
2025-06-14 14:51:14
1. 一些累计更新
2. 修复socks5解决CPU爆满问题增加本地域名解析支持HTTP代理
3. 优化唤醒模块