net/go.book
Networking with Go, Made Easy — book cover, learn TCP/IP, sockets, and concurrent network programming in Golang from scratch
Free to Read & Share · Credit Required

Networking with Go, Made Easy

Learn TCP/IP, Sockets, and Concurrent Network Programming in Golang from Scratch — from networking fundamentals and the Go language itself to production APIs and ethical hacking.

No signup. No paywall. ★ open source on GitHub.

Want to support? Buy me a coffee.

151Chapters
6Parts
$0Price, always
CC BY-NCBook License
About the book

Networking, taught the way it should be — then built in Go

This is a free, hands-on book that teaches computer networking and network programming in Go, end to end: how networks actually work, how to write real networking code in Go, and how to use that code to build production-grade APIs and do offensive/defensive security work. It's written for three readers at once — people new to networking, people new to Go, and working developers who already know both and want a deep, practical reference. Theory comes first, in a warm, story-driven voice with real history and analogies; every hands-on example is a complete, runnable Go program, not a fragment.

A question worth asking honestly

Why read a 151-chapter book in 2026, when AI can already write a TCP server?

Because someone still has to know whether the code is right — and that someone is going to be you. An AI model produces plausible code fast; it has never watched a server leak connections at 3 a.m., and it has no stake in what happens when it's wrong. The gap between "code that compiles" and "a system that survives contact with the real internet" is exactly what this book closes — and that gap gets more valuable, not less, the more first drafts get written by something that doesn't understand what it built.

AI changes who writes the first draft of the code. It has not changed who is responsible for understanding it.

It makes you better at AI, not obsolete

The people most effective at directing AI tools aren't the ones who know the least — they're the ones who can spot a wrong answer in one glance and push back when a generated solution is subtly broken.

Networking isn't going anywhere

Every model you've ever talked to is itself served over a network, to a datacenter, on protocols invented decades before it existed. Learning this is a prerequisite for building the future, not competition for it.

Built for every level, on purpose

Whether this is your first program ever or your two-hundredth production deploy, this book starts each topic at zero and earns its way up — no assumed background, no skipped steps, no age or experience floor.

Read the book's full case for this, in Chapter 1 →
What's inside

Six parts, 151 chapters

From "what is a network?" to shipping a Go API on Google Cloud and building your own honeypot.

01 · 13 chapters

Networking Foundations

OSI & TCP/IP models, IP addressing and subnetting, ports, sockets, protocols, firewalls, NAT, and VPNs — theory only, no code, told through real history.

02 · 9 chapters

Go From Scratch

A full Go language crash course before the networking code starts, capped by a flagship chapter on goroutines, channels, and concurrency.

03 · 25 chapters

Core Go Networking

TCP, UDP, HTTP, JSON, WebSockets, DNS, proxies, chat apps, file transfer, NAT traversal, context, and TLS — theory paired with runnable Go every time.

04 · 19 chapters

Advanced & Specialized

gRPC, WebRTC, MQTT/IoT, SDN, NFV, packet inspection, custom protocols, mesh networks, and real-time networking for games and blockchain.

05 · 32 chapters

Cybersecurity & Ethical Hacking

Scanning, sniffing, vulnerability assessment, IDS/IPS, SIEM, malware analysis, red team vs blue team, honeypots, and PKI — for authorized, ethical use.

06 · 45 chapters

Production APIs & Architecture

REST and gRPC APIs with Gin and Fiber, PostgreSQL and SQLite, Docker and Google Cloud, Clean/Hexagonal Architecture, and Domain-Driven Design.

Get the book

Available formats

The book is free and always will be. New formats ship as they're ready — this page always points at the latest.

Web Reader Available

Every one of the 151 chapters has its own page and its own URL, with a search command palette and always in sync with the latest edit — no download needed.

Start Reading

PDF Available

Print-ready, built straight from the book's source with go-pretty-pdf. Always the current release.

Download PDF

EPUB Available

For e-readers and mobile apps. Built straight from the book's source with go-pretty-pdf, same as the PDF.

Download EPUB

Other formats Coming soon

MOBI is planned next. Star the repo to help decide what ships first.

Star the repo
Every level, on purpose

From your first "go run" to your two-hundredth deploy

No level is left out. This book was written so that someone who has never opened a terminal and someone who already ships production systems can both start reading today and both get something they can't get from a prompt.

  • Beginners who want networking concepts, and Go itself, explained clearly from the ground up.
  • Developers who already know Go but want a deep, practical reference for networked systems.
  • Anyone prepping for interviews, CTFs, or real-world backend and networking jobs.
  • Backend engineers who want a real, production-shaped example — architecture, database, Docker, cloud deploy — instead of a toy.
  • Security professionals and tinkerers who want offensive/defensive skills backed by working code.

Every chapter and the full table of contents live in the repository README.

Frequently asked questions

Straight answers, growing with every release

This FAQ isn't static. It grows as readers ask better questions and new chapters ship — currently reflecting book version latest.

Why learn this instead of just asking an AI to write the code?

Because someone still has to know whether the generated code is right, and that someone is you. AI is extraordinary at producing plausible code fast, but it has never operated the system it wrote and has no stake in the consequences when it's wrong. Understanding networking and Go doesn't compete with using AI well — it's what makes you effective at directing it: able to spot a wrong answer in one glance and catch the mistake before it ships.

Is this book really free, no catch?

Yes. No email required, no paywall, no ads. The book text is CC BY-NC 4.0 — free to read, share, and adapt for non-commercial use, as long as you credit the author — and the example code is MIT. The full source lives in the GitHub repository and compiles straight into the PDF you can download above.

I've never written a line of code. Is this too advanced for me?

No — it's written for that reader on purpose. Part 1 is pure theory with zero code, a dedicated Go Fundamentals part teaches the language itself before any networking begins, and every later chapter pairs a concept with a complete, runnable program.

Do I need to know Go before starting?

No. The dedicated Go Fundamentals section covers installation through testing, plus a flagship chapter on goroutines and channels, so Part 2 never assumes you already know the language.

Is it only theory, or does it include real code?

Both, deliberately separated: Part 1 is theory-only so the mental model comes first, and starting with Go Fundamentals, every chapter pairs the concept with a complete, runnable Go program — not a fragment.

Does it cover cybersecurity and ethical hacking?

Yes — Part 3 is 32 chapters on scanning, sniffing, vulnerability assessment, IDS/IPS, SIEM, malware analysis, red team vs blue team, honeypots, and PKI, written for authorized, ethical use: your own labs, CTFs, and systems you're allowed to test.

What formats are available, and what's coming next?

The web reader, PDF, and EPUB are all available now and always track the latest release. MOBI is planned next.

Can I contribute, suggest a chapter, or report an error?

Yes — pull requests, issues, and suggestions are welcome for new labs, corrections, clearer explanations, or entirely new chapters. See the contributing guide in the repository for the basics.

Who wrote this, and why should I trust it?

Omar Flores Salazar. The book text is CC BY-NC 4.0 and the example code is MIT, both fully open in the public repository, so every claim, every code sample, and every chapter is there for anyone to read, run, and check.

Missing your question? Open an issue on GitHub — it may show up here next release.

"The best way to learn networking is to build, break, and secure it."
About the author

The person behind the packets

Omar Flores Salazar

Omar Flores Salazar

Full-Stack & DevOps Engineer · Mexicali, Mexico

I'm a self-taught developer who fell in love with programming the way some people fall in love with music — early, loudly, and without looking back. I learn with every sense I have: reading, building, breaking, debugging at 3 a.m., and then teaching what I just learned to anyone willing to listen.

I believe education is the single most powerful tool we have, and I've spent my career building software, writing books, and sharing knowledge — not because it's expected, but because I genuinely can't help it. Every project I've shipped, every collaboration I've had, and every line of code I've written has taught me something new. This book is just the latest attempt to pass that forward.

I don't know your name, your age, or your story. But if you're reading this, you're already on the path. And I want you to know: I'm rooting for you. If you ever need help, have a question, or just want to say hi — my inbox is always open.

This book

Networking with Go

151 chapters, from zero to production APIs and ethical hacking. Free and open source.

GitHub →
Also by the author

Codigo Magico

A magical adventure that teaches programming to kids and young adults, available on Amazon.

Learn more →
"Reading allows us to travel through time and space, to know new cultures and to learn from the experiences of others. Reading is an open door to a world full of possibilities." — Carl Sagan

Get notified when new chapters land

The book is updated continuously. Leave your email and you will only hear from us when a new part or chapter is published — no spam, ever.