diff --git a/README.md b/README.md index c1a2267..f451ec0 100644 --- a/README.md +++ b/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 +``` diff --git a/src/signals/proxies.ts b/src/signals/proxies.ts index 1cddcfa..0c09df9 100644 --- a/src/signals/proxies.ts +++ b/src/signals/proxies.ts @@ -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(),