documentation/API update

This commit is contained in:
Joseph Henry
2016-07-14 08:40:40 -07:00
parent 1487ac304c
commit f805b0d285
25 changed files with 375 additions and 203 deletions

View File

@@ -7,7 +7,7 @@ Imagine a flat, encrypted, no-configuration LAN for all of the instances of your
This short tutorial will show you how to enable ZeroTier functionality for your Android app with little to no code modification. Check out our [ZeroTier SDK](https://www.zerotier.com/blog) page for more info on how the integration works and [Shim Techniques](https://www.zerotier.com/blog) for a discussion of shims available for your app/technology.
In this example we aim to set up a minimal [Android Studio](https://developer.android.com/studio/index.html) project which contains all of the components necessary to enable ZeroTier for your app. If you'd rather skip all of these steps and grab the code, look in the [sdk/android](https://github.com/zerotier/ZeroTierOne/tree/dev/netcon/Android) folder in the source tree. Otherwise, let's get started!
In this example we aim to set up a minimal [Android Studio](https://developer.android.com/studio/index.html) project which contains all of the components necessary to enable ZeroTier for your app. If you'd rather skip all of these steps and grab the code, look in the [sdk/android](https://github.com/zerotier/ZeroTierOne/tree/dev/sdk/integrations/android/example_app) folder in the source tree. Otherwise, let's get started!
*NOTE: For Android JNI libraries to build you'll need to install [Android Studio](https://developer.android.com/studio/index.html) and the [Android NDK](https://developer.android.com/ndk/index.html), and you'll need to tell our project where you put it by putting the path in [this file](Android/proj/local.properties), if you don't have these things installed and configured we will detect that and just skip those builds automatically.*
@@ -22,19 +22,22 @@ In this example we aim to set up a minimal [Android Studio](https://developer.an
- Create new package called `ZeroTierSDK` in your project and add a new file called `ZeroTierSDK.java` containing:
```
package ZeroTierSDK;
package ZeroTier;
public class ZeroTierSDK {
public native void startOneService();
public native void startOneService(String homeDir);
public native void joinNetwork(String nwid);
public native void leaveNetwork(String nwid);
public native boolean isRunning();
static { System.loadLibrary("ZeroTierOneJNI"); } // Loads JNI code
}
```
- And now, start the service:
- And now, start the service in your app with:
```
new Thread(new Runnable() {
public void run() {
ZeroTierSDK_Wrapper wrapper = new ZeroTierSDK_Wrapper();
ZeroTierSDK wrapper = new ZeroTierSDK();
wrapper.startOneService(); // Calls to JNI code
}
}).start();
@@ -55,7 +58,7 @@ new Thread(new Runnable() {
**Step 6: Join a network!**
- Simply call `zt_join_network("XXXXXXXXXXXXXXXX")`
- Simply call `wrapper.joinNetwork("XXXXXXXXXXXXXXXX")`

View File

@@ -1,7 +0,0 @@
Apple + ZeroTier SDK
====
Welcome!
***
## Platform-specific Integrations

View File

@@ -3,9 +3,20 @@ Testing
### Docker Unit Tests
Each unit test will temporarily copy all required ZeroTier binaries into its local directory, then build the `netcon_dockerfile` and `monitor_dockerfile`. Once built, each container will be run and perform tests and monitoring specified in `netcon_entrypoint.sh` and `monitor_entrypoint.sh`
**Running all docker tests**
Build the docker images:
`make docker_images`
Results will be written to the `tests/docker-test/_results/` directory which is a common shared volume between all containers involved in the test and will be a combination of raw and formatted dumps to files whose names reflect the test performed. In the event of failure, `FAIL.` will be prepended to the result file's name (e.g. `FAIL.my_application_1.0.2.x86_64`), likewise in the event of success, `OK.` will be prepended.
Run the docker tests from the docker containers
`make docker_test`
Check the results of the completed tests:
`make docker_test_check`
***
Each unit test will temporarily copy all required ZeroTier binaries into its local directory, then build the `sdk_dockerfile` and `monitor_dockerfile`. Once built, each container will be run and perform tests and monitoring specified in `sdk_entrypoint.sh` and `monitor_entrypoint.sh`
Results will be written to the `tests/docker/_results/` directory which is a common shared volume between all containers involved in the test and will be a combination of raw and formatted dumps to files whose names reflect the test performed. In the event of failure, `FAIL.` will be prepended to the result file's name (e.g. `FAIL.my_application_1.0.2.x86_64`), likewise in the event of success, `OK.` will be prepended.
To run unit tests:
@@ -13,42 +24,42 @@ To run unit tests:
2) Set up your own network at [https://my.zerotier.com/](https://my.zerotier.com/). For our example we'll just use the Earth network (8056c2e21c000001). Use its network id as follows:
3) Generate two pairs of identity keys. Each public/private pair will be used by the *netcon* and *monitor* containers:
3) Generate two pairs of identity keys. Each public/private pair will be used by the *sdk* and *monitor* containers:
mkdir -p /tmp/netcon_first
cp -f ./netcon/liblwip.so /tmp/netcon_first
./zerotier-netcon-service -d -p8100 /tmp/netcon_first
while [ ! -f /tmp/netcon_first/identity.secret ]; do
mkdir -p /tmp/sdk_first
cp -f ./sdk/liblwip.so /tmp/sdk_first
./zerotier-sdk-service -d -p8100 /tmp/sdk_first
while [ ! -f /tmp/sdk_first/identity.secret ]; do
sleep 0.1
done
./zerotier-cli -D/tmp/netcon_first join 8056c2e21c000001
kill `cat /tmp/netcon_first/zerotier-one.pid`
./zerotier-cli -D/tmp/sdk_first join 8056c2e21c000001
kill `cat /tmp/sdk_first/zerotier-one.pid`
mkdir -p /tmp/netcon_second
cp -f ./netcon/liblwip.so /tmp/netcon_second
./zerotier-netcon-service -d -p8101 /tmp/netcon_second
while [ ! -f /tmp/netcon_second/identity.secret ]; do
mkdir -p /tmp/sdk_second
cp -f ./sdk/liblwip.so /tmp/sdk_second
./zerotier-sdk-service -d -p8101 /tmp/sdk_second
while [ ! -f /tmp/sdk_second/identity.secret ]; do
sleep 0.1
done
./zerotier-cli -D/tmp/netcon_second join 8056c2e21c000001
kill `cat /tmp/netcon_second/zerotier-one.pid`
./zerotier-cli -D/tmp/sdk_second join 8056c2e21c000001
kill `cat /tmp/sdk_second/zerotier-one.pid`
4) Copy the identity files to your *docker-test* directory. Names will be altered during copy step so the dockerfiles know which identities to use for each image/container:
4) Copy the identity files to *tests/docker*. Names will be altered during copy step so the dockerfiles know which identities to use for each image/container:
cp /tmp/netcon_first/identity.public ./netcon/docker-test/netcon_identity.public
cp /tmp/netcon_first/identity.secret ./netcon/docker-test/netcon_identity.secret
cp /tmp/sdk_first/identity.public ./sdk/tests/docker/sdk_identity.public
cp /tmp/sdk_first/identity.secret ./sdk/tests/docker/sdk_identity.secret
cp /tmp/netcon_second/identity.public ./netcon/docker-test/monitor_identity.public
cp /tmp/netcon_second/identity.secret ./netcon/docker-test/monitor_identity.secret
cp /tmp/sdk_second/identity.public ./sdk/tests/docker/monitor_identity.public
cp /tmp/sdk_second/identity.secret ./sdk/tests/docker/monitor_identity.secret
5) Place a blank network config file in the `netcon/docker-test` directory (e.g. "8056c2e21c000001.conf")
5) Place a blank network config file in the `tests/docker` directory (e.g. "8056c2e21c000001.conf")
- This will be used to inform test-specific scripts what network to use for testing
After you've created your network and placed its blank config file in `tests/docker-test` run the following to perform unit tests for httpd:
After you've created your network and placed its blank config file in `tests/docker` run the following to perform unit tests for httpd:
./build.sh httpd
./test.sh httpd
It's useful to note that the keyword *httpd* in this example is merely a substring for a test name, this means that if we replaced it with *x86_64* or *fc23*, it would run all unit tests for *x86_64* systems or *Fedora 23* respectively.
It's useful to note that the keyword *httpd* in this example is merely a substring for a test name, this means that if we replaced it with *x86_64*, *fc23*, or *nginx*, it would run all unit tests for *x86_64*, *Fedora 23*, or *nginx* respectively.

View File

@@ -29,8 +29,8 @@ RUN yum -y install redis-3.0.4-1.fc23.x86_64
RUN yum clean all
# Add ZT files
RUN mkdir -p /var/lib/zerotier-one/networks.d
ADD netcon_identity.public /var/lib/zerotier-one/identity.public
ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret
ADD sdk_identity.public /var/lib/zerotier-one/identity.public
ADD sdk_identity.secret /var/lib/zerotier-one/identity.secret
ADD *.conf /var/lib/zerotier-one/networks.d/
ADD *.conf /
ADD *.name /
@@ -42,12 +42,12 @@ ADD libztintercept.so /
RUN cp libztintercept.so lib/libztintercept.so
RUN ln -sf /lib/libztintercept.so /lib/libztintercept
ADD zerotier-cli /
Add zerotier-netcon-service /
Add zerotier-sdk-service /
# Install test scripts
ADD netcon_entrypoint.sh /netcon_entrypoint.sh
RUN chmod -v +x /netcon_entrypoint.sh
ADD sdk_entrypoint.sh /sdk_entrypoint.sh
RUN chmod -v +x /sdk_entrypoint.sh
# Start ZeroTier-One
CMD ["./netcon_entrypoint.sh"]
CMD ["./sdk_entrypoint.sh"]
```
**Step 3: Start container**
@@ -72,32 +72,11 @@ If you'd like to know the IP address your service can be reached at on this part
`zerotier-cli -D/var/lib/zerotier-one/nc_XXXXXXXXXXXXXXXX listnetworks`
## Tests
For info on testing the SDK, take a look at [docs/docker_linux_testing.md](docs/docker_linux_testing.md)
## Installing in a Docker container (or any other container engine)
If it's not immediately obvious, installation into a Docker container is easy. Just install `zerotier-sdk-service`, `libztintercept.so`, and `liblwip.so` into the container at an appropriate locations. We suggest putting it all in `/var/lib/zerotier-one` since this is the default ZeroTier home and will eliminate the need to supply a path to any of ZeroTier's services or utilities. Then, in your Docker container entry point script launch the service with *-d* to run it in the background, set the appropriate environment variables as described above, and launch your container's main application.
@@ -109,11 +88,11 @@ The only bit of complexity is configuring which virtual network to join. ZeroTie
Replace 8056c2e21c000001 with the network ID of the network you want your container to automatically join. It's also a good idea in your container's entry point script to add a small loop to wait until the container's instance of ZeroTier generates an identity and comes online. This could be something like:
/var/lib/zerotier-one/zerotier-netcon-service -d
/var/lib/zerotier-one/zerotier-sdk-service -d
while [ ! -f /var/lib/zerotier-one/identity.secret ]; do
sleep 0.1
done
# zerotier-netcon-service is now running and has generated an identity
# zerotier-sdk-service is now running and has generated an identity
(Be sure you don't bundle the identity into the container, otherwise every container will try to be the same device and they will "fight" over the device's address.)

View File

@@ -7,56 +7,57 @@ Imagine a flat, encrypted, no-configuration LAN for all of the instances of your
This short tutorial will show you how to enable ZeroTier functionality for your iOS app with little to no code modification. Check out our [ZeroTier SDK](https://www.zerotier.com/blog) page for more info on how the integration works and [Shim Techniques](shims_zt_sdk.md) for a discussion of shims available for your app/technology.
In this example we aim to set up a minimal XCode project which contains all of the components necessary to enable ZeroTier for your app. If you'd rather skip all of these steps and grab the code, look in the [sdk/iOS](https://github.com/zerotier/ZeroTierSDK/tree/dev/sdk/iOS) folder of the source tree. Otherwise, let's get started!
In this example we aim to set up a minimal XCode project which contains all of the components necessary to enable ZeroTier for your app. If you'd rather skip all of these steps and grab the project code, look in the [sdk/iOS](https://github.com/zerotier/ZeroTierSDK/tree/dev/sdk/integrations/apple) folder of the source tree. Otherwise, let's get started!
**Step 1: Add ZeroTier source and Netcon-iOS XCode project to yours**
- Place a copy of the ZeroTierOne source in a folder at the same level as your project
- Add `ZeroTierSDK/src/tests/iOS/Netcon-iOS.xcodeproj` to your project
***
**Step 1: Build iOS framework**
**Step 2: Add ZeroTier binaries to your app**
- `make ios_app_framework`
- This will output to `build/ios_app_framework/Release-iphoneos/ZeroTierSDK_iOS.framework`
**Step 2: Integrate SDK into project**
- Add the resultant framework package to your project
- Add `zerotiersdk/src` directory to `Build Settings -> Header Search Paths`
- Add `build/ios_app_framework/Release-iphoneos/` to *Build Settings -> Framework Search Paths*
- Add `ZeroTierSDK.frameworkiOS` to *General->Embedded Binaries*
- Add `libServiceSetup.a` and `ZeroTierSDK.framework` to *Build Phases->Link Binary With Libraries*
- Add `src/SDK_XcodeWrapper.cpp` and `src/SDK_XcodeWrapper.hpp` to your project:
- Add contents of `src/SDK_Apple-Bridging-Header.h` to your projects bridging header.
**Step 3: Configure your project**
- Add `$(SRCROOT)/../ZeroTierOne/src` to *Build Settings->Header Search Paths* for your project
- Add `-D__IOS__` to *Build Settings->Other C Flags*
- Add `zerotiersdk/tests/iOS/Netcon-iOS/NetconWrapper.cpp` and `zerotiersdk/tests/iOS/Netcon-iOS/NetconWrapper.hpp` to your project:
- Add contents of `ZeroTierOne/netcon/tests/iOS/Netcon-iOS/SDK-iOS-Bridging-Header.h` to your projects bridging header.
**Step 3: Start the ZeroTier service**
*Note: You should have been prompted to create a bridging header for your project, if you haven't make sure you do this and add the native function prototypes manually from the bridging header we provide.*
**Step 4: App Code Modifications**
After you've linked the two projects you need to find a place in your code to set up the ZeroTier service thread:
Now find a place in your code to set up the ZeroTier service thread:
```
var service_thread : NSThread!
func ztnc_start_service() {
func zt_start_service() {
let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)
start_service(path[0])
}
```
...and then start it. If you enabled the proxy service via `-DUSE_SOCKS_PROXY` it will start automatically and be reachable at `0.0.0.0:1337`:
and then start it:
```
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
self.service_thread = NSThread(target:self, selector:"ztnc_start_service", object:nil)
self.service_thread = NSThread(target:self, selector:"zt_start_service", object:nil)
self.service_thread.start()
});
```
**Step 5: Pick a shim for your app**
*NOTE: If you enabled the proxy service via `-DUSE_SOCKS_PROXY` it will start automatically and be reachable at `0.0.0.0:1337`*
**Step 4: Pick an API**
This integration allows for the following shim combinations:
- `Hook of BSD-like sockets`: Use BSD-like sockets as you normally would.
- `Proxy of NSStream`: Create NSStream. Configure stream for SOCKS5 Proxy. Use stream.
- `Changeling of BSD-like sockets`: Call `start_changeling()` and then use BSD-like sockets as you normally would.
- `Direct Call`: Consult [SDK-iOS-Bridging-Header.h](zerotiersdk/iOS/Netcon-iOS/SDK-iOS-Bridging-Header.h).
- `Direct Call`: Consult [src/SDK_Apple-Bridging-Header.h](src/SDK_Apple-Bridging-Header.h).
If functional interposition isn't available for the API or library you've chosen to use, ZeroTier offers a SOCKS5 proxy server which can allow connectivity to your virtual network as long as your client API supports the SOCKS5 protocol. This proxy service will run alongside the tap service and can be turned on by compiling with the `-DUSE_SOCKS_PROXY` flag in *Build Settings->Other C Flags*. By default, the proxy service is available at `0.0.0.0:1337`.
**Step 6: Join a network!**
**Step 5: Join a network!**
Simply call `zt_join_network("XXXXXXXXXXXXXXXX")`

View File

@@ -3,102 +3,90 @@ OSX + ZeroTier SDK
Welcome!
Imagine a flat, encrypted, no-configuration LAN for all of the instances of your OSX app.
Imagine a flat, encrypted, no-configuration LAN for all of the instances of your OSX app.
This short tutorial will show you how to enable ZeroTier functionality for your iOS app with little to no code modification. Check out our [ZeroTier SDK](https://www.zerotier.com/blog) page for more info on how the integration works and [Shim Techniques](https://www.zerotier.com/blog) for a discussion of shims available for your app/technology.
This short tutorial will show you how to enable ZeroTier functionality for your OSX app with little to no code modification. Check out our [ZeroTier SDK](https://www.zerotier.com/blog) page for more info on how the integration works and [Shim Techniques](shims_zt_sdk.md) for a discussion of shims available for your app/technology.
In this example we aim to set up a minimal XCode project which contains all of the components necessary to enable ZeroTier for your app. If you'd rather skip all of these steps and grab the code, look in the [sdk/OSX](https://github.com/zerotier/ZeroTierSDK/tree/dev/sdk/iOS) folder of the source tree. Otherwise, let's get started!
**Step 1: Add ZeroTier source and Netcon-iOS XCode project to yours**
- Place a copy of the ZeroTierOne source in a folder at the same level as your project
- Add `ZeroTierSDK/src/tests/iOS/Netcon-iOS.xcodeproj` to your project
**Step 2: Add ZeroTier binaries to your app**
- Add `ZeroTierSDK.frameworkiOS` to *General->Embedded Binaries*
- Add `libServiceSetup.a` and `ZeroTierSDK.framework` to *Build Phases->Link Binary With Libraries*
**Step 3: Configure your project**
- Add `$(SRCROOT)/../ZeroTierOne/src` to *Build Settings->Header Search Paths* for your project
- Add `-D__IOS__` to *Build Settings->Other C Flags*
- Add `zerotiersdk/tests/iOS/Netcon-iOS/NetconWrapper.cpp` and `zerotiersdk/tests/iOS/Netcon-iOS/NetconWrapper.hpp` to your project:
- Add contents of `ZeroTierOne/netcon/tests/iOS/Netcon-iOS/SDK-iOS-Bridging-Header.h` to your projects bridging header.
*Note: You should have been prompted to create a bridging header for your project, if you haven't make sure you do this and add the native function prototypes manually from the bridging header we provide.*
**Step 4: App Code Modifications**
After you've linked the two projects you need to find a place in your code to set up the ZeroTier service thread:
```
var service_thread : NSThread!
func ztnc_start_service() {
let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)
start_service(path[0])
}
```
...and then start it. If you enabled the proxy service via `-DUSE_SOCKS_PROXY` it will start automatically and be reachable at `0.0.0.0:1337`:
```
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
self.service_thread = NSThread(target:self, selector:"ztnc_start_service", object:nil)
self.service_thread.start()
});
```
**Step 5: Pick an API**
**Step 6: Join a network!**
- Simply call `zt_join_network("XXXXXXXXXXXXXXXX")`
In this example we aim to set up a minimal XCode project which contains all of the components necessary to enable ZeroTier for your app. If you'd rather skip all of these steps and grab the project code, look in the [sdk/integrations/apple](https://github.com/zerotier/ZeroTierSDK/tree/dev/sdk/integrations/apple) folder of the source tree. Otherwise, let's get started!
***
## Linking into an application on Mac OSX
## Via Static-linking
Example:
gcc myapp.c -o myapp libztintercept.so
export ZT_NC_NETWORK=/tmp/netcon-test-home/nc_8056c2e21c000001
export ZT_NC_NETWORK=/tmp/sdk-test-home/nc_8056c2e21c000001
Start service
./zerotier-netcon-service -d -p8000 /tmp/netcon-test-home
./zerotier-sdk-service -d -p8000 /tmp/sdk-test-home
Run application
./myapp
## Via Dynamic-linking at runtime with DYLD
## XCode Desktop App Integration
*NOTE: a sample OSX desktop application with ZeroTier integrated can be found [here](../integrations/Apple/Example_OSX_App)*
## Via App Framework
**Step 1: Build `ZeroTierSDK_OSX.framework`**
- From the main repo directory, `make osx_app_framework`. This will use the XCode commandline tools to build and copy the framework into `build`.
**Step 2: Add `ZeroTierSDK_OSX.framework` to your project**
**Step 3: Add its path to your *Build Settings -> Framework Search Paths***:
- For example: `$(PROJECT_DIR)/../../../build/OSX_app_framework/Release`
**Step 4: Pick an [API](# API) to use**
**Step 5: Join a network!**
- Simply call `zt_join_network("XXXXXXXXXXXXXXXX")`
*NOTE: a sample OSX desktop project using the ZeroTierSDK framework can be found [here](../integrations/apple/example_app/Example_OSX_App)*
***
## API
**Step 1: Build iOS framework**
- `make ios_app_framework`
- This will output to `build/ios_app_framework/Release-iphoneos/ZeroTierSDK_iOS.framework`
**Step 2: Integrate SDK into project**
- Add the resultant framework package to your project
- Add `zerotiersdk/src` directory to `Build Settings -> Header Search Paths`
- Add `build/osx_app_framework/Release-iphoneos/` to *Build Settings -> Framework Search Paths*
- Add `ZeroTierSDK.frameworkiOS` to *General->Embedded Binaries*
- Add `src/SDK_XcodeWrapper.cpp` and `src/SDK_XcodeWrapper.hpp` to your project:
- Add contents of `src/SDK_Apple-Bridging-Header.h` to your projects bridging header.
**Step 3: Start the ZeroTier service**
Now find a place in your code to set up the ZeroTier service thread:
```
var service_thread : NSThread!
func zt_start_service() {
let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)
start_service(path[0])
}
```
and then start it:
```
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
self.service_thread = NSThread(target:self, selector:"zt_start_service", object:nil)
self.service_thread.start()
});
```
*NOTE: If you enabled the proxy service via `-DUSE_SOCKS_PROXY` it will start automatically and be reachable at `0.0.0.0:1337`*
**Step 4: Pick an API**
This integration allows for the following shim combinations:
- `Hook of BSD-like sockets`: Use BSD-like sockets as you normally would.
- `Proxy of NSStream`: Create NSStream. Configure stream for SOCKS5 Proxy. Use stream.
- `Changeling of BSD-like sockets`: Call `start_changeling()` and then use BSD-like sockets as you normally would.
- `Direct Call`: Consult [SDK-iOS-Bridging-Header.h](netcon/iOS/Netcon-iOS/Netcon-iOS-Bridging-Header.h).
- `Direct Call`: Consult [src/SDK_Apple-Bridging-Header.h](src/SDK_Apple-Bridging-Header.h).
If functional interposition isn't available for the API or library you've chosen to use, ZeroTier offers a SOCKS5 proxy server which can allow connectivity to your virtual network as long as your client API supports the SOCKS5 protocol. This proxy service will run alongside the tap service and can be turned on by compiling with the `-DUSE_SOCKS_PROXY` flag in *Build Settings->Other C Flags*. By default, the proxy service is available at `0.0.0.0:1337`.
**Step 5: Join a network!**
#### NSStream and SOCKS Proxy
Simply call `zt_join_network("XXXXXXXXXXXXXXXX")`
***
**NSStream and SOCKS Proxy:**
As an example, here's how one would configure a NSStream object to redirect all network activity to the ZeroTier SOCKS proxy server:
@@ -112,3 +100,4 @@ inputStream!.setProperty(myDict, forKey: NSStreamSOCKSProxyConfigurationKey)
outputStream!.setProperty(myDict, forKey: NSStreamSOCKSProxyConfigurationKey)
// END proxy configuration
```

View File

@@ -1,18 +0,0 @@
Apple
* Create shared/dynamic targets for OSX
General
* Trim down makefiles
* Add release targets to each xcode/android studio project
Unity
* check for mem leaks surrounding managed/unmanaged barrier
* find root of 2X buffer size requirement issue
* check that cross-thread oprations are handled correctly
* check that .IsRunning() doesn't bork the entire system anymore
* Allow max packet size configuration
* Handle exceptions from unmanaged code
Documentation
* Refactor
* Fix broken references

View File

@@ -1,6 +1,6 @@
# ZeroTier SDK Primer
True P2P injected right into your app with no code changes! A ZeroTier-enabled app.
True P2P injected right into your app with little to no code changes! A ZeroTier-enabled app.
(formerly known as Network Containers)
The SDK couples the ZeroTier core Ethernet virtualization engine with a user-space TCP/IP stack and a carefully-crafted "shim" which intercepts and re-directs network API calls to our service. This allows servers and applications to be used without modification or recompilation. It can be used to run services on virtual networks without elevated privileges, special configuration of the physical host, kernel support, or any other application specific configuration. It's ideal for [containerized applications](docs/docker_linux_zt_sdk.md), [games](docs/unity3d.md), and [desktop/mobile apps]().
@@ -9,8 +9,8 @@ Your only responsibility is to pick a shim appropriate for your app's design. Ac
The general idea is this:
1) Your application starts.
2) The shim initializes inside a separate thread of your app.
3) Your app can now reach anything on your virtual network.
2) The shim and ZeroTier service initializes inside a separate thread of your app.
3) Your app can now reach anything on your virtual network via normal network calls.
It's as simple as that!