Skip to content

Commit

Permalink
Merge pull request #16 from Ryanjiena/main
Browse files Browse the repository at this point in the history
add use xray core doc
  • Loading branch information
MarksonHon authored Jun 15, 2024
2 parents 6f0971b + b4ee273 commit 408a897
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 13 deletions.
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# v2raya-scoop
# v2raya-scoop [![Excavator](https://github.com/v2rayA/v2raya-scoop/actions/workflows/excavator.yml/badge.svg)](https://github.com/v2rayA/v2raya-scoop/actions/workflows/excavator.yml)

English | [**简体中文**](https://github.com/v2rayA/v2raya-scoop/blob/main/README_zh.md)

[Scoop](https://scoop.sh) bucket of v2rayA for Windows users.

Expand All @@ -21,7 +23,7 @@
### Add Bucket
```ps1
```powershell
> scoop bucket add v2raya https://github.com/v2rayA/v2raya-scoop # Add bucket
> scoop update # Update bucket
```
Expand All @@ -30,14 +32,14 @@

#### Using the installer (recommended)

```ps1
```powershell
> scoop install v2raya-np # stable version (recommended)
> #scoop install v2raya-unstable-np # unstable version
```

#### Using the binary

```ps1
```powershell
> scoop install v2raya
> scoop install v2ray-rules-dat # install V2Ray rules dat(optional)
```
Expand All @@ -54,26 +56,38 @@ You can use `Win + R` to open a Runs window, and run `reset-passwd-v2raya-np` co

### Using the binary

> - `v2raya` command has been shimed by Scoop to run v2rayA with `--lite` arg, `v2rayawin` command is the origin v2rayA.
> - Env `V2RAYA_V2RAY_BIN` will be set to `$(scoop prefix v2ray)\\v2ray.exe`.
> - `v2raya` command has been shimed by Scoop to run v2rayA with `--lite` arg, `v2rayawin` command is the origin v2rayA.
> - Env `V2RAYA_V2RAY_BIN` will be set to `$(scoop prefix v2ray)\\v2ray.exe`.
#### Start/Stop v2rayA

You can use `Win + R` to open a Runs window, and run `v2raya` command in it.

- Run `v2raya` or `v2rayaWin --lite` to start v2rayA.
- Run `start-v2raya` to start v2rayA in the background.
- Run `stop-v2raya` to stop v2rayA.
- Run `v2raya` or `v2rayaWin --lite` to start v2rayA.
- Run `start-v2raya` to start v2rayA in the background.
- Run `stop-v2raya` to stop v2rayA.

#### Reset Passwd

- Run `reset-passwd-v2raya` to reset the password of v2rayA.
- Run `reset-passwd-v2raya` to reset the password of v2rayA.

#### Add v2raya to startup

```ps1
```powershell
> reg import "$(scoop prefix v2raya)\add-startup.reg"
# remove
> reg import "$(scoop prefix v2raya)\remove-startup.reg"
```

#### Use xray core

```powershell
> scoop install v2raya/xray
# use v2raya core
> scoop reset v2raya
# use xray core
> scoop reset xray
```
93 changes: 93 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# v2raya-scoop [![Excavator](https://github.com/v2rayA/v2raya-scoop/actions/workflows/excavator.yml/badge.svg)](https://github.com/v2rayA/v2raya-scoop/actions/workflows/excavator.yml)

[**English**](https://github.com/v2rayA/v2raya-scoop/blob/main/README.md) | 简体中文

[Scoop](https://scoop.sh) 的 v2rayA 桶,适用于 Windows 用户。

## 如何安装

<details>
<summary>安装 Scoop</summary>

1. 安装 [Git for Windows](https://github.com/git-for-windows/git/releases/latest)。中国用户可以从 [这里](https://mirrors.tuna.tsinghua.edu.cn/github-release/git-for-windows/git/LatestRelease/) 下载。
2. 安装 [PowerShell Core](https://aka.ms/PowerShell-Release?tag=stable)。中国用户可以从 [这里](https://mirrors.tuna.tsinghua.edu.cn/github-release/PowerShell/PowerShell/LatestRelease/) 下载。
3. (可选)安装 [Windows Terminal](https://github.com/microsoft/terminal/releases/latest)
4. 安装 [Scoop](https://scoop.sh)

```powershell
> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # 可选:首次运行远程脚本时需要
> irm get.scoop.sh | iex
```
</details>
### 添加 Bucket
```powershell
> scoop bucket add v2raya https://github.com/v2rayA/v2raya-scoop # 添加桶
> scoop update # 更新桶
```

### 安装 v2rayA

#### 使用安装程序(推荐)

```powershell
> scoop install v2raya-np # 稳定版本(推荐)
> # scoop install v2raya-unstable-np # 不稳定版本
```

#### 使用二进制文件

```powershell
> scoop install v2raya
> scoop install v2ray-rules-dat # 可选
```

## 如何使用

### 使用安装程序(推荐)

通过安装程序安装 v2rayA 后,v2rayA 将作为服务运行。默认情况下,它会自动启动。你也可以在任务管理器的“服务”标签中管理 v2rayA 的启动和停止。你可以通过运行桌面快捷方式或直接访问 <http://127.0.0.1:2017> 来打开管理页面。

#### 重置密码

你可以使用 `Win + R` 打开运行窗口,并运行 `reset-passwd-v2raya-np` 命令。

### 使用二进制文件

> - `v2raya` 命令已被 Scoop 绑定,以 `--lite` 参数运行 v2rayA,`v2rayawin` 命令是原始的 v2rayA。
> - 环境变量 `V2RAYA_V2RAY_BIN` 将被设置为 `$(scoop prefix v2ray)\\v2ray.exe`
#### 启动/停止 v2rayA

你可以使用 `Win + R` 打开运行窗口,并运行 `v2raya` 命令。

- 运行 `v2raya``v2rayaWin --lite` 以启动 v2rayA。
- 运行 `start-v2raya` 以在后台启动 v2rayA。
- 运行 `stop-v2raya` 以停止 v2rayA。

#### 重置密码

- 运行 `reset-passwd-v2raya` 以重置 v2rayA 的密码。

#### 添加 v2raya 到启动项

```powershell
> reg import "$(scoop prefix v2raya)\add-startup.reg"
# 移除
> reg import "$(scoop prefix v2raya)\remove-startup.reg"
```

#### 使用 xray 内核

```powershell
> scoop install v2raya/xray
# 回退使用 v2ray 内核
> scoop reset v2raya
# 使用 xray 内核
> scoop reset xray
```
2 changes: 0 additions & 2 deletions bucket/.gitkeep

This file was deleted.

31 changes: 31 additions & 0 deletions bucket/xray.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": "1.8.13",
"description": "A platform for building proxies to bypass network restrictions",
"homepage": "https://github.com/XTLS/Xray-core",
"license": "MPL-2.0",
"architecture": {
"64bit": {
"url": "https://github.com/XTLS/Xray-core/releases/download/v1.8.13/Xray-windows-64.zip",
"hash": "2dabb99d5face1b805eb2788fbb085576f57cd8670a63be3d0e7776e3868a502"
},
"32bit": {
"url": "https://github.com/XTLS/Xray-core/releases/download/v1.8.13/Xray-windows-32.zip",
"hash": "d93f980f39c4a0697a64971abfe83b96b6690af433cd11cf871c245d12802b94"
}
},
"bin": "xray.exe",
"env_set": {
"V2RAYA_V2RAY_BIN": "$(scoop prefix xray)\\xray.exe"
},
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/XTLS/Xray-core/releases/download/v$version/Xray-windows-64.zip"
},
"32bit": {
"url": "https://github.com/XTLS/Xray-core/releases/download/v$version/Xray-windows-32.zip"
}
}
}
}

0 comments on commit 408a897

Please sign in to comment.