diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 0ddbe8d4..046431fa 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -48,15 +48,13 @@ jobs: env: GITHUB_TOKEN: '${{ secrets.ACTIONS_TOKEN }}' with: - tag_name: v1.1.2.5 - release_name: v1.1.2.5.${{ steps.date.outputs.today }} + tag_name: v1.1.2.6 + release_name: v1.1.2.6.${{ steps.date.outputs.today }} draft: false prerelease: false body: | - 1. 脑抽 - 2. 更新错误 - 3. 中继错误 - 4. 请更新服务端 + 1. 托盘检查 + 2. 停止服务清理网卡 - name: upload win x64 id: upload-win-x64 diff --git a/linker.doc.web/docs/2、首次运行/2.1、安装.md b/linker.doc.web/docs/2、首次运行/2.1、安装.md index 821a16a6..30269c07 100644 --- a/linker.doc.web/docs/2、首次运行/2.1、安装.md +++ b/linker.doc.web/docs/2、首次运行/2.1、安装.md @@ -50,8 +50,8 @@ systemctl enable linker 2. 客户端端口 `1804`、`1803` TCP 3. 配置文件夹 `./configs` 4. 日志文件夹 `./logs` -5. debian `snltty/linker-debian-x64`、`snltty/linker-debian-arm64`,可以用`msquic`、`tun`网卡 -4. alpine `snltty/linker-musl-x64`、`snltty/linker-musl-arm64`,可以用`tun`网卡、msquic尚未编译成功 +5. debian `snltty/linker-debian-x64`、`snltty/linker-debian-arm64`,压缩约`70MB`、未压缩约`177MB` +4. alpine `snltty/linker-musl-x64`、`snltty/linker-musl-arm64`,压缩约`19MB`、未压缩约`43MB` #### 客户端 ``` @@ -62,7 +62,7 @@ docker run -it -d --name linker \ --device /dev/net/tun \ --restart=always \ --privileged=true \ -snltty/linker-debian-x64 +snltty/linker-musl-x64 ``` #### 服务端 @@ -73,5 +73,5 @@ docker run -it -d --name linker \ -v /usr/local/linker-docker/logs:/app/logs \ --restart=always \ --privileged=true \ -snltty/linker-debian-x64 +snltty/linker-musl-x64 ``` \ No newline at end of file diff --git a/linker.libs/linker.libs.csproj b/linker.libs/linker.libs.csproj index 22433b03..21013f8f 100644 --- a/linker.libs/linker.libs.csproj +++ b/linker.libs/linker.libs.csproj @@ -15,8 +15,8 @@ https://github.com/snltty/linker https://github.com/snltty/linker 1.1.2 - 1.1.2.5 - 1.1.2.5 + 1.1.2.6 + 1.1.2.6 full diff --git a/linker.service/LinkerService.cs b/linker.service/LinkerService.cs index 09104a06..48f566eb 100644 --- a/linker.service/LinkerService.cs +++ b/linker.service/LinkerService.cs @@ -100,6 +100,19 @@ namespace linker.service proc?.Dispose(); foreach (var item in Process.GetProcessesByName(mainExeName)) + { + try + { + item.Close(); + item.WaitForExit(TimeSpan.FromMilliseconds(2000)); + item.Kill(); + } + catch (Exception) + { + } + } + + foreach (var item in Process.GetProcessesByName("tun2socks")) { item.Kill(); } diff --git a/linker.service/linker.service.csproj b/linker.service/linker.service.csproj index f666805a..81185c7b 100644 --- a/linker.service/linker.service.csproj +++ b/linker.service/linker.service.csproj @@ -22,8 +22,8 @@ https://github.com/snltty/linker https://github.com/snltty/linker snltty service - 1.1.2.5 - 1.1.2.5 + 1.1.2.6 + 1.1.2.6 diff --git a/linker.tray.win/default.aproj b/linker.tray.win/default.aproj index 0f2ae1ff..9c882c82 100644 --- a/linker.tray.win/default.aproj +++ b/linker.tray.win/default.aproj @@ -1,5 +1,5 @@  - + diff --git a/linker.tray.win/dist/linker.tray.win.exe b/linker.tray.win/dist/linker.tray.win.exe index 090d0580..495db5c8 100644 Binary files a/linker.tray.win/dist/linker.tray.win.exe and b/linker.tray.win/dist/linker.tray.win.exe differ diff --git a/linker.tray.win/main.aardio b/linker.tray.win/main.aardio index e64461a8..f4c023cd 100644 --- a/linker.tray.win/main.aardio +++ b/linker.tray.win/main.aardio @@ -78,7 +78,7 @@ mainForm.showPopmenu = function(){ mainForm.popmenu=win.ui.popmenu(mainForm); mainForm.popmenu.add(mainForm.ckAutoStart.checked ? '取消托盘自启动':'开启托盘自启动',function(id){mainForm.runAsTaskCommand()}); - mainForm.popmenu.add(service.isRunning(mainForm.serviceName) ? '停止服务':'运行服务',function(id){mainForm.installCommand()}); + mainForm.popmenu.add(service.isRunning(mainForm.serviceName) ? '停止服务':'运行服务',function(id){mainForm.runCommand()}); mainForm.popmenu.add(service.isExist(mainForm.serviceName) ? '卸载服务':'安装服务',function(id){mainForm.installCommand()}); mainForm.popmenu.add('退出托盘',function(id){ @@ -111,6 +111,24 @@ mainForm.checkService = function(){ mainForm.failureService(); } + +mainForm.checkServiceInstall = ""; +mainForm.checkServiceRun = ""; + +mainForm.checkService1 = function(){ + import service; + + mainForm.btnInstall.text = service.isExist(mainForm.serviceName) ? "卸载服务" : "安装服务"; + mainForm.btnRun.text = service.isRunning(mainForm.serviceName) ? "停止服务" : "运行服务"; + if(mainForm.checkServiceInstall != mainForm.btnInstall.text || mainForm.checkServiceRun != mainForm.btnRun.text) + { + mainForm.showPopmenu(); + } + + mainForm.checkServiceInstall = mainForm.btnInstall.text; + mainForm.checkServiceRun = mainForm.btnRun.text ; +} + mainForm.btnCheck.oncommand = function(id,event){ mainForm.checkService(); win.msgbox('已检查'); @@ -246,6 +264,12 @@ mainForm.setInterval( }catch(e) { } + try{ + mainForm.checkService1(); + } + catch(e){ + + } return true; },1000 ) diff --git a/linker.tunnel/linker.tunnel.csproj b/linker.tunnel/linker.tunnel.csproj index 7be29bcc..0156fa92 100644 --- a/linker.tunnel/linker.tunnel.csproj +++ b/linker.tunnel/linker.tunnel.csproj @@ -17,8 +17,8 @@ https://github.com/snltty/linker https://github.com/snltty/linker linker tunnel - 1.1.2.5 - 1.1.2.5 + 1.1.2.6 + 1.1.2.6 diff --git a/linker/linker.csproj b/linker/linker.csproj index 69992ba4..03b1400a 100644 --- a/linker/linker.csproj +++ b/linker/linker.csproj @@ -25,8 +25,8 @@ https://github.com/snltty/linker https://github.com/snltty/linker linker - 1.1.2.5 - 1.1.2.5 + 1.1.2.6 + 1.1.2.6