Skip to content

refactor(hcore): plain proxy lists with chain_hop; Connected waits for the hop - #161

Merged
hiddify-com merged 4 commits into
mainfrom
refactor/plain-proxy-info
Oct 29, 2026
Merged

hiddify-com merged 4 commits into
mainfrom
refactor/plain-proxy-info

Conversation

@veto9292

@veto9292 veto9292 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Depends on hiddify/hiddify-sing-box#43: the first commit bumps hiddify-sing-box to a commit on that PR's branch.

Changes (4 commits)

  1. Bump hiddify-sing-box: monitoring no longer loads the IP of the previous run, so ipinfo stays empty until a lookup of this run works.

  2. chain_hop in OutboundGroupList: the main list sends the active extra security / unblocker hop in its own field.

  3. Each proxy sent as it is:

    • no "→" joins in names and types;
    • no hop placed first in select;
    • no chain-hops group with renamed copies.

    detour still names the next hop. The status mark stays in type, because the proxy list shows it. This also fixes broken names such as Via P → P socks → Via P.

  4. Connected waits for the hop: with extra security, STARTED needs a live ping of the hop too. Before, the core said Connected while the hop was still connecting.

Tests

  • grpcurl on the CLI, before and after, in six cases: one proxy, three proxies, extra security with Psiphon, WARP and selectable, and unblocker.
  • Names and types are plain, chain_hop is right in every chain case, and STARTED comes right after the hop's first ping.

Note

Breaking for clients: the app must read chain_hop. The matching app change is not in a PR yet.

🤖 Generated with Claude Code

veto9292 and others added 4 commits October 29, 2026 21:46
Monitoring no longer loads the saved IP information at start, so
OutboundInfo.ipinfo is empty until a lookup of this run works, and a
failed first test or lookup no longer keeps the old IP for the whole
run (hiddify-sing-box 0947d32ea). The app's home card now shows its
loading state instead of last run's exit IP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The main proxy list gets one field for the extra security or unblocker
hop the traffic goes through now, so clients read the hop directly
instead of finding it among renamed copies. hcore.pb.go is generated
with protoc-gen-go v1.34.2, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The proxy lists no longer rewrite what they send:
- names and types are no longer joined with the detour ("A → B"), nor a
  group's entry with its pick in the main list; detour holds the tag
- the extra security hop is no longer put first in select, so select
  keeps its real selection
- no chain-hops group with renamed copies, and no renamed members in
  the chain groups

The main list sets chain_hop to the hop itself; in the selectable mode it
follows the selector and its balancer down to the hop. The status mark
stays in type: the proxy list shows it.

This also fixes names such as "Via P → P socks → Via P" and
"P socks → Unblocker → P socks → P socks", which the joins produced
when one proxy was in several groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With extra security all traffic goes through the hop, which dials
through the selected proxy. The core reported STARTED as soon as the
lowest group had a ping, while the hop was still connecting, so clients
showed Connected before anything worked. Now STARTED also needs a live
ping of the hop the traffic goes through (the one chain_hop reports);
otherwise the core stays WAITING. The unblocker needs no such check:
the proxies dial through it, so their own pings cover it.

Checked with grpcurl on Psiphon, WARP and the selectable mode: STARTED
comes right after the hop's first ping, never before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@veto9292
veto9292 changed the base branch from fix/cached-ipinfo to main October 29, 2026 18:25
@hiddify-com
hiddify-com merged commit c263865 into main Oct 29, 2026
14 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.

2 participants