mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
chore: update
This commit is contained in:
parent
953153ea1a
commit
d8d0a59371
|
@ -1,5 +1,38 @@
|
|||
!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
|
||||
|
|
Loading…
Reference in New Issue
Block a user