30 lines
1.4 KiB
PowerShell
30 lines
1.4 KiB
PowerShell
|
|
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
|
|
|
|
$basePath = $PWD
|
|
|
|
Write-Host "Current Running Path is $basePath"
|
|
# This is a PowerShell script to run port_win64.exe with admin privileges and keep running in the background
|
|
|
|
Write-Host "Start the port forwarding !"
|
|
Start-Process -FilePath "$basePath\port_win64.exe" -ArgumentList "udp listen:0.0.0.0:53 conn:223.5.5.5:53" -Verb RunAs -WindowStyle Hidden
|
|
Start-Process -FilePath "$basePath\port_win64.exe" -ArgumentList "tcp listen:0.0.0.0:80 conn:42.192.52.227:80" -Verb RunAs -WindowStyle Hidden
|
|
Start-Process -FilePath "$basePath\port_win64.exe" -ArgumentList "tcp listen:0.0.0.0:9000 conn:42.192.52.227:9000" -Verb RunAs -WindowStyle Hidden
|
|
Start-Process -FilePath "$basePath\port_win64.exe" -ArgumentList "tcp listen:0.0.0.0:20672 conn:42.192.52.227:20672" -Verb RunAs -WindowStyle Hidden
|
|
Start-Process -FilePath "$basePath\port_win64.exe" -ArgumentList "tcp listen:0.0.0.0:20678 conn:42.192.52.227:20678" -Verb RunAs -WindowStyle Hidden
|
|
|
|
Write-Host "Start the socks !"
|
|
Start-Process -FilePath "$basePath\socks5_win64.exe" -ArgumentList "9997" -Verb RunAs -WindowStyle Hidden
|
|
# Keep script running until terminal is closed
|
|
Write-Host ""
|
|
netstat -ano | findstr 53
|
|
Write-Host ""
|
|
netstat -ano | findstr 9000
|
|
Write-Host ""
|
|
netstat -ano | findstr 20672
|
|
Write-Host ""
|
|
netstat -ano | findstr 20678
|
|
Write-Host ""
|
|
|
|
$null = Read-Host "Press Enter to close this script"
|