# SagerNet/sing-box SLOC report

> As of 2026-09-06 (commit 60b504a1c74a), SagerNet/sing-box contains 185,420 total lines: 163,314 code, 4,556 comments, 17,550 blank, across 1,173 files in 17 languages (top: Go 97.0%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

SagerNet/sing-box has 163,314 source lines of code out of 185,420 total lines across 1,173 files, counted from the 60b504a1c74a33fe24872c8144c8f0b7d3d61b2a ref at commit 60b504a1c74a by the OctoCounts tokei engine on 2026-09-06. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving SagerNet/sing-box to commit 60b504a1c74a, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a large codebase by counted code lines. Code represents 88.1% of all lines, comments represent 2.5%, and the repository averages 139 code lines per file. Go accounts for 97.0% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Go | 1,135 | 178,323 | 158,349 | 3,409 | 16,565 |
| BASH | 1 | 1,580 | 1,289 | 41 | 250 |
| Objective-C | 4 | 1,286 | 1,195 | 3 | 88 |
| Protocol Buffers | 5 | 1,120 | 949 | 3 | 168 |
| YAML | 1 | 323 | 312 | 2 | 9 |
| JSON | 2 | 298 | 298 | 0 | 0 |
| Makefile | 1 | 293 | 218 | 3 | 72 |
| Shell | 8 | 228 | 166 | 8 | 54 |
| Zsh | 1 | 212 | 146 | 36 | 30 |
| Fish | 1 | 235 | 140 | 49 | 46 |
| C Header | 4 | 137 | 112 | 6 | 19 |
| C | 2 | 104 | 91 | 0 | 13 |

Top language (Go 97.0%). Generated at 2026-09-06T12:39:27.754450563+00:00. Canonical report: https://octocounts.com/github/SagerNet/sing-box

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/SagerNet/sing-box/commit/60b504a1c74a33fe24872c8144c8f0b7d3d61b2a?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does SagerNet/sing-box have?

SagerNet/sing-box has 185,420 total lines, including 163,314 code lines, 4,556 comment lines, and 17,550 blank lines.

### How was the SagerNet/sing-box line count measured?

OctoCounts resolved the public GitHub repository to commit 60b504a1c74a, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for SagerNet/sing-box?

This OctoCounts report was generated from 60b504a1c74a33fe24872c8144c8f0b7d3d61b2a at commit 60b504a1c74a on 2026-09-06T12:39:27.754450563+00:00.

## Similar repository reports

- [go-vikunja/vikunja](https://octocounts.com/github/go-vikunja/vikunja) — Go, 162,740 code lines
- [evanw/esbuild](https://octocounts.com/github/evanw/esbuild) — Go, 168,648 code lines
- [trefeon/freebuff-proxy](https://octocounts.com/github/trefeon/freebuff-proxy) — Go, 156,543 code lines
- [redis/agent-filesystem](https://octocounts.com/github/redis/agent-filesystem) — Go, 170,387 code lines
- [NyaGram/NyaGramDesktop](https://octocounts.com/github/NyaGram/NyaGramDesktop) — Go, 154,041 code lines
- [MengMengCode/VoCat](https://octocounts.com/github/MengMengCode/VoCat) — Go, 151,008 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Rust vs Go](https://octocounts.com/compare/rust-vs-go)
- [Deno vs Node.js](https://octocounts.com/compare/deno-vs-node)
- [Kubernetes vs Terraform](https://octocounts.com/compare/kubernetes-vs-terraform)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
