# SagerNet/sing-box SLOC report

> SagerNet/sing-box: 170,854 code lines at commit 3cc357d1bd40, counted with tokei-15.0.0 on 2026-11-16. Saved result b314394b0c218444a7bf0879bcd9cd6f35835028e0c090347ac80504925f5e5e.

SagerNet/sing-box has 170,854 source lines of code out of 193,509 total lines across 1,220 files, counted with tokei from the testing ref at commit 3cc357d1bd40 on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving SagerNet/sing-box to commit 3cc357d1bd40, downloading the repository source archive, and counting files selected by the effective rules 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; an exact reproduction needs the same commit, engine version, and effective counting rules.

## Counting rules and retention

SagerNet/sing-box: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

Saved reports remain subject to cache cleanup and replacement. Export the JSON or text for durable citation; live repository URLs can change.

## Repository size insights

This is a large codebase by counted code lines. Code represents 88.3% of all lines, comments represent 2.3%, and the repository averages 140 code lines per file. Go accounts for 97.2% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Go | 1,184 | 186,663 | 166,141 | 3,344 | 17,178 |
| BASH | 1 | 1,580 | 1,289 | 41 | 250 |
| Objective-C | 4 | 1,294 | 1,203 | 3 | 88 |
| Protocol Buffers | 5 | 1,120 | 949 | 3 | 168 |
| YAML | 1 | 327 | 316 | 2 | 9 |
| Makefile | 1 | 296 | 220 | 3 | 73 |
| Shell | 8 | 228 | 166 | 8 | 54 |
| Zsh | 1 | 212 | 146 | 36 | 30 |
| Fish | 1 | 235 | 140 | 49 | 46 |
| C Header | 4 | 141 | 116 | 6 | 19 |
| C | 2 | 104 | 91 | 0 | 13 |
| JSON | 1 | 41 | 41 | 0 | 0 |
| Dockerfile | 1 | 26 | 26 | 0 | 0 |
| XML | 1 | 10 | 10 | 0 | 0 |
| Markdown | 4 | 41 | 0 | 28 | 13 |
| Plain Text | 1 | 1,191 | 0 | 968 | 223 |

Top language: Go 97.2%. Generated on November 16, 2026. Canonical report: https://octocounts.com/github/SagerNet/sing-box/commit/3cc357d1bd40a104cf4b2207e85ea8f3fd64c207?reportId=b314394b0c218444a7bf0879bcd9cd6f35835028e0c090347ac80504925f5e5e&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

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

## Report FAQ

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

SagerNet/sing-box has 170,854 lines of code, plus 4,491 comment lines and 18,164 blank lines, for 193,509 total lines at commit 3cc357d1bd40 on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

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

OctoCounts resolved the public GitHub repository to commit 3cc357d1bd40, 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 testing at commit 3cc357d1bd40 on November 16, 2026.

## Similar repository reports

- [kubernetes-sigs/kustomize](https://octocounts.com/github/kubernetes-sigs/kustomize) — Go, 169,905 code lines
- [XTLS/Xray-core](https://octocounts.com/github/XTLS/Xray-core) — Go, 169,826 code lines
- [evanw/esbuild](https://octocounts.com/github/evanw/esbuild) — Go, 171,984 code lines
- [redis/agent-filesystem](https://octocounts.com/github/redis/agent-filesystem) — Go, 174,494 code lines
- [Elflare/elbot](https://octocounts.com/github/Elflare/elbot) — Go, 174,528 code lines
- [trefeon/freebucks-proxy](https://octocounts.com/github/trefeon/freebucks-proxy) — Go, 175,392 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)
- [How to count lines of code in a GitHub repository](https://octocounts.com/docs/count-lines-of-code-github)
- [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)
- [All OctoCounts guides](https://octocounts.com/docs)
