mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-23 21:35:36 +08:00
fix(latency): invalid 0 latency scenario
This commit is contained in:
parent
5c705efedb
commit
dd5f0f14a0
64
README.md
64
README.md
@ -14,35 +14,23 @@ Cloudflare Pages: https://metacubexd.pages.dev
|
||||
|
||||
## Usage
|
||||
|
||||
### Build locally
|
||||
|
||||
Install npm dependencies
|
||||
|
||||
```shell
|
||||
pnpm install
|
||||
```
|
||||
|
||||
Build artifacts
|
||||
|
||||
```shell
|
||||
pnpm build
|
||||
```
|
||||
|
||||
Serve static files
|
||||
|
||||
```shell
|
||||
pnpm serve
|
||||
```
|
||||
|
||||
### Run inside Docker
|
||||
|
||||
docker cli
|
||||
> docker cli
|
||||
|
||||
Running
|
||||
|
||||
```shell
|
||||
docker run -d --restart always -p 80:80 --name metacubexd ghcr.io/metacubex/metacubexd
|
||||
```
|
||||
|
||||
docker-compose.yml
|
||||
Update and restart
|
||||
|
||||
```shell
|
||||
docker pull ghcr.io/metacubex/metacubexd && docker restart metacubexd
|
||||
```
|
||||
|
||||
> docker-compose.yml
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@ -66,3 +54,35 @@ services:
|
||||
volumes:
|
||||
- ./config.yaml:/root/.config/clash
|
||||
```
|
||||
|
||||
Running
|
||||
|
||||
```shell
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Update and restart
|
||||
|
||||
```shell
|
||||
docker compose pull && docker compose up -d
|
||||
```
|
||||
|
||||
### Build locally
|
||||
|
||||
> Install npm dependencies
|
||||
|
||||
```shell
|
||||
pnpm install
|
||||
```
|
||||
|
||||
> Build artifacts
|
||||
|
||||
```shell
|
||||
pnpm build
|
||||
```
|
||||
|
||||
> Serve static files
|
||||
|
||||
```shell
|
||||
pnpm serve
|
||||
```
|
||||
|
@ -21,7 +21,7 @@ export const useProxies = () => {
|
||||
|
||||
const setProxyInfoByProixes = (proxies: Proxy[] | ProxyNode[]) => {
|
||||
proxies.forEach((proxy) => {
|
||||
const latency = proxy.history.at(-1)?.delay ?? -1
|
||||
const latency = proxy.history.at(-1)?.delay || -1
|
||||
|
||||
setProxyNodeMap({
|
||||
...proxyNodeMap(),
|
||||
|
Loading…
Reference in New Issue
Block a user