updated docker test files
This commit is contained in:
@@ -1 +0,0 @@
|
||||
Versions/Current/Modules
|
||||
@@ -1 +0,0 @@
|
||||
Versions/Current/Resources
|
||||
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>15F34</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>ZeroTierSDK_OSX</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>zerotier.ZeroTierSDK-OSX</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>ZeroTierSDK_OSX</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>7D175</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>15E60</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.11</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0730</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>7D175</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2016 ZeroTier Inc. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,122 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Resources/Info.plist</key>
|
||||
<data>
|
||||
K/BDIuWltnsAQ2lDkdc8UvZj1Qo=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Resources/Info.plist</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
K/BDIuWltnsAQ2lDkdc8UvZj1Qo=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
mUCBD6yhvUknsHAV8ejuSR3M/x/mERi1Ut2zlFmx9Zk=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^Resources/</key>
|
||||
<true/>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^[^/]+$</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1 +0,0 @@
|
||||
A
|
||||
@@ -1,114 +0,0 @@
|
||||
OSX + ZeroTier SDK
|
||||
====
|
||||
|
||||
Welcome!
|
||||
|
||||
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.
|
||||
|
||||
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 project’s 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")`
|
||||
|
||||
***
|
||||
## Linking into an application on Mac OSX
|
||||
|
||||
Example:
|
||||
|
||||
gcc myapp.c -o myapp libztintercept.so
|
||||
export ZT_NC_NETWORK=/tmp/netcon-test-home/nc_8056c2e21c000001
|
||||
|
||||
Start service
|
||||
|
||||
./zerotier-netcon-service -d -p8000 /tmp/netcon-test-home
|
||||
|
||||
Run application
|
||||
|
||||
./myapp
|
||||
|
||||
|
||||
|
||||
## XCode Desktop App Integration
|
||||
|
||||
*NOTE: a sample OSX desktop application with ZeroTier integrated can be found [here](../integrations/Apple/Example_OSX_App)*
|
||||
|
||||
**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")`
|
||||
|
||||
***
|
||||
## 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).
|
||||
|
||||
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`.
|
||||
|
||||
|
||||
#### 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:
|
||||
|
||||
```
|
||||
// BEGIN proxy configuration
|
||||
let myDict:NSDictionary = [NSStreamSOCKSProxyHostKey : "0.0.0.0",
|
||||
NSStreamSOCKSProxyPortKey : 1337,
|
||||
NSStreamSOCKSProxyVersionKey : NSStreamSOCKSProxyVersion5]
|
||||
|
||||
inputStream!.setProperty(myDict, forKey: NSStreamSOCKSProxyConfigurationKey)
|
||||
outputStream!.setProperty(myDict, forKey: NSStreamSOCKSProxyConfigurationKey)
|
||||
// END proxy configuration
|
||||
```
|
||||
@@ -1,3 +0,0 @@
|
||||
local msg = "welcome to the machine!"
|
||||
redis.call("SET", "msg", msg)
|
||||
return redis.call("GET", "msg")
|
||||
@@ -1,28 +0,0 @@
|
||||
# ZT SDK Test Monitor
|
||||
FROM fedora:23
|
||||
MAINTAINER https://www.zerotier.com/
|
||||
|
||||
RUN yum -y install redis-3.0.4-1.fc23.x86_64
|
||||
|
||||
EXPOSE 9993/udp
|
||||
|
||||
# Add ZT files
|
||||
RUN mkdir -p /var/lib/zerotier-one/networks.d
|
||||
ADD monitor_identity.public /var/lib/zerotier-one/identity.public
|
||||
ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret
|
||||
ADD *.conf /var/lib/zerotier-one/networks.d/
|
||||
ADD *.conf /
|
||||
ADD *.name /
|
||||
|
||||
# Install LWIP library used by service
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
ADD hello.lua /
|
||||
|
||||
ADD zerotier-one /
|
||||
ADD zerotier-cli /
|
||||
|
||||
# Start ZeroTier-One
|
||||
ADD monitor_entrypoint.sh /monitor_entrypoint.sh
|
||||
RUN chmod -v +x /monitor_entrypoint.sh
|
||||
CMD ["./monitor_entrypoint.sh"]
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/
|
||||
|
||||
|
||||
# --- Test Parameters ---
|
||||
test_namefile=$(ls *.name)
|
||||
test_name="${test_namefile%.*}" # test network id
|
||||
nwconf=$(ls *.conf) # blank test network config file
|
||||
nwid="${nwconf%.*}" # test network id
|
||||
sdk_wait_time=25 # wait for test container to come online
|
||||
app_timeout_time=15 # app-specific timeout
|
||||
file_path=/opt/results/ # test result output file path (fs shared between host and containers)
|
||||
file_base="$test_name".txt # test result output file
|
||||
fail=FAIL. # appended to result file in event of failure
|
||||
ok=OK. # appended to result file in event of success
|
||||
tmp_ext=.tmp # temporary filetype used for sharing test data between containers
|
||||
address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional)
|
||||
|
||||
|
||||
# --- Network Config ---
|
||||
echo '*** ZeroTier SDK Test Monitor'
|
||||
chown -R daemon /var/lib/zerotier-one
|
||||
chgrp -R daemon /var/lib/zerotier-one
|
||||
su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1'
|
||||
virtip4=""
|
||||
while [ -z "$virtip4" ]; do
|
||||
sleep 0.2
|
||||
virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1`
|
||||
done
|
||||
echo '*** Starting Test...'
|
||||
echo '*** Up and running at' $virtip4 ' on network: ' $nwid
|
||||
echo '*** Sleeping for (' "$sdk_wait_time" 's ) while we wait for the Network Container to come online...'
|
||||
sleep "$sdk_wait_time"s
|
||||
ncvirtip=$(<$address_file)
|
||||
|
||||
|
||||
# --- Test section ---
|
||||
echo '*** Running lua script against redis host at' $ncvirtip
|
||||
redis-cli -h $ncvirtip EVAL "$(cat hello.lua)" 0 > redis_response.txt
|
||||
response_string=$(<redis_response.txt)
|
||||
|
||||
if [[ $response_string == *"welcome to the machine!"* ]]
|
||||
then
|
||||
echo 'REDIS RESPONSE OK'
|
||||
touch "$file_path$ok$test_name.txt"
|
||||
printf 'Test: redis-server responded!\n' >> "$file_path$ok$test_name.txt"
|
||||
else
|
||||
echo 'REDIS RESPONSE FAIL'
|
||||
touch "$file_path$fail$test_name.txt"
|
||||
printf 'Test: redis server did NOT respond!\n' >> "$file_path$fail$test_name.txt"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# ZT SDK Test
|
||||
FROM fedora:23
|
||||
MAINTAINER https://www.zerotier.com/
|
||||
|
||||
# Install apps
|
||||
RUN yum -y update
|
||||
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 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 /
|
||||
|
||||
EXPOSE 9993/udp 6379/udp
|
||||
|
||||
# Install LWIP library used by service
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
Add zerotier-sdk-service /
|
||||
|
||||
# Install test scripts
|
||||
ADD sdk_entrypoint.sh /sdk_entrypoint.sh
|
||||
RUN chmod -v +x /sdk_entrypoint.sh
|
||||
|
||||
# Start ZeroTier-One
|
||||
CMD ["./sdk_entrypoint.sh"]
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/
|
||||
|
||||
|
||||
# --- Test Parameters ---
|
||||
test_namefile=$(ls *.name)
|
||||
test_name="${test_namefile%.*}" # test network id
|
||||
nwconf=$(ls *.conf) # blank test network config file
|
||||
nwid="${nwconf%.*}" # test network id
|
||||
file_path=/opt/results/ # test result output file path (fs shared between host and containers)
|
||||
file_base="$test_name".txt # test result output file
|
||||
tmp_ext=.tmp # temporary filetype used for sharing test data between containers
|
||||
address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional)
|
||||
|
||||
|
||||
# --- Network Config ---
|
||||
echo '*** ZeroTier SDK Test: ' "$test_name"
|
||||
chown -R daemon /var/lib/zerotier-one
|
||||
chgrp -R daemon /var/lib/zerotier-one
|
||||
su daemon -s /bin/bash -c '/zerotier-sdk-service -d -U -p9993 >>/tmp/zerotier-sdk-service.out 2>&1'
|
||||
virtip4=""
|
||||
while [ -z "$virtip4" ]; do
|
||||
sleep 0.2
|
||||
virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1`
|
||||
dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'`
|
||||
done
|
||||
echo '*** Up and running at' $virtip4 ' on network: ' $nwid
|
||||
echo '*** Writing address to ' "$address_file"
|
||||
echo $virtip4 > "$address_file"
|
||||
|
||||
# --- Test section ---
|
||||
echo '*** Starting application...'
|
||||
sleep 0.5
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
/usr/bin/redis-server --port 6379
|
||||
@@ -63,7 +63,7 @@ ifeq ($(SDK_DEBUG_LOG_TO_FILE),1)
|
||||
DEFS+=-DSDK_DEBUG_LOG_TO_FILE
|
||||
endif
|
||||
|
||||
all: shared_lib check
|
||||
all: linux_shared_lib check
|
||||
|
||||
remove_only_intermediates:
|
||||
-find . -type f \( -name '*.o' -o -name '*.so' \) -delete
|
||||
@@ -79,6 +79,19 @@ linux_shared_lib: remove_only_intermediates $(OBJS)
|
||||
ln -sf zerotier-sdk-service zerotier-cli
|
||||
ln -sf zerotier-sdk-service zerotier-idtool
|
||||
|
||||
# Builds the docker demo images
|
||||
docker_demo: linux_shared_lib
|
||||
# Copy ZT SDK service, dynamic hook library, and lwIP stack library to build directory
|
||||
cp build/linux_shared_lib/libztintercept.so integrations/docker/docker_demo/libztintercept.so
|
||||
cp build/zerotier-sdk-service integrations/docker/docker_demo/zerotier-sdk-service.so
|
||||
cp build/lwip/liblwip.so integrations/docker/docker_demo/liblwip.so
|
||||
touch integrations/docker/docker_demo/docker_demo.name
|
||||
# Server image
|
||||
cd integrations/docker/docker_demo; docker build --tag="docker_demo" -f sdk_dockerfile .
|
||||
# Client image
|
||||
cd integrations/docker/docker_demo; docker build --tag="docker_demo_monitor" -f monitor_dockerfile .
|
||||
|
||||
|
||||
# Check for the presence of built frameworks/bundles/libaries
|
||||
check:
|
||||
./check.sh build/lwip/liblwip.so
|
||||
|
||||
@@ -10,7 +10,7 @@ cp ../../zerotier-one zerotier-one
|
||||
cp ../../zerotier-cli zerotier-cli
|
||||
cp ../../zerotier-cli zerotier-sdk-service
|
||||
cp ../../zerotier-intercept zerotier-intercept
|
||||
cp ../../libzerotierintercept.so libzerotierintercept.so
|
||||
cp ../../libztintercept.so libztintercept.so
|
||||
cp ../../liblwip.so liblwip.so
|
||||
cp ../../sdk_identity.public sdk_identity.public
|
||||
cp ../../sdk_identity.secret sdk_identity.secret
|
||||
|
||||
@@ -11,7 +11,7 @@ cd sdk/docker-test
|
||||
|
||||
cp ../../zerotier-cli zerotier-cli
|
||||
cp ../../zerotier-sdk-service zerotier-sdk-service
|
||||
cp ../../libzerotierintercept.so libzerotierintercept.so
|
||||
cp ../../libztintercept.so libztintercept.so
|
||||
|
||||
cp ../liblwip.so liblwip.so
|
||||
cp ../zerotier-intercept zerotier-intercept
|
||||
|
||||
@@ -21,9 +21,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -42,5 +42,5 @@ echo '*** Starting application...'
|
||||
sleep 0.5
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
darkhttpd /
|
||||
|
||||
@@ -21,9 +21,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -43,5 +43,5 @@ sleep 0.5
|
||||
rm -rf /run/httpd/* /tmp/httpd*
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
/usr/sbin/httpd -X
|
||||
|
||||
@@ -22,9 +22,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -43,5 +43,5 @@ sleep 0.5
|
||||
rm -rf /run/httpd/* /tmp/httpd*
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
/usr/sbin/httpd -X
|
||||
|
||||
@@ -21,9 +21,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -45,5 +45,5 @@ sleep 0.5
|
||||
rm -rf /run/httpd/* /tmp/httpd*
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
/usr/sbin/httpd -X
|
||||
|
||||
@@ -16,8 +16,8 @@ RUN mv index.html /var/www/html/index.html
|
||||
RUN mv ZeroTierIcon.png /var/www/html/ZeroTierIcon.png
|
||||
|
||||
# Install syscall intercept library
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
# Add ZT files
|
||||
RUN mkdir -p /var/lib/zerotier-one/networks.d
|
||||
|
||||
@@ -24,9 +24,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -46,5 +46,5 @@ echo '*** Starting application...'
|
||||
sleep 0.5
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
nginx
|
||||
|
||||
@@ -21,9 +21,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -46,5 +46,5 @@ echo '*** Starting application...'
|
||||
sleep 0.5
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
nginx
|
||||
|
||||
@@ -21,9 +21,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -46,5 +46,5 @@ echo '*** Starting application...'
|
||||
sleep 0.5
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
nginx
|
||||
|
||||
@@ -24,9 +24,9 @@ ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
ADD httpserver.js /
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -30,7 +30,7 @@ echo '*** Writing address to ' "$address_file"
|
||||
echo $virtip4 > "$address_file"
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
|
||||
# --- Test section ---
|
||||
echo '*** Starting application...'
|
||||
|
||||
@@ -21,9 +21,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -42,5 +42,5 @@ echo '*** Starting application...'
|
||||
sleep 0.5
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
python -m SimpleHTTPServer 80
|
||||
|
||||
@@ -20,9 +20,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
ADD zerotier-sdk-service /
|
||||
|
||||
@@ -42,5 +42,5 @@ echo '*** Starting application...'
|
||||
sleep 0.5
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
python3 -m http.server 80
|
||||
|
||||
@@ -21,9 +21,9 @@ EXPOSE 9993/udp 6379/udp
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
Add zerotier-sdk-service /
|
||||
|
||||
@@ -34,5 +34,5 @@ echo '*** Starting application...'
|
||||
sleep 0.5
|
||||
|
||||
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev"
|
||||
export LD_PRELOAD=./libzerotierintercept.so
|
||||
export LD_PRELOAD=./libztintercept.so
|
||||
/usr/bin/redis-server --port 6379
|
||||
|
||||
@@ -21,9 +21,9 @@ ADD *.name /
|
||||
ADD liblwip.so /var/lib/zerotier-one/liblwip.so
|
||||
|
||||
# Install syscall intercept library
|
||||
ADD libzerotierintercept.so /
|
||||
RUN cp libzerotierintercept.so lib/libzerotierintercept.so
|
||||
RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept
|
||||
ADD libztintercept.so /
|
||||
RUN cp libztintercept.so lib/libztintercept.so
|
||||
RUN ln -sf /lib/libztintercept.so /lib/libzerotierintercept
|
||||
|
||||
ADD zerotier-cli /
|
||||
|
||||
|
||||
Reference in New Issue
Block a user