fix(latency): invalid 0 latency scenario

This commit is contained in:
kunish 2023-09-03 06:37:48 +08:00
parent 5c705efedb
commit dd5f0f14a0
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
2 changed files with 43 additions and 23 deletions

View File

@ -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
```

View File

@ -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(),