Skip to content

Commit 69f8588

Browse files
authored
Merge pull request #6 from EndCod3r/dev
Version v0.2.1
2 parents adc840a + a8fe4e5 commit 69f8588

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

Config/disable_ipv6.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"registry": [
3+
{
4+
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
5+
"Name": "DisabledComponents",
6+
"Value": "255",
7+
"OriginalValue": "0",
8+
"Type": "DWord"
9+
}
10+
]
11+
}

optimize.ps1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,21 @@ if ($userinput -eq 'y' -or !$userinput) {
188188
Set-ItemProperty -Path $tele.registry.Path[$i] -Name $tele.registry.Name[$i] -Value $tele.registry.Value[$i] -Type $tele.registry.Type[$i]
189189
}
190190
}
191+
192+
193+
if ($AcceptAllTweaks) {
194+
$userinput = 'y'
195+
} else {$userinput = Read-Host -Prompt "Do you want to disable IPv6? (Not Recommended Unless It's Causing Problems) (y/N)"}
196+
if ($userinput -eq 'y') {
197+
$IPv6 = Get-Content $configdir\disable_ipv6.json | ConvertFrom-Json
198+
199+
for ($i = 0; $i -lt $Registry.Count; $i++) {
200+
Set-ItemProperty -Path $IPv6.registry.Path[$i] -Name $IPv6.registry.Name[$i] -Value $IPv6.registry.Value[$i] -Type $IPv6.registry.Type[$i]
201+
}
202+
Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6
203+
}
204+
205+
if ((Test-Path -Path $TempFolder) -and ($configdir -eq $TempFolder)) {
206+
Write-Output "Cleaning up..."
207+
Remove-Item -Recurse -Force $TempFolder
208+
}

0 commit comments

Comments
 (0)