usmo 0.9.2__tar.gz → 0.9.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {usmo-0.9.2 → usmo-0.9.3}/PKG-INFO +1 -1
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/net.md +4 -1
- {usmo-0.9.2 → usmo-0.9.3}/pyproject.toml +1 -1
- {usmo-0.9.2 → usmo-0.9.3}/scripts/_config.json +3 -3
- {usmo-0.9.2 → usmo-0.9.3}/scripts/net.py +14 -4
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/_version.py +2 -2
- {usmo-0.9.2 → usmo-0.9.3}/.github/workflows/docs.yml +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/.github/workflows/release.yml +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/.gitignore +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/.pre-commit-config.yaml +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/README.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/dev/bump_version.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/architecture.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/bench.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/blobmount.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/builtin.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/clash.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/clip.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/cp.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/cu122.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/gpu.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/index.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/init.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/inject-alias.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/notify.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/openai-proxy.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/port.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/proxy.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/rsync.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/secret.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/serve.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/session.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/share.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/sysinfo.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/tunnel.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/commands/wait.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/development.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/index.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/docs/installation.md +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/mkdocs.yml +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/bench.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/blobmount.sh +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/check_py.sh +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/clash.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/clip.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/cp.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/cu122.sh +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/gpu.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/init.sh +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/inject_alias.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/install.sh +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/notify.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/openai_proxy.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/port.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/proxy.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/rsync.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/secret.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/serve.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/session.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/share.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/sysinfo.sh +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/tunnel.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/scripts/wait.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/__init__.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/cli/__init__.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/cli/app.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/cli/commands.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/cli/output.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/cli/presenters.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/cli/runner.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/__init__.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/aliases.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/catalog.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/constants.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/environments.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/errors.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/manifest.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/model.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/src/usmo/core/version.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/tests/conftest.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/tests/test_core_alias.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/tests/test_core_hash.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/tests/test_core_script.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/tests/test_net.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/tests/test_openai_proxy.py +0 -0
- {usmo-0.9.2 → usmo-0.9.3}/tests/test_session.py +0 -0
|
@@ -17,6 +17,7 @@ usm net trace gnu.org # mtr (or traceroute) report
|
|
|
17
17
|
usm net lookup host @8.8.8.8 # DNS resolution + timing
|
|
18
18
|
usm net mtu 1.1.1.1 # path-MTU probe (DF binary search)
|
|
19
19
|
usm net pubip # public IP + geo/ASN (the only command that calls out)
|
|
20
|
+
usm net pubip --direct # ...ignoring any proxy env vars
|
|
20
21
|
|
|
21
22
|
usm net speed -w # live per-interface throughput
|
|
22
23
|
```
|
|
@@ -34,7 +35,9 @@ by other users). `fw` prints firewall status read-only.
|
|
|
34
35
|
`ping`/`trace`/`mtu` wrap the system tools and summarise the result;
|
|
35
36
|
`lookup` times resolution via the system resolver, or a specific server with
|
|
36
37
|
`lookup <name> @<server>` (uses `dig`). `pubip` is the **only** subcommand
|
|
37
|
-
that reaches the internet
|
|
38
|
+
that reaches the internet (querying `ipinfo.io`); it honours proxy env vars
|
|
39
|
+
(`HTTPS_PROXY` / `ALL_PROXY`) by default, so behind a proxy it reports the
|
|
40
|
+
egress IP — pass `--direct` to bypass the proxy and show the host's own IP.
|
|
38
41
|
|
|
39
42
|
## Monitor
|
|
40
43
|
|
|
@@ -215,12 +215,12 @@
|
|
|
215
215
|
"path": "net.py",
|
|
216
216
|
"requirements": [
|
|
217
217
|
"click>=8.2.1",
|
|
218
|
-
"httpx>=0.27.0",
|
|
218
|
+
"httpx[socks]>=0.27.0",
|
|
219
219
|
"psutil>=7.1.3",
|
|
220
220
|
"rich>=13.0"
|
|
221
221
|
],
|
|
222
|
-
"version": "1.0.
|
|
223
|
-
"hash": "sha256:
|
|
222
|
+
"version": "1.0.1",
|
|
223
|
+
"hash": "sha256:11b94c2a2b767d6038d641381fac783efb0dbe99590a06bf4cb55172fa7a9122"
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}
|
|
@@ -576,17 +576,27 @@ def cmd_mtu(host: str) -> None:
|
|
|
576
576
|
|
|
577
577
|
|
|
578
578
|
@cli.command("pubip")
|
|
579
|
-
|
|
580
|
-
"""
|
|
579
|
+
@click.option(
|
|
580
|
+
"--direct", "-d", is_flag=True, help="Ignore proxy env vars; query directly."
|
|
581
|
+
)
|
|
582
|
+
def cmd_pubip(direct: bool) -> None:
|
|
583
|
+
"""Show this host's public IP and geo/ASN (makes one HTTP request).
|
|
584
|
+
|
|
585
|
+
Honours proxy environment variables (HTTPS_PROXY / ALL_PROXY) by default,
|
|
586
|
+
so behind a proxy it reports the egress IP; pass --direct to bypass them.
|
|
587
|
+
"""
|
|
581
588
|
import httpx
|
|
582
589
|
|
|
583
590
|
try:
|
|
584
591
|
with console.status("querying ipinfo.io…"):
|
|
585
|
-
r = httpx.get("https://ipinfo.io/json", timeout=8.0)
|
|
592
|
+
r = httpx.get("https://ipinfo.io/json", timeout=8.0, trust_env=not direct)
|
|
586
593
|
r.raise_for_status()
|
|
587
594
|
data = r.json()
|
|
588
595
|
except Exception as exc: # noqa: BLE001 - report any network/parse failure
|
|
589
|
-
|
|
596
|
+
msg = f"could not reach the IP service: {exc}"
|
|
597
|
+
if not direct and any(k in str(exc).lower() for k in ("proxy", "socks")):
|
|
598
|
+
msg += "\nA proxy is set in your environment — try: usm net pubip --direct"
|
|
599
|
+
raise click.ClickException(msg)
|
|
590
600
|
table = Table(show_header=False, box=None, pad_edge=False, padding=(0, 2, 0, 1))
|
|
591
601
|
table.add_column(justify="right", style="dim")
|
|
592
602
|
table.add_column(style="bold")
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.9.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 9,
|
|
21
|
+
__version__ = version = '0.9.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 9, 3)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|