Microsoft.PowerShell_profile.ps1
· 447 B · PowerShell
Eredeti
function Start-V2ray {
& "D:\v2ray\v2ray.exe" run -c "D:\v2ray\config.json"
}
Set-Alias v2 Start-V2ray
function Start-Hy {
param (
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$Args
)
$hyPath = "D:\bin\hysteria.exe"
$defaultConfig = "D:\bin\hysteria.yml"
if ($Args.Count -eq 0) {
& $hyPath -l debug -c $defaultConfig
} else {
& $hyPath @Args
}
}
Set-Alias hy Start-Hy
| 1 | function Start-V2ray { |
| 2 | & "D:\v2ray\v2ray.exe" run -c "D:\v2ray\config.json" |
| 3 | } |
| 4 | Set-Alias v2 Start-V2ray |
| 5 | |
| 6 | function Start-Hy { |
| 7 | param ( |
| 8 | [Parameter(ValueFromRemainingArguments = $true)] |
| 9 | [string[]]$Args |
| 10 | ) |
| 11 | $hyPath = "D:\bin\hysteria.exe" |
| 12 | $defaultConfig = "D:\bin\hysteria.yml" |
| 13 | |
| 14 | if ($Args.Count -eq 0) { |
| 15 | & $hyPath -l debug -c $defaultConfig |
| 16 | } else { |
| 17 | & $hyPath @Args |
| 18 | } |
| 19 | } |
| 20 | Set-Alias hy Start-Hy |