docs: refactor docs

This commit is contained in:
xvzc 2024-08-27 12:14:54 +09:00
parent 97d9fb157b
commit 7e70f10049

View File

@ -4,34 +4,30 @@
```bash ```bash
brew install spoofdpi brew install spoofdpi
``` ```
### Usage ### Run with binary
#### Binary
You can start SpoofDPI with:
```bash ```bash
spoofdpi spoofdpi
``` ```
#### Service ### Run as a service
Alternatively you can start SpoofDPI as a service ```bash
- with automatic relaunch on startup: brew services start spoofdpi # This will automatically relaunch SpoofDPI on startup
```bash ```
brew services start spoofdpi
``` ```bash
- without: brew services run spoofdpi # This will not relaunch SpoofDPI on startup
```bash ```
brew services run spoofdpi ### Logs
``` If you run SpoofDPI as a service, it will write logs into the files below
##### Logs ```bash
When running as a service, SpoofDPI writes logs to
```text
$HOMEBREW_PREFIX/var/log/spoofdpi/output.log $HOMEBREW_PREFIX/var/log/spoofdpi/output.log
$HOMEBREW_PREFIX/var/log/spoofdpi/error.log $HOMEBREW_PREFIX/var/log/spoofdpi/error.log
``` ```
## Binary ## Curl
SpoofDPI will be installed in `~/.spoof-dpi/bin`. SpoofDPI will be installed in `~/.spoofdpi/bin`.
To run SpoofDPI in any directory, add the line below to your `~/.bashrc || ~/.zshrc || ...` To run SpoofDPI in any directory, add the line below to your `~/.bashrc || ~/.zshrc || ...`
``` ```bash
export PATH=$PATH:~/.spoof-dpi/bin export PATH=$PATH:~/.spoofdpi/bin
``` ```
--- ---
```bash ```bash
@ -57,17 +53,22 @@ curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bas
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-mipsle curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-mipsle
``` ```
# Run
```bash
spoofdpi
```
## Go ## Go
You can also install SpoofDPI with `go install` You can also install SpoofDPI with `go install`
```bash ```bash
$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest go install github.com/xvzc/SpoofDPI/cmd/spoofdpi@latest
``` ```
## Git ## Git
You can also build your own You can also build your own
```bash ```bash
$ git clone https://github.com/xvzc/SpoofDPI.git git clone https://github.com/xvzc/SpoofDPI.git
$ cd SpoofDPI cd SpoofDPI
$ go build ./cmd/... go build ./cmd/...
``` ```