chore: update (+1 squashed commit)

Squashed commits:
[78899ef] fix: bbr2 not working in windows 11(24H2)
This commit is contained in:
huzibaca 2024-11-01 08:37:22 +08:00
parent d8d0a59371
commit b66c07bd96
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302
10 changed files with 10 additions and 49 deletions

View File

@ -1,38 +0,0 @@
!define ORIGINAL_PROVIDER_FILE "$TEMP\clash_verge_original_congestion_provider.txt"
!define NSIS_HOOK_POSTINSTALL "NSIS_HOOK_POSTINSTALL_"
!macro NSIS_HOOK_POSTINSTALL_
ExecWait 'netsh int tcp show global | findstr /R "^ *CongestionProvider" > "${ORIGINAL_PROVIDER_FILE}"'
FileOpen $0 "${ORIGINAL_PROVIDER_FILE}" r
FileRead $0 $1
FileClose $0
StrCpy $1 $1 "" 20
StrCmp $1 "bbr2" 0 +5
ExecWait 'netsh int tcp set supplemental template=internet congestionprovider=CUBIC'
ExecWait 'netsh int tcp set supplemental template=internetcustom congestionprovider=CUBIC'
ExecWait 'netsh int tcp set supplemental template=Compat congestionprovider=NewReno'
ExecWait 'netsh int tcp set supplemental template=Datacenter congestionprovider=CUBIC'
ExecWait 'netsh int tcp set supplemental template=Datacentercustom congestionprovider=CUBIC'
!macroend
!define NSIS_HOOK_PREUNINSTALL "NSIS_HOOK_PREUNINSTALL_"
!macro NSIS_HOOK_PREUNINSTALL_
FileOpen $0 "${ORIGINAL_PROVIDER_FILE}" r
FileRead $0 $1
FileClose $0
StrCpy $1 $1 "" 20
StrCmp $1 "bbr2" 0 +5
ExecWait 'netsh int tcp set supplemental template=internet congestionprovider=$1'
ExecWait 'netsh int tcp set supplemental template=internetcustom congestionprovider=$1'
ExecWait 'netsh int tcp set supplemental template=Compat congestionprovider=NewReno'
ExecWait 'netsh int tcp set supplemental template=Datacenter congestionprovider=$1'
ExecWait 'netsh int tcp set supplemental template=Datacentercustom congestionprovider=$1'
Delete "${ORIGINAL_PROVIDER_FILE}"
ExecWait '"$INSTDIR\uninstall-service.exe"'
!macroend

View File

@ -1,6 +1,6 @@
; This file is copied from https://github.com/tauri-apps/tauri/blob/tauri-v1.5/tooling/bundler/src/bundle/windows/templates/installer.nsi
; and edit to fit the needs of the project. the latest tauri 2.x has a different base nsi script.
RequestExecutionLevel admin
Unicode true
; Set the compression algorithm. Default is LZMA.
!if "{{compression}}" == ""
@ -690,7 +690,7 @@ SectionEnd
Section Install
SetOutPath $INSTDIR
nsExec::Exec 'netsh int tcp res'
!insertmacro CheckIfAppIsRunning
!insertmacro CheckAllVergeProcesses
; Copy main executable

View File

@ -6,7 +6,7 @@
"linux": {
"deb": {
"depends": ["openssl"],
"desktopTemplate": "./template/clash-verge.desktop",
"desktopTemplate": "./packages/linux/clash-verge.desktop",
"provides": ["clash-verge"],
"conflicts": ["clash-verge"],
"replaces": ["clash-verge"],
@ -15,12 +15,12 @@
},
"rpm": {
"depends": ["openssl"],
"desktopTemplate": "./template/clash-verge.desktop",
"desktopTemplate": "./packages/linux/clash-verge.desktop",
"provides": ["clash-verge"],
"conflicts": ["clash-verge"],
"obsoletes": ["clash-verge"],
"postInstallScript": "../packages/linux/post-install.sh",
"preRemoveScript": "../packages/linux/pre-remove.sh"
"postInstallScript": "./packages/linux/post-install.sh",
"preRemoveScript": "./packages/linux/pre-remove.sh"
}
},
"externalBin": [

View File

@ -16,8 +16,7 @@
"installerIcon": "icons/icon.ico",
"languages": ["SimpChinese", "English"],
"installMode": "perMachine",
"template": "./template/installer.nsi",
"installerHooks": "../packages/windows/nsis_hooks.sh"
"template": "./packages/windows/installer.nsi"
}
}
},

View File

@ -16,7 +16,7 @@
"installerIcon": "icons/icon.ico",
"languages": ["SimpChinese", "English"],
"installMode": "perMachine",
"template": "./template/installer.nsi"
"template": "./packages/windows/installer.nsi"
}
}
},

View File

@ -16,7 +16,7 @@
"installerIcon": "icons/icon.ico",
"languages": ["SimpChinese", "English"],
"installMode": "perMachine",
"template": "./template/installer.nsi"
"template": "./packages/windows/installer.nsi"
}
}
},

View File

@ -16,7 +16,7 @@
"installerIcon": "icons/icon.ico",
"languages": ["SimpChinese", "English"],
"installMode": "perMachine",
"template": "./template/installer.nsi"
"template": "./packages/windows/installer.nsi"
}
}
},