Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ Existing DNS records are never overwritten — pick a name that isn't in use.

```bash
omarchy-remote expose <name> <port> # private: https://<machine>.ts.net:<port>
omarchy-remote expose <name> <port> --auth <mode> # public: https://<name>.<your-domain>
omarchy-remote expose <name> <port> --auth <mode> [--via cloudflare|pangolin] # public: https://<name>.<your-domain>
omarchy-remote list
omarchy-remote unexpose <name>
```

Without `--auth` the URL is private (Tailscale). With `--auth` it is public, through the
provider in `--via cloudflare|pangolin`, or the default set with
`omarchy-remote config set public <provider>`. Unset, the default is Cloudflare (Pangolin if
only Pangolin is set up on this machine); `--auth bearer` always uses Cloudflare and
`--auth password` always uses Pangolin.
only Pangolin is set up on this machine; with both set up, `expose` says it picked Cloudflare);
`--auth bearer` always uses Cloudflare and `--auth password` always uses Pangolin.

| `--auth` | For | How to get in | Share with someone | Providers |
|---|---|---|---|---|
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ curl -fsSL https://raw.githubusercontent.com/second-state/omarchy-remote/main/in

```bash
omarchy-remote expose <名字> <端口> # 私有:https://<机器名>.ts.net:<端口>
omarchy-remote expose <名字> <端口> --auth <方式> # 公网:https://<名字>.<你的域名>
omarchy-remote expose <名字> <端口> --auth <方式> [--via cloudflare|pangolin] # 公网:https://<名字>.<你的域名>
omarchy-remote list
omarchy-remote unexpose <名字>
```

不带 `--auth` 时是私有地址(Tailscale)。带了 `--auth` 就是公网地址,走 `--via cloudflare|pangolin` 指定的提供方;不写 `--via` 时用 `omarchy-remote config set public <提供方>` 设置的默认值。没设置时默认走 Cloudflare(如果这台机器只配了 Pangolin,就走 Pangolin);`--auth bearer` 总是走 Cloudflare,`--auth password` 总是走 Pangolin。
不带 `--auth` 时是私有地址(Tailscale)。带了 `--auth` 就是公网地址,走 `--via cloudflare|pangolin` 指定的提供方;不写 `--via` 时用 `omarchy-remote config set public <提供方>` 设置的默认值。没设置时默认走 Cloudflare(如果这台机器只配了 Pangolin,就走 Pangolin;两个都配了时,`expose` 会提示它选了 Cloudflare);`--auth bearer` 总是走 Cloudflare,`--auth password` 总是走 Pangolin。

| `--auth` | 给谁用 | 怎么进入 | 分享给别人 | 提供方 |
|---|---|---|---|---|
Expand Down
7 changes: 5 additions & 2 deletions bin/omarchy-remote
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

set -euo pipefail

VERSION="0.6.0"
VERSION="0.6.1"

# ---- settings (override in ~/.config/omarchy-remote/config) -----------------
CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy-remote/config"
Expand Down Expand Up @@ -341,7 +341,10 @@ cmd_expose() {
elif [[ -n "$PUBLIC_VIA" ]]; then via="$PUBLIC_VIA"
# Not configured: Cloudflare, unless only Pangolin is set up on this machine.
elif [[ -r "$PG_ENV_FILE" && ! -r "$CF_ENV_FILE" ]]; then via=pangolin
else via=cloudflare; fi
else
via=cloudflare
[[ -r "$PG_ENV_FILE" ]] && info "Using Cloudflare (both providers are set up; pick one with --via pangolin|cloudflare or: omarchy-remote config set public <provider>)"
fi
fi
case "$via" in
tailscale)
Expand Down
Loading