More *.md tweaks
This commit is contained in:
19
README.md
19
README.md
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<a href="https://www.zerotier.com"><img src="https://github.com/zerotier/ZeroTierOne/raw/master/artwork/AppIcon_87x87.png" align="left" hspace="20" vspace="6"></a>
|
<a href="https://www.zerotier.com"><img src="https://github.com/zerotier/ZeroTierOne/raw/master/artwork/AppIcon_87x87.png" align="left" hspace="20" vspace="6"></a>
|
||||||
|
|
||||||
**ZeroTier** makes it easy to securely connect devices, servers, cloud VMs, containers, and apps everywhere and manage them at scale. Now, with **libzt** you can bake this ability directly into your app or service using your preferred language or framework. We provide a BSD socket-like API to make the integration simple.
|
**ZeroTier** makes it easy to securely connect devices, servers, cloud VMs, containers, and apps everywhere and manage them at scale. Now, with **libzt** you can bake this ability directly into your app or service using your preferred language or framework. We provide a BSD socket-like API to make the integration simple and there's no longer any need for system-wide virtual interfaces. This connection is exclusive to your app.
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@@ -19,9 +19,15 @@ Pre-Built Binaries Here: [zerotier.com/download.shtml](https://zerotier.com/down
|
|||||||
```
|
```
|
||||||
#include "libzt.h"
|
#include "libzt.h"
|
||||||
|
|
||||||
char *str = "welcome to the machine";
|
char *str = "welcome to the machine"; // test msg
|
||||||
char *nwid = "c7cd7c9e1b0f52a2"; // network to join
|
char *nwid = "c7cd7c9e1b0f52a2"; // network to join
|
||||||
char *pasth = "zt1" // path where this node's keys and configs will be stored
|
char *pasth = "zt1"; // path where this node's keys and configs will be stored
|
||||||
|
char *ip = "10.8.8.42"; // resource on ZeroTier network
|
||||||
|
|
||||||
|
struct sockaddr_in addr;
|
||||||
|
addr.sin_family = AF_INET;
|
||||||
|
addr.sin_addr.s_addr = inet_addr(ip);
|
||||||
|
addr.sin_port = hton(8080);
|
||||||
|
|
||||||
zts_simple_start(path, nwid);
|
zts_simple_start(path, nwid);
|
||||||
int fd = zts_socket(AF_INET, SOCK_STREAM, 0);
|
int fd = zts_socket(AF_INET, SOCK_STREAM, 0);
|
||||||
@@ -30,14 +36,13 @@ zts_write(fd, str, strlen(str));
|
|||||||
zts_close(fd);
|
zts_close(fd);
|
||||||
```
|
```
|
||||||
|
|
||||||
Bindings for various [LANGUAGES](examples)
|
Bindings for various [languages](examples)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
### Building (linux, macos, bsd, win, ios)
|
### Building (linux, macos, bsd, win, ios)
|
||||||
|
|
||||||
Complete instructions here [PLATFORMS](BUILDING.md)
|
All build targets will output to `build/`. Complete instructions [here](BUILDING.md).
|
||||||
All build targets will output to `build/`
|
|
||||||
|
|
||||||
- Static Library (linux, mac, win, bsd): `make static_lib`
|
- Static Library (linux, mac, win, bsd): `make static_lib`
|
||||||
- iOS App Framework: `make ios_app_framework`
|
- iOS App Framework: `make ios_app_framework`
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
## Testing via [selftest.cpp](test/selftest.cpp)
|
## Testing via [selftest.cpp](test/selftest.cpp)
|
||||||
|
|
||||||
### Enabling debug output
|
### Enabling debug output
|
||||||
- `SDK_DEBUG=1` - For debugging libzt
|
|
||||||
- `ZT_DEBUG=1` - For debugging the ZeroTier core protocol
|
- `SDK_DEBUG=1`: For debugging libzt
|
||||||
|
- `ZT_DEBUG=1`: For debugging the ZeroTier core protocol
|
||||||
|
|
||||||
After building the static library, you can run:
|
After building the static library, you can run:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
Language bindings
|
Language bindings
|
||||||
|
|
||||||
### Using Language Bindings
|
|
||||||
- `SDK_LANG_JNI=1`: Enable JNI bindings for Java (produces a shared library)
|
- `SDK_LANG_JNI=1`: Enable JNI bindings for Java (produces a shared library)
|
||||||
- `SDK_LANG_CSHARP=1`
|
- `SDK_LANG_CSHARP=1`
|
||||||
- `SDK_LANG_PYTHON=1`
|
- `SDK_LANG_PYTHON=1`
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
ZeroTier SDK API
|
libzt API
|
||||||
======
|
======
|
||||||
|
|
||||||
This is the externally facing C++ API for the SDK. It provides a platform-agnostic interface to the ZeroTier network virtualization service.
|
This is the C++ API for libzt. It provides a platform-agnostic interface to the ZeroTier network virtualization service. All other [language bindings](../examples) are written in terms of this.
|
||||||
|
|||||||
Reference in New Issue
Block a user