sazardev/networking-with-go has 63 GitHub stars and 9 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-12 09:44 UTC. Last push 2026-08-07.
This is the ultimate, fun, and hands-on guide to mastering network programming with Go. Whether you're a total beginner or a seasoned hacker, this repo will take you from zero to hero in Go networking, with a perfect blend of theory, practical projects, and cybersecurity adventures.
計測したスター増加
- 24時間
- 0
- 7日間
- 履歴を収集中
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルNetworking with Go, Made Easy
Networking with Go, Made Easy 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 for building production-grade APIs and doing offensive/defensive security work.
It is written for three audiences at once:
- Newcomers to networking who want the concepts explained clearly, with analogies and diagrams, before ever touching code.
- Newcomers to Go who know some programming but not Go itself, and need a real, thorough on-ramp to the language — including its single most important feature, concurrency.
- Working developers who already know both, and want a deep, practical reference for building networked systems, production APIs (with real databases, containers, and cloud deployment), and security tooling in Go specifically.
Every chapter is a .mdx file under docs/, and the whole book can be compiled into a single print-ready PDF with go-pretty-pdf (see Building the PDF below).
What makes this guide different
- Theory first, then code: every networking concept gets explained conceptually before you see a line of Go.
- A dedicated Go Fundamentals section, so "Part 2" doesn't assume you already know the language — with a full, flagship-depth chapter on goroutines, channels, and concurrency, Go's signature feature.
- Every hands-on example is a complete, runnable program, not a fragment — copy it, run it, break it, change it.
- Practical warnings and pitfalls called out explicitly (resource leaks, race conditions, insecure defaults), not just happy-path code.
- It goes past "hello world" networking into production APIs (real SQL/SQLite databases, Docker, Google Cloud, Kubernetes-style orchestration, Clean/Hexagonal Architecture, Domain-Driven Design) and offensive/defensive security.
Table of Contents
Chapters are listed in reading order. Each links straight to its file — click any of them to jump in.
Front matter: About the Author
Part 1: Networking Theory and Concepts
Pure conceptual grounding: how networks are built and how data actually moves — real history, analogies, and stories, no code at all. This part is entirely about building a rock-solid mental model before you write a single line of Go, which starts fresh in the very next part.
- Introduction to Networking
- History and Evolution of Computer Networks
- Types of Networks: LAN, WAN, MAN, PAN
- Network Topologies and Architectures
- The OSI and TCP/IP Models
- Understanding IP Addressing and Subnetting
- Ports, Sockets, and Endpoints
- TCP vs UDP: Concepts and Use Cases
- Common Network Protocols (HTTP, FTP, DNS, etc.)
- Network Security Fundamentals
- Firewalls, NAT, and VPNs
- Network Troubleshooting and Tools
- Performance, Latency, and Bandwidth
Go Fundamentals
A self-contained crash course in the Go language itself — not networking yet. If you already know Go well, skim it or skip to Part 2; if you don't, this is what makes the rest of the book safe to follow. Installation, exact terminal commands, and a hands-on exercise in every chapter — including a full, flagship-depth chapter on goroutines and channels, since concurrency is Go's single most important feature.
- Installing Go and Your First Program
- Variables, Types, and Constants
- Functions and Methods
- Structs and Interfaces
- io.Reader, io.Writer, and Streaming Data
- Slices, Arrays, and Maps
- Error Handling in Go
- Packages, Modules, and go.mod
- Testing Basics with go test
- Goroutines, Channels, and Concurrency
Part 2: Unified Networking Topics (Theory + Practice)
Where networking theory and Go implementation merge: every chapter pairs protocol theory with a real, working Go program. This is the core of the book.
- Setting Up Your Go Development Environment
- Go Language Basics for Networking
- Go Networking Packages Overview
- Working with IP, Ports, and Addresses: Concepts and Go Implementation
- TCP in Depth: Protocol Theory and Go Implementation
- UDP in Depth: Protocol Theory and Go Implementation
- Error Handling and Debugging: Concepts and Go Implementation
- Concurrency in Networking: Theory and Go Implementation
- Context and Cancellation: Concepts and Go Implementation
- HTTP: Protocol Theory and Go Implementation
- Handling JSON and XML over HTTP: Concepts and Go Implementation
- WebSockets: Real-Time Communication in Go
- Chat Applications: Design, Protocols, and Go Implementation
- File Transfer Applications: Protocols and Go Implementation
- Proxy Servers and Clients: Concepts and Go Implementation
- DNS: Theory and Go Implementation
- NAT Traversal and P2P Networking: Concepts and Go Implementation
- Authentication and Authorization: Security Theory and Go Implementation
- Security in Go Networking: TLS, Encryption, and Best Practices
- Logging and Monitoring: Concepts and Go Implementation
- Testing and Debugging Go Network Applications: Theory and Practice
- Performance Optimization: Concepts and Go Implementation
- Deploying Go Network Applications: Best Practices
- Real-World Projects and Case Studies
- Email Protocols: Theory and Go Implementation
- Further Resources and Next Steps
Advanced & Specialized Networking Topics
Specialized areas that build on Part 2: distributed systems protocols, infrastructure automation, and networking for specific domains (games, blockchain, big data).
- gRPC and Protocol Buffers in Go
- WebRTC and P2P Communication in Go
- MQTT, AMQP, and IoT Messaging Protocols
- SDN (Software Defined Networking) and OpenFlow with Go
- Network Function Virtualization (NFV) in Go
- Deep Packet Inspection and Packet Manipulation
- Custom Protocol Design and Implementation
- Cloud Networking APIs and Automation with Go
- Zero Trust Networking and Microsegmentation
- Network Simulation and Virtual Labs
- Automating Network Device Configuration
- Observability and Tracing in Go Networking
- Wireless Networking and Go
- Mesh Networks and Dynamic Routing
- High Availability and Load Balancing
- Real-Time Networking for Games
- Blockchain and Cryptocurrency Networking
- Big Data, AI, and Streaming Networks
- Go Networking Performance Benchmarks
- QUIC and HTTP/3 in Go
- Message Queues and Service Discovery in Go
- IPv6 Networking in Go
Part 3: Cybersecurity & Hacking
Offensive and defensive security for networked systems, taught for authorized, ethical use: your own labs, CTFs, and systems you're authorized to test.
- Introduction to Cybersecurity in Networking
- Threat Modeling and Attack Surfaces
- Common Network Attacks (DoS, MITM, Spoofing, etc.)
- Network Scanning and Enumeration with Go
- Packet Sniffing and Analysis with Go
- Vulnerability Assessment and Exploitation Basics
- Building Simple Security Tools in Go
- Penetration Testing Workflows
- Incident Response and Forensics
- Ethical Hacking and Legal Considerations
- Implementing TLS/SSL in Go
- Certificate Management and PKI
- Secure Coding Practices in Go
- Zero Trust Networking Concepts
- Network Segmentation and Microsegmentation
- IDS/IPS: Concepts and Go Implementations
- SIEM and Log Analysis for Network Security
- Malware Analysis and Network Indicators
- Reverse Engineering Network Protocols
- Red Team vs Blue Team: Concepts and Labs
- Social Engineering in Networking
- Wireless Network Security: Theory and Attacks
- IoT Security: Concepts and Go Implementations
- Cloud Networking Security
- Container and Kubernetes Network Security
- Bug Bounty and Responsible Disclosure
- Security Automation with Go
- Building a Custom Honeypot in Go
- Simulating Attacks and Defense in Lab Environments
- Case Studies: Real-World Network Breaches
- Emerging Threats and Future Trends in Network Security
- Further Cybersecurity Resources
Part APIs: Building Modern APIs & Backends with Go
Everything about building, securing, testing, and operating HTTP APIs and backends in Go -- from net/http fundamentals through frameworks, real-time features, real databases (PostgreSQL, SQLite), Docker and Google Cloud deployment, production-grade architecture (Clean Architecture, Hexagonal Architecture, Domain-Driven Design), and thinking like an attacker to secure what you ship.
Chapter numbers 104-149 below map to files 01- through 46- under docs/part-apis/.
- API Fundamentals: REST, HTTP, and the Web
- Designing Clean URLs, Query Params, and Routing
- JSON, XML, and Data Serialization
- Building RESTful APIs with net/http
- Building APIs with Gin
- Building APIs with Fiber
- Serving HTML, Templates, and Static Files
- Adding WebSockets to Your API
- Notifications, SSE, and Real-Time Updates
- API Security: Tokens, Auth, and Best Practices
- Rate Limiting, CORS, and API Gateways
- API Documentation and OpenAPI/Swagger
- Testing and Mocking APIs
- Versioning, Deprecation, and Maintenance
- Prebuilt Solutions and API Boilerplates
- API Performance, Monitoring, and Observability
- Deploying and Scaling Go APIs
- Advanced API Rate Limiting and Anti-Abuse
- Advanced API Gateway and Service Mesh
- APIs for Graph Databases and NoSQL
- APIs for Background Jobs and Task Queues
- APIs for File Uploads, Media, and Streaming
- APIs for Webhooks and Event-Driven Design
- APIs for OAuth2, SSO, SAML, OpenID Connect
- APIs for Multi-Tenancy and SaaS
- APIs for Internationalization (i18n) and Localization (l10n)
- APIs for Feature Flags and Dynamic Config
- APIs for Load and Stress Testing
- APIs for CI/CD and DevOps
- APIs for Serverless and FaaS
- APIs for Edge Computing and CDN
- APIs for Advanced Security
- APIs for Advanced Observability: Metrics and Logging
- APIs for Advanced Observability: Distributed Tracing
- RPC and gRPC for APIs
- Working with SQL Databases: PostgreSQL
- Working with SQLite in Go
- Containerizing Go APIs with Docker
- Clean Architecture for Go APIs
- Hexagonal Architecture (Ports and Adapters) for Go APIs
- Domain-Driven Design in Go
- Building a Complete Project End-to-End
- Deploying to Google Cloud
- Orchestration, Replicas, and Graceful Shutdown
- Thinking Like an Attacker: API Security
- Caching and Redis for Go APIs
Back matter: A Final Word
Who is this for?
- 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/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
How to Use This Repo
- New to networking and Go? Start at Part 1, go through Go Fundamentals next, then move into Part 2 in order — each chapter builds on the last.
- Know Go already, new to networking? Skim or skip Go Fundamentals, but still read Part 1 and Part 2 in order.
- Know networking already, new to Go? Skip to Go Fundamentals — don't skip chapter 23 (Goroutines, Channels, and Concurrency) even if you've used other languages' concurrency models, Go's is different — then jump straight into whichever later part matches what you're building.
- Want the production-backend track specifically? Part APIs chapters 138-145 (RPC/gRPC, PostgreSQL, SQLite, Docker, Clean/Hexagonal Architecture, DDD) build one coherent example project across all of them, capped by chapter 145's end-to-end walkthrough — read that run in order even if you jump around elsewhere.
- Looking for something specific? Use the table of contents above — every chapter is self-contained enough to read on its own, with cross-references where it depends on an earlier concept.
- Every hands-on code block is meant to be copied, run, and modified — try the "Try It Yourself" prompts, don't just read past them.
- The small runnable programs under
exercises/mirror many Part 2 chapters if you want a bare, ready-to-run version outside the prose (seeCLAUDE.mdfor how to run them). Exercises currently cover Part 2 only; standalone exercises for Advanced, Part 3, and Part APIs chapters are planned and contributions are welcome.
Building the PDF
The whole book compiles into a single PDF with go-pretty-pdf:
go install github.com/sazardev/go-pretty-pdf/cmd/pretty-pdf@latest
pretty-pdf check # validate every chapter's format
pretty-pdf build # render docs/ into the PDF configured in go-pretty-pdf.yml
Prebuilt PDF and EPUB downloads are available on the GitHub Releases page for every tagged version.
Contributing
PRs, issues, and suggestions are welcome — new labs, corrections, clearer explanations, or entirely new chapters. See .github/CONTRIBUTING.md for the basics, and .claude/skills/mdx-pdf-format/SKILL.md if you're adding or editing a chapter file, for the exact format the build expects.
License
This repository uses two licenses:
- Code (
exercises/,website/, build tooling) — MIT. Use it freely, no attribution required. - Book text (
docs/**/*.mdx, and any PDF/EPUB/HTML rendered from it) — CC BY-NC 4.0. Free to read, share, and adapt for non-commercial use, as long as you credit Omar Flores Salazar.
Star this repo if you find it useful!
"The best way to learn networking is to build, break, and secure it."
If this book saved you some time, you can buy me a coffee — never required, always appreciated.
関連プロジェクトを探す
trimstray/the-book-of-secret-knowledge
インスピレーションを与えるリスト、マニュアル、チートシート、ブログ、ハック、ワンライナー、CLI/Web ツールなどを集めたコレクション。
257,889 スターHack-with-Github/Awesome-Hacking
ハッカー、ペンテスター、セキュリティ研究者向けのさまざまな Awesome リスト集。
125,254 スターswisskyrepo/PayloadsAllTheThings
Web アプリケーションセキュリティおよびペネトレーションテスト/CTF 向けの、実用的なペイロードとバイパスの一覧。
82,583 スターcaddyserver/caddy
高速で拡張しやすい、マルチプラットフォーム対応の HTTP/1-2-3 Web サーバー。自動 HTTPS に対応
78,959 スター