{"id":20677270,"url":"https://github.com/operatorfoundation/canarylibrary","last_synced_at":"2026-06-08T07:34:31.158Z","repository":{"id":49585433,"uuid":"417669080","full_name":"OperatorFoundation/CanaryLibrary","owner":"OperatorFoundation","description":"A tool for testing transport connections and gathering the packets for analysis","archived":false,"fork":false,"pushed_at":"2024-06-14T15:41:29.000Z","size":137,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-19T15:58:14.903Z","etag":null,"topics":["swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OperatorFoundation.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,"publiccode":null,"codemeta":null}},"created_at":"2021-10-16T00:01:07.000Z","updated_at":"2025-10-28T01:36:23.000Z","dependencies_parsed_at":"2024-05-31T21:56:33.454Z","dependency_job_id":"5e6b4c3f-9e73-472a-979a-393db4c3234d","html_url":"https://github.com/OperatorFoundation/CanaryLibrary","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/OperatorFoundation/CanaryLibrary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OperatorFoundation%2FCanaryLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OperatorFoundation%2FCanaryLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OperatorFoundation%2FCanaryLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OperatorFoundation%2FCanaryLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OperatorFoundation","download_url":"https://codeload.github.com/OperatorFoundation/CanaryLibrary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OperatorFoundation%2FCanaryLibrary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34053435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["swift"],"created_at":"2024-11-16T21:15:00.917Z","updated_at":"2026-06-08T07:34:31.127Z","avatar_url":"https://github.com/OperatorFoundation.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CanaryLibrary\n\nThe core library that powers CanaryDesktop, CanaryDesktopLegacy, and CanaryLinux.\n\nCanary is a tool for testing transport connections and gathering the packets for analysis. \n\nCanary will run a series of transport tests based on the configs that you provide. It is possible to test each transport on a different transport server based on what host information is provided in the transport config files. \n\nCurrently only [Shadow](https://github.com/OperatorFoundation/ShadowSwift.git) tests are supported. Replicant support is underway, and will be capable of mimicking other transports when it is complete.\n\n## Adding CanaryLibrary to your project\n\n- Canary uses [SwiftPackageManager](https://github.com/apple/swift-package-manager.git).\n- Canary requires that you also include the swift Logging library in your dependencies.\n\n```\nlet package = Package(\n  name: \"MyApp\",\n    platforms: [.macOS(.v11)],\n    products: [\n        .executable(\n            name: \"MyApp\",\n            targets: [\"MyApp\"])],\n    dependencies: [\n        .package(url: \"https://github.com/OperatorFoundation/Canary.git\", branch: \"main\"),\n        .package(url: \"https://github.com/apple/swift-log.git\", from: \"1.4.2\")],\n    targets: [\n        .executableTarget(\n            name: \"MyApp\",\n            dependencies: [\n                           \"Canary\",\n                           .product(name: \"Logging\", package: \"swift-log\")]),\n        .testTarget(\n            name: \"MyAppTests\",\n            dependencies: [\"MyApp\"])],\n    swiftLanguageVersions: [.v5])\n```\n\n## Using Canary\n\nThe Canary library provides a very simple API:\n\n### Create an instance of the Canary class:\nThe Canary initializer takes the following Arguments:\n  - **configPath: String** \u003e The path to the directory that contains the transport config files.\n  - *SavePath: String? \u003e Optional (default: nil), the path where the test results should be saved.*\n  - **logger: Logger** \u003e An instance of a Swift Logger\n  - *timesToRun: \u003e Optional (default: 1), the number of times you would like the tests to run.*\n  - *interface: String? \u003e Optional, the network interface name (Canary will try to guess the correct interface for you if none is provided).* \n  - *debugPrints: Bool \u003e Optional (default: false), indicates whether or not to show debug prints.*\n  - *runWebTests: Bool \u003e Optional (default: false), this is an experimental mode that will also test a few websites that are sometimes known to be blocked*\n\nOnly two of teh parameters are required and do not offer a default value. Quick setup:\n\n`let canary = Canary(configPath: configDirectoryPath, logger: logger)`\n\nOnce you have a Canary instance you simply have to call runTest():\n\n`canary.runTest()`\n\n### Additional Notes:\n- Transport configs should include their transport server IP and port, and should include the transport name in the name of the file.\n- You should run Canary on the same platform it was compiled on\n- You must run Canary with sudo in order for it to capture any data\n- To run Canary with default settings simply provide the config directory and a Logger to the initializer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperatorfoundation%2Fcanarylibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foperatorfoundation%2Fcanarylibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foperatorfoundation%2Fcanarylibrary/lists"}