Skip to content

feat: parse host:port and URL port tokens - #2

Merged
hc-ui merged 4 commits into
mainfrom
cursor/host-port-tokens-aa74
Aug 26, 2026
Merged

feat: parse host:port and URL port tokens#2
hc-ui merged 4 commits into
mainfrom
cursor/host-port-tokens-aa74

Conversation

@hc-ui

@hc-ui hc-ui commented Aug 26, 2026

Copy link
Copy Markdown
Owner

改动

新增 whoseport.tokens.parse_port_tokens:接受 localhost:8080[::1]:3000http://127.0.0.1:5173/。纯数字的 8080:8090 仍拒绝(那是写错的范围,不是 host:port)。

CLI 已接上whoseport.cli.parse_port_tokens 改为 from whoseport.tokens import parse_port_tokenswhoseport localhost:8080 --json 会查 8080。

也接受带路径 / 查询 / fragment 的 host:port:localhost:8080/health[::1]:5173/applocalhost:8080#ready

与已有 draft「docker-proxy.exe 提示停容器」互补。没有 PR 模板。本分支保持 0.2.0,版本 bump 留给 #1(0.2.1)。

验证

PYTHONPATH=src python3 -m pytest -q → 103 passed, 2 skipped。

@hc-ui
hc-ui marked this pull request as ready for review August 26, 2026 10:29
@hc-ui
hc-ui merged commit bd19a7c into main Aug 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant