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.
As of 2026-11-16 (commit 3cc357d1bd40), SagerNet/sing-box contains 193,509 total lines: 170,854 code, 4,491 comments, 18,164 blank, across 1,220 files in 16 languages (top language: Go 97.2%). Canonical public options (tests, docs and generated files excluded). Counted with tokei via OctoCounts.
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.
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 | 1184 | 186663 | 166141 | 3344 | 17178 |
| BASH | 1 | 1580 | 1289 | 41 | 250 |
| Objective-C | 4 | 1294 | 1203 | 3 | 88 |
| Protocol Buffers | 5 | 1120 | 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 |
Top language: Go 97.2%. Generated on .
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.
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.
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.
This OctoCounts report was generated from testing at commit 3cc357d1bd40 on November 16, 2026.
Play the growth animation for SagerNet/sing-box on this page — 170,854 code lines across 16 languages, counted by tokei.