---
title: "email-verifier: SOCKS proxies and a dialer panic in Go"
description: "A fix in email-verifier in Go: the docs list the proxy schemes that actually work, and a custom dialer without DialContext no longer causes a panic."
url: "https://vulcode.com/en/opensource/contributions/email-verifier"
lang: "en"
---

[All contributions](https://vulcode.com/en/opensource/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.

[See the repository](https://github.com/AfterShip/email-verifier) [All contributions](https://vulcode.com/en/opensource/contributions)

- **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](https://github.com/AfterShip/email-verifier/pull/224)

## Merged change

1 15 September 2026

- [01 #224Merged 15 September 2026 Document the proxy schemes that work and stop panicking on custom dialers](https://github.com/AfterShip/email-verifier/pull/224)

## 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](https://vulcode.com/en/technologies/go)

## Other projects we write code for

- [**urfave/cli** Go · 24,329 stars A declarative Go package for building command line tools.](https://vulcode.com/en/opensource/contributions/urfave-cli)

- [**chezmoi** Go · 22,342 stars A dotfiles manager that keeps the same settings on many different machines, securely.](https://vulcode.com/en/opensource/contributions/chezmoi)

- [**goquery** Go · 14,995 stars A Go library for traversing and changing HTML documents in the style of jQuery, built on the golang.org/x/net/html parser.](https://vulcode.com/en/opensource/contributions/goquery)

- [**Ebitengine** Go · 13,647 stars A 2D game engine in Go, used in games released for computers, phones, browsers and consoles.](https://vulcode.com/en/opensource/contributions/ebiten)

- [**Fission** Go · 8,950 stars A serverless functions framework for Kubernetes that runs code as functions and scales them down to zero when they are idle.](https://vulcode.com/en/opensource/contributions/fission)

- [**Concourse** Go · 7,944 stars A container-based automation system written in Go and used mostly for CI/CD. Pipelines and tasks are described in YAML files.](https://vulcode.com/en/opensource/contributions/concourse)

## Describe your project.

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

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)
