5 Commits
Author SHA1 Message Date
dualfroz c9c0d96c68 Describe this repository 2026-10-22 21:01:52 +02:00
dualfroz d23b3ab6f8 test: expect the SOCKS dial error for the supported schemes 2026-09-14 05:57:21 +02:00
dualfroz 10043d6779 test: pin the timeout of a dialer without context 2026-09-14 05:23:54 +02:00
dualfroz 87744aa7c1 fix: name the proxy schemes that work, and stop panicking on the rest
"Which proxy does this support?" has a narrower answer than the docs
gave. `golang.org/x/net/proxy.FromURL` resolves `socks5` and `socks5h`
and nothing else, yet the README and `Proxy`'s doc comment both offered
"socks5, socks4 and socks4a". A `socks4://` URI fails every dial with
`proxy: unknown scheme: socks4`, which is what taking the docs at their
word looks like from the caller's side.

Corrected both, and pointed at `proxy.RegisterDialerType` -- the way
x/net/proxy expects a caller to add a scheme it does not carry.

That escape hatch had a second problem waiting. `establishProxyConnection`
asserted the dialer to `proxy.ContextDialer` unconditionally, but a
registered dialer need only implement `Dial`, and the assertion panicked
on those:

    interface conversion: T is not proxy.ContextDialer: missing method
    DialContext

It now falls back to dialing on a goroutine and abandoning the attempt
when the context expires, which is what x/net/proxy itself does for the
same case.

Closes: #95
2026-09-13 15:47:32 +02:00
upstream 74c6cde98a Upstream AfterShip/email-verifier state of the touched files before 072e335125 2026-09-11 23:05:39 +02:00