{"id":21664699,"url":"https://github.com/swift-libp2p/swift-libp2p-websocket","last_synced_at":"2026-02-14T01:31:35.966Z","repository":{"id":122482406,"uuid":"491715974","full_name":"swift-libp2p/swift-libp2p-websocket","owner":"swift-libp2p","description":"A WebSocket Transport Module for LibP2P Applications","archived":false,"fork":false,"pushed_at":"2025-11-17T00:15:51.000Z","size":115,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-17T02:16:40.653Z","etag":null,"topics":["libp2p","libp2p-transport","websocket"],"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/swift-libp2p.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-05-13T01:13:44.000Z","updated_at":"2025-11-17T00:14:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"b514f598-6c66-49d9-b72b-b2a1e7c71a46","html_url":"https://github.com/swift-libp2p/swift-libp2p-websocket","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/swift-libp2p/swift-libp2p-websocket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-libp2p%2Fswift-libp2p-websocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-libp2p%2Fswift-libp2p-websocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-libp2p%2Fswift-libp2p-websocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-libp2p%2Fswift-libp2p-websocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swift-libp2p","download_url":"https://codeload.github.com/swift-libp2p/swift-libp2p-websocket/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swift-libp2p%2Fswift-libp2p-websocket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29429351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"ssl_error","status_checked_at":"2026-02-13T22:20:49.838Z","response_time":78,"last_error":"SSL_read: 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":["libp2p","libp2p-transport","websocket"],"created_at":"2024-11-25T10:42:02.393Z","updated_at":"2026-02-14T01:31:35.958Z","avatar_url":"https://github.com/swift-libp2p.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibP2PWebSocket\n\n[![](https://img.shields.io/badge/made%20by-Breth-blue.svg?style=flat-square)](https://breth.app)\n[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Swift Package Manager compatible](https://img.shields.io/badge/SPM-compatible-blue.svg?style=flat-square)](https://github.com/apple/swift-package-manager)\n![Build \u0026 Test (macos and linux)](https://github.com/swift-libp2p/swift-libp2p-websocket/actions/workflows/build+test.yml/badge.svg)\n\n\u003e A WebSocket Transport module for libp2p\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Install](#install)\n- [Usage](#usage)\n  - [Example](#example)\n  - [API](#api)\n- [Contributing](#contributing)\n- [Credits](#credits)\n- [License](#license)\n\n## Overview\nThis repo adds support for WebSockets over HTTP1 for swift-libp2p applications. WebSockets are realtime full-duplex streams over tcp. This module doesn't support WebSocket Secure (WSS) connections. Instead it encrypts traffic using a libp2p security module such as [Noise](https://github.com/swift-libp2p/swift-libp2p-noise.git).\n\n\n## Install\n\nInclude the following dependency in your Package.swift file\n``` swift\nlet package = Package(\n    ...\n    dependencies: [\n        ...\n        .package(url: \"https://github.com/swift-libp2p/swift-libp2p-websocket.git\", .upToNextMinor(from: \"0.2.0\"))\n    ],\n        ...\n        .target(\n            ...\n            dependencies: [\n                ...\n                .product(name: \"LibP2PWebSocket\", package: \"swift-libp2p-websocket\"),\n            ]),\n    ...\n)\n```\n\n## Usage\n\n### Example \n``` swift\n\nimport LibP2PWebSocket\n\n/// Tell libp2p that it should listen for WS connections on the following ip:port...\napp.servers.use( .ws(host: \"127.0.0.1\", port: 10000) )\n/// Tell libp2p that it can dial peers using WebSockets `ws`\napp.transports.use( .ws )\n\n```\n\n### API\n``` swift\nNot Applicable\n```\n\n## Contributing\n\nContributions are welcomed! This code is very much a proof of concept. I can guarantee you there's a better / safer way to accomplish the same results. Any suggestions, improvements, or even just critiques, are welcome! \n\nLet's make this code better together! 🤝\n\n## Credits\n- [Swift NIO](https://github.com/apple/swift-nio.git)\n\n## License\n\n[MIT](LICENSE) © 2022 Breth Inc.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswift-libp2p%2Fswift-libp2p-websocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswift-libp2p%2Fswift-libp2p-websocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswift-libp2p%2Fswift-libp2p-websocket/lists"}