All contributions

AfterShip/email-verifier

email-verifier

A Go library for verifying email addresses without sending mail, including an SMTP check against the mail server and through a SOCKS5 proxy.

Language
Go
GitHub stars
1,666
Merged changes
1

What we changed

The README and Proxy() now say that only the socks5 and socks5h schemes work, and a custom dialer registered with proxy.RegisterDialerType without DialContext no longer panics but connects through a plain Dial with a timeout.

What this work shows

  • SOCKS5 proxies and golang.org/x/net/proxy
  • Go interfaces and type assertions
  • Timeouts with context and goroutines
What was broken

Promised socks4 and a panic on a custom dialer

The README and the Proxy() comment promised socks4 and socks4a, but golang.org/x/net/proxy only resolves socks5 and socks5h, so other schemes failed with "proxy: unknown scheme". A dialer added with proxy.RegisterDialerType without a DialContext method panicked on a type assertion.

How we fixed it

Accurate docs and a Dial with a timeout

The docs now list socks5 and socks5h and point to RegisterDialerType for other schemes. A dialer without DialContext connects through Dial in a separate goroutine, and when the timeout runs out the attempt is abandoned and the connection closed, which new tests check.

#224

Merged change

1 15 September 2026

What it taught us

When a library lets you plug in your own component, it has to handle one that lacks some methods instead of asserting its type blindly. We check the docs against the code and pin them with a test, so the README promises only what works.

More about this technology: Golang

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.