libzt

Library version of ZeroTier

  • 所有者: zerotier/libzt
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
    p2p
  • 喜欢:
    0
      比较:

Github星跟踪图

ZeroTier SDK (libzt, libztcore)

Library edition of ZeroTier


The ZeroTier SDK is composed of two libraries: libztcore which is the platform-agnostic network hypervisor, and libzt which is the network hypervisor paired with a userspace network stack. libzt is a superset of libztcore and is distinguished by the fact that it exposes a standard socket API and simple network control API. With these libraries the stack and virtual link are exclusive to your app and traffic is fully encrypted via the Salsa20 cipher. For a more in-depth discussion on the technical side of ZeroTier, check out our Manual


Downloads / Installation

Tarballs:

Homebrew

brew install libzt

Example

#include "ZeroTier.h"

void myZeroTierEventCallback(struct zts_callback_msg *msg)
{
    switch (msg->eventCode)
    {
        //
    }
}

int main()
{
    zts_start("yourConfig/key/path", &myZeroTierEventCallback, 9994);
    zts_join(0x0123456789abcdef);
    zts_socket(ZTS_AF_INET, ZTS_SOCK_STREAM, 0);
    zts_connect(fd, (const struct sockaddr *)&addr, sizeof(addr));
    zts_write(fd, "welcome to the machine", 22);
    zts_close(fd);
    zts_stop();
    return 0;
}

...

After you've created a virtual network and added its nwid to the sample code, run:

clang++ example.cpp -o example -lzt
./example

The complete API specification can be found here: API.md


Build from source

Build scripts use a combination of make, and cmake. To retrieve sources for all submodules, patch them, and build all targets (debug and release) for your host machine, issue the following:

make update
make patch
make all

All build targets can be seen by using make list.

Resultant libraries will be placed in lib, test and example programs will be placed in bin.


Commercial License

If you want a commercial license to use the ZeroTier SDK in your product contact us directly via contact@zerotier.com

主要指标

概览
名称与所有者zerotier/libzt
主编程语言C++
编程语言Shell (语言数: 13)
平台
许可证Other
所有者活动
创建于2016-07-18 22:40:55
推送于2024-11-07 22:06:48
最后一次提交
发布数40
最新版本名称1.8.10 (发布于 2022-06-01 15:36:48)
第一版名称0.2.0 (发布于 2017-06-06 15:01:54)
用户参与
星数219
关注者数15
派生数65
提交数1.4k
已启用问题?
问题数185
打开的问题数64
拉请求数74
打开的拉请求数5
关闭的拉请求数18
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?