Mozilla Public License 2.0

项目介绍

paullouisageneau/libjuice 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 Mozilla Public License 2.0 许可证,目前获得 635 个 Star、147 次 Fork。

仓库全名
paullouisageneau/libjuice
开源许可证
Mozilla Public License 2.0
Star 数
635
Fork 数
147
未关闭 Issue
21

README 摘要

libjuice - UDP Interactive Connectivity Establishment libjuice :lemon::sweatdrops: (JUICE is a UDP Interactive Connectivity Establishment library) allows to open bidirectionnal User Datagram Protocol (UDP) streams with Network Address Translator (NAT) traversal. The library is a simplified implementation of the Interactive Connectivity Establishment (ICE) protocol, client-side and server-side, written in C without…

完整内容见 GitHub 原始 README 或本页 。

常见问题

libjuice 用什么语言开发?

主要使用 C 编写,采用 Mozilla Public License 2.0 许可证,目前有 635 个 Star。

libjuice 可以免费商用吗?

仓库标注的许可证为 Mozilla Public License 2.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 libjuice 的源码?

可以直接克隆仓库:git clone https://github.com/paullouisageneau/libjuice.git,默认分支为 master;安装与运行步骤见仓库 README。

libjuice 最近还在维护吗?

仓库最近一次更新为 2 天前,当前有 21 个未关闭 Issue;Star 数为 635,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

JUICE is a UDP Interactive Connectivity Establishment library

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

C
CMake
Makefile

Release

README

libjuice - UDP Interactive Connectivity Establishment

License: MPL 2.0 Build and test Packaging status Latest packaged version Gitter Discord

libjuice :lemon::sweat_drops: (JUICE is a UDP Interactive Connectivity Establishment library) allows to open bidirectionnal User Datagram Protocol (UDP) streams with Network Address Translator (NAT) traversal.

The library is a simplified implementation of the Interactive Connectivity Establishment (ICE) protocol, client-side and server-side, written in C without dependencies for multiple platforms, including GNU/Linux, Android, FreeBSD, Apple macOS, iOS, and Microsoft Windows. The client supports only a single component over UDP per session in a standard single-gateway network topology, as this should be sufficient for the majority of use cases nowadays.

libjuice is licensed under MPL 2.0, see LICENSE.

libjuice is available on AUR and vcpkg. Bindings are available for Rust.

For a STUN/TURN server application based on libjuice, see Violet.

Compatibility

The library implements a simplified full ICE agent (RFC5245 then RFC8445) featuring:

  • STUN protocol (RFC5389 then RFC8489)
  • TURN relaying (RFC5766 then RFC8656)
  • TCP candidates (RFC6544)
  • ICE Consent freshness (RFC7675)
  • ICE Patiently Awaiting Connectivity (RFC 8863)
  • SDP-based interface (RFC8839)
  • IPv4 and IPv6 dual-stack support
  • Optional multiplexing on a single UDP port

The limitations compared to a fully-featured ICE agent are:

  • Only UDP is supported as transport protocol and other protocols are ignored.
  • Only one component is supported, which is sufficient for WebRTC Data Channels and multiplexed RTP+RTCP.
  • Only RFC8828 mode 2 is supported (default route + all local addresses).

It also implements a lightweight STUN/TURN server (RFC8489 and RFC8656). The server can be disabled at compile-time with the NO_SERVER flag.

Dependencies

None!

Optionally, Nettle can provide SHA1 and SHA256 algorithms instead of the internal implementation.

Building

Clone repository

$ git clone https://github.com/paullouisageneau/libjuice.git
$ cd libjuice

Build with CMake

The CMake library targets libjuice and libjuice-static respectively correspond to the shared and static libraries. The default target will build the library and tests. It exports the targets with namespace LibJuice::LibJuice and LibJuice::LibJuiceStatic to link the library from another CMake project.

POSIX-compliant operating systems (including Linux and Apple macOS)
$ cmake -B build
$ cd build
$ make -j2

The option USE_NETTLE allows to use the Nettle library instead of the internal implementation for HMAC-SHA1:

$ cmake -B build -DUSE_NETTLE=1
$ cd build
$ make -j2
Microsoft Windows with MinGW cross-compilation
$ cmake -B build -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-x86_64-w64-mingw32.cmake # replace with your toolchain file
$ cd build
$ make -j2
Microsoft Windows with Microsoft Visual C++
$ cmake -B build -G "NMake Makefiles"
$ cd build
$ nmake

Build directly with Make (Linux only)

$ make

The option USE_NETTLE allows to use the Nettle library instead of the internal implementation for HMAC-SHA1:

$ make USE_NETTLE=1

Example

See test/connectivity.c for a complete local connection example.

See test/server.c for a server example.

Contributing

See CONTRIBUTING.md for contribution guidelines.

评论

暂无评论