{"id":49657025,"url":"https://github.com/compio-rs/compio-ktls","last_synced_at":"2026-05-06T10:42:02.467Z","repository":{"id":346067228,"uuid":"1188099375","full_name":"compio-rs/compio-ktls","owner":"compio-rs","description":"Kernel TLS (kTLS) support for Compio","archived":false,"fork":false,"pushed_at":"2026-04-26T20:19:58.000Z","size":135,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T20:26:33.141Z","etag":null,"topics":["async","compio","ktls","tls"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compio-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.Apache-2.0","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-21T16:07:36.000Z","updated_at":"2026-04-26T20:20:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/compio-rs/compio-ktls","commit_stats":null,"previous_names":["fantix/compio-ktls","compio-rs/compio-ktls"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/compio-rs/compio-ktls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compio-rs%2Fcompio-ktls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compio-rs%2Fcompio-ktls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compio-rs%2Fcompio-ktls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compio-rs%2Fcompio-ktls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compio-rs","download_url":"https://codeload.github.com/compio-rs/compio-ktls/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compio-rs%2Fcompio-ktls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32689889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["async","compio","ktls","tls"],"created_at":"2026-05-06T10:42:00.543Z","updated_at":"2026-05-06T10:42:02.459Z","avatar_url":"https://github.com/compio-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# compio-ktls\n\nKernel TLS (kTLS) support for [Compio](https://github.com/compio-rs/compio).\n\n[![中文](https://img.shields.io/badge/Zh-中文-informational?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAFKADAAQAAAABAAAAEAAAAABHXVY9AAABc0lEQVQ4EaWSOy8EURTHd+wDEY94JVtgg9BI1B6dQqHiE1CrRasT30DpC2hVQimiFkJWVsSj2U1EsmQH4/ff3CO3WDuDk/zmf8/jnntm7qRSMRZFUQ4WYSimNFmaRlsgq8F83K6WuALyva4mixbc+kfJcGqa7CqU4AjaocNpG5oHsx7qB3EqQRC8K4g/gazAMbFTBdbgL1Zh0w2EbnMVHdMrd4LZNotZmIZJKMAemC2z0MS6oDlYhzOQ6c3yGR5Fec4OGPvEHCmn3np+kfyT51+QH8afcbFLTfjgFVS9tZrpwC4v1k9M39w3NTQrBxSM4127SAmNoBt0Ma3QyHRwGUIYdQUh0+c0wZsLPKKH8AwvoHgNlmABZLtwBdqnP0DD9IEG2If6N0oz5SbYSfW4PYhvgNmUxU1JZGEEAsUyjPmB7lhBA1Xe7NMWpuzXa39fnC7lN1b/mZttSNLQv9XXZs2US9LwzjU5R+/d+n/CBx9I2uELeXrRajeDqHwAAAAASUVORK5CYII=)](README.zh.md)\n[![CI](https://img.shields.io/github/actions/workflow/status/compio-rs/compio-ktls/ci.yml?label=CI\u0026logo=github)](https://github.com/compio-rs/compio-ktls/actions/workflows/ci.yml)\n[![license](https://img.shields.io/badge/license-Apache--2.0-success?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGqSURBVHgBrVbtcYMwDFVy/V82KCMwAp2g2aDtJGSDZoPQDegE0AmSDUwngA1UKYggHBtwyLvTgcF66ONZCcAdQMSMrCEzZHGILzvHZJFaf+AYxxCyTDlmQm5k3cj1EEJ4Qjf085322UI4KrJrCTabTXFDKKmU8uUjWSLvfy2yWixWWbDf16g58tBGadWQsUc/GuZ6Es4YbpGK6ehewI9iLkIMiO7Up7z11AoctcOJyF6pObWOMMJBVy6wmI0rapv9EiGxt3T5nIiOETvePaN99LCTTCL3B0/tfALvYbCTWww4pFJ6HHe4HCXLppVgU0dKP2RvsBwJzESwQ3czfDj0dXRpzODydFkhe+a6nBTqMhPybabCrybSzaUcrVgtSrl2miPhbufqqyn6tWnQN6lxPIGbgHSNi4+FHal1tCDdHt+uh1zDs2ez/VtRy94/soJqVoEPOD4hjdTPrlkKIVANOaJ/VBVzPP2AZelwc2pJ7d2xl2WRw1JC5VQJKc/Ivkm8zkdaWwJ0zLdQbBVZBMOgWE8I3bSpYCU0YUI1OsNK3PPPYZ5QDnoND8A/4kV4DUnNfc8AAAAASUVORK5CYII=)](https://www.apache.org/licenses/LICENSE-2.0)\n[![license](https://img.shields.io/badge/license-MulanPSL--2.0-success?logo=opensourceinitiative\u0026logoColor=white)](https://license.coscl.org.cn/MulanPSL2/)\n\n## Overview\n\n- Built on top of [ktls-core](https://github.com/hanyu-dev/ktls)\n- Not tied to any specific Compio runtime implementation\n- Pluggable TLS implementations (currently supports Rustls)\n- Currently supports TLS 1.3 only\n- Supports NewSessionTicket, KeyUpdate, and Alert message handling\n- Supports splitting `KtlsStream` into read/write halves for concurrent I/O\n\n## Features\n\n- `rustls` (default): Enable Rustls integration\n- `ring`: Use ring as the crypto backend\n- `sync`: Use thread-safe locks for the split read/write halves. By default, single-threaded\n  (unsync) locks are used. Enable this feature if you need to use the split halves across\n  threads.\n\n## Usage\n\n```rust\nuse compio_ktls::{KtlsConnector, KtlsAcceptor};\n\n// Client side\nlet connector = KtlsConnector::from(client_config);\nmatch connector.connect(\"example.com\", tcp_stream).await? {\n    Ok(stream) =\u003e {\n        // kTLS enabled successfully\n    }\n    Err(stream) =\u003e {\n        // kTLS unavailable, fallback to original stream\n    }\n}\n\n// Server side\nlet acceptor = KtlsAcceptor::from(server_config);\nmatch acceptor.accept(tcp_stream).await? {\n    Ok(stream) =\u003e {\n        // kTLS enabled successfully\n    }\n    Err(stream) =\u003e {\n        // kTLS unavailable, fallback to original stream\n    }\n}\n```\n\nYou can split a `KtlsStream` into independent read and write halves for concurrent I/O:\n\n```rust\nuse compio::io::util::Splittable;\n\nlet (mut reader, mut writer) = stream.split();\n// Now reader and writer can be used concurrently\n```\n\n## Requirements\n\nRequires Linux kernel with kTLS support, version 6.6 LTS or newer is recommended.\n\nCheck if the kTLS module is loaded:\n\n```bash\nlsmod | grep tls\n```\n\nIf not loaded, you can manually load it:\n\n```bash\nsudo modprobe tls\n```\n\nAlso requires Rustls with `enable_secret_extraction` enabled:\n\n```rust\nuse std::sync::Arc;\nuse rustls::ClientConfig;\n\nlet mut config = ClientConfig::builder()\n    .dangerous()\n    .with_custom_certificate_verifier(/* ... */)\n    .with_no_client_auth();\n\nconfig.enable_secret_extraction = true;\n\nlet config = Arc::new(config);\n```\n\n## License\n\nLicensed under either of:\n\n- Apache License, Version 2.0\n- Mulan Permissive Software License, Version 2\n\n`SPDX-License-Identifier: Apache-2.0 OR MulanPSL-2.0`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompio-rs%2Fcompio-ktls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompio-rs%2Fcompio-ktls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompio-rs%2Fcompio-ktls/lists"}