{"id":18653854,"url":"https://github.com/sagernet/cronet-go","last_synced_at":"2026-03-03T12:01:58.888Z","repository":{"id":37427715,"uuid":"488214397","full_name":"SagerNet/cronet-go","owner":"SagerNet","description":"The Chromium network stack library for Go","archived":false,"fork":false,"pushed_at":"2023-12-18T22:42:08.000Z","size":112,"stargazers_count":69,"open_issues_count":10,"forks_count":18,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-21T08:27:11.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SagerNet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-05-03T13:08:31.000Z","updated_at":"2025-05-17T07:26:14.000Z","dependencies_parsed_at":"2024-01-30T02:13:15.370Z","dependency_job_id":null,"html_url":"https://github.com/SagerNet/cronet-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SagerNet/cronet-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SagerNet%2Fcronet-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SagerNet%2Fcronet-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SagerNet%2Fcronet-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SagerNet%2Fcronet-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SagerNet","download_url":"https://codeload.github.com/SagerNet/cronet-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SagerNet%2Fcronet-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262056460,"owners_count":23251677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T07:13:21.146Z","updated_at":"2026-03-03T12:01:58.878Z","avatar_url":"https://github.com/SagerNet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cronet-go\n\n[![Reference](https://pkg.go.dev/badge/github.com/sagernet/cronet-go.svg)](https://pkg.go.dev/github.com/sagernet/cronet-go)\n\nGo bindings for [naiveproxy](https://github.com/klzgrad/naiveproxy).\n\n## Supported Platforms\n\n| Target        | OS      | CPU   |\n|---------------|---------|-------|\n| android/386   | android | x86   |\n| android/amd64 | android | x64   |\n| android/arm   | android | arm   |\n| android/arm64 | android | arm64 |\n| darwin/amd64  | mac     | x64   |\n| darwin/arm64  | mac     | arm64 |\n| ios/arm64     | ios     | arm64 |\n| ios/amd64     | ios     | amd64 |\n| linux/386     | linux   | x86   |\n| linux/amd64   | linux   | x64   |\n| linux/arm     | linux   | arm   |\n| linux/arm64   | linux   | arm64   |\n| linux/loong64 | linux   | loong64 |\n| windows/amd64 | win     | x64     |\n| windows/arm64 | win     | arm64 |\n\n## System Requirements\n\n| Platform      | Minimum Version |\n|---------------|-----------------|\n| macOS         | 12.0 (Monterey) |\n| iOS/tvOS      | 15.0            |\n| Windows       | 10              |\n| Android       | 5.0 (API 21)    |\n| Linux (glibc)       | glibc 2.31 (loong64: 2.36) |\n| Linux (musl)        | any (loong64: 1.2.5)       |\n\n## Downstream Build Requirements\n\n| Platform                             | Requirements                    | Go Build Flags                    |\n|--------------------------------------|---------------------------------|-----------------------------------|\n| Linux (glibc)                        | Chromium toolchain              | -                                 |\n| Linux (musl)                         | Chromium toolchain              | `-tags with_musl`                 |\n| macOS / iOS                          | macOS Xcode                     | -                                 |\n| iOS simulator/ tvOS / tvOS simulator | macOS Xcode + SagerNet/gomobile | -                                 |\n| Windows                              | -                               | `CGO_ENABLED=0 -tags with_purego` |\n| Android                              | Android NDK                     | -                                 |\n\n## Linux Build instructions\n\n```bash\ngit clone --recursive --depth=1 https://github.com/sagernet/cronet-go.git\ncd cronet-go\ngo run ./cmd/build-naive --target=linux/amd64 download-toolchain\n#go run ./cmd/build-naive --target=linux/amd64 --libc=musl download-toolchain\n\n# Outputs CC, CXX, and CGO_LDFLAGS=-fuse-ld=lld\nexport $(go run ./cmd/build-naive --target=linux/amd64 env)\n#export $(go run ./cmd/build-naive --target=linux/amd64 --libc=musl env)\n\ncd /path/to/your/project\ngo build\n# go build -tags with_musl\n```\n\n### Directories to cache\n\n```yaml\n- cronet-go/naiveproxy/src/third_party/llvm-build/\n- cronet-go/naiveproxy/src/gn/out/\n- cronet-go/naiveproxy/src/chrome/build/pgo_profiles/\n- cronet-go/naiveproxy/src/out/sysroot-build/\n```\n\n## Windows / purego Build Instructions\n\nFor Windows or pure Go builds (no CGO), you need to distribute the dynamic library alongside your binary.\n\n### Download Library\n\nDownload `libcronet.dll` (Windows) or `libcronet.so` (Linux) from [GitHub Releases](https://github.com/sagernet/cronet-go/releases).\n\n### Build with purego\n\n```bash\n# Windows (purego is required)\nCGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -tags with_purego -o myapp.exe\n\n# Linux with purego (optional, for dynamic linking)\nCGO_ENABLED=0 go build -tags with_purego -o myapp\n```\n\n### Distribution\n\nPlace the library file in the same directory as your executable:\n- Windows: `libcronet.dll`\n- Linux: `libcronet.so`\n\n### For Downstream Developers\n\nIf you need to programmatically extract libraries from Go module dependencies (e.g., for CI/CD pipelines):\n\n```bash\ngo run github.com/sagernet/cronet-go/cmd/build-naive@latest extract-lib --target windows/amd64 -n libcronet_amd64.dll\ngo run github.com/sagernet/cronet-go/cmd/build-naive@latest extract-lib --target linux/amd64 -n libcronet_amd64.so\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagernet%2Fcronet-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagernet%2Fcronet-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagernet%2Fcronet-go/lists"}