Closed dorian-li closed 4 months ago
As far as i can tell there are 6170 files that need to be changed... that's .. that's a lot and i don't have time right now to do this or to write a script... maybe later, but cannot do now... anyone can do a pull request to do this if they have time and if they want
In fact, there are 6169 of them, because the specific_search_in_json.py
you wrote is also included👀.
I used Powershell
to write the following two scripts:
ghproxy.net
in the bucket
folder of the repo# CheckGhproxyInBucket.ps1
$searchString = "ghproxy.net"
$bucketPath = Join-Path -Path (Get-Location) -ChildPath "bucket"
$files = Get-ChildItem -Path $bucketPath -Recurse | Where-Object {!$_.PSIsContainer}
$matchCount = 0
foreach ($file in $files) {
$containsMatch = Select-String -Path $file.FullName -Pattern $searchString -Quiet
if ($containsMatch) {
$matchCount++
}
}
Write-Output "Number of files containing '$searchString': $matchCount"
ghproxy.net
in all files in the bucket
folder of the repo with ghproxy.com
# ReplaceGhproxyInBucket.ps1
$originalString = "ghproxy.net"
$targetString = "ghproxy.com"
$bucketPath = Join-Path -Path (Get-Location) -ChildPath "bucket"
$files = Get-ChildItem -Path $bucketPath -Recurse | Where-Object {!$_.PSIsContainer}
foreach ($file in $files) {
if (Select-String -Path $file.FullName -Pattern $originalString -Quiet) {
$content = Get-Content -Path $file.FullName -Raw
$newContent = $content -replace $originalString, $targetString
Set-Content -Path $file.FullName -Value $newContent
}
}
Write-Output "Completed string replacement in files."
The modified PR following this process is here
It seems that all URLs using the
ghproxy.net
proxy cannot be accessed. Considerghproxy.com
ormirror.ghproxy.com
?