Skip to content

fix(skysocks): serve status.skysocks in-process even when disconnected from the exit - #4204

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:fix/status-skysocks-disconnected
Aug 26, 2026
Merged

fix(skysocks): serve status.skysocks in-process even when disconnected from the exit#4204
0pcom merged 1 commit into
skycoin:developfrom
0pcom:fix/status-skysocks-disconnected

Conversation

@0pcom

@0pcom 0pcom commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

skysocks-client dials the exit before it binds :1080 (the live Client is built from the yamux session conn), so while the client is still connecting — or the exit route group never came up — nothing listened on :1080 and a browser request for the reserved status.skysocks diagnostic host got connection-refused. That is exactly when a user wants to see why the proxy is not connected.

A new sessionless listener (skysocks.ServeDisconnected) now owns :1080 during the dial window and answers each SOCKS5 connection locally: reserved diagnostic hosts (proxystatus.Match) are rendered in-process with zero exit involvement, on any port, while every real target still gets the branded "building a route" interstitial (plaintext HTTP) or is declined (other ports).

No real traffic is ever tunneled on this path — there is no exit to tunnel to — so a listening-but-not-connected :1080 only surfaces the local diagnostic/interstitial pages, never silently serving or blackholing real requests. Extends the earlier session-down (#4128) and dead-but-route-open (#4198) coverage to the no-session-at-all state. New tests cover status.skysocks served on a non-80 port with no session, a real host getting the interstitial, and a non-HTTP port declined.

…d from the exit

skysocks-client dials the exit BEFORE it binds :1080 (the live Client is built
from the yamux session conn), so while the client is still connecting or the exit
route group never came up, nothing listened on :1080 and a browser request for the
reserved status.skysocks diagnostic host got connection-refused — exactly when a
user wants to see why the proxy is not connected. A new sessionless listener
(skysocks.ServeDisconnected) now owns :1080 during the dial window and answers each
SOCKS5 connection locally: reserved diagnostic hosts (proxystatus.Match) are
rendered in-process with zero exit involvement, on any port, while every real
target still gets the branded "building a route" interstitial (plaintext HTTP) or
is declined (other ports). No real traffic is ever tunneled here — there is no exit
to tunnel to — so listening-but-not-connected only surfaces the local
diagnostic/interstitial pages, never silently serving or blackholing real requests.
@0pcom
0pcom merged commit d85a8bb into skycoin:develop Aug 26, 2026
11 of 15 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