mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 05:13:58 -07:00
Updated RPC handling
This commit is contained in:
parent
82a60b1e28
commit
e5fad005a9
22 changed files with 345 additions and 41 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
40
docker-test/throughput_httpd_2.4.17/Dockerfile
Normal file
40
docker-test/throughput_httpd_2.4.17/Dockerfile
Normal file
|
@ -0,0 +1,40 @@
|
|||
# ZT Netcon Throughput test
|
||||
FROM fedora:23
|
||||
MAINTAINER https://www.zerotier.com/
|
||||
|
||||
# Install apps
|
||||
RUN yum -y update
|
||||
RUN yum -y install httpd-2.4.17-3.fc23
|
||||
RUN yum -y install nano
|
||||
RUN yum -y install strace
|
||||
RUN yum clean all
|
||||
|
||||
EXPOSE 9993/udp 9992/udp 9991/udp 9990/udp
|
||||
|
||||
# Install sys-call intercept library
|
||||
ADD intercept /
|
||||
ADD libintercept.so.1.0 /
|
||||
RUN cp libintercept.so.1.0 lib/libintercept.so.1.0
|
||||
RUN cp libintercept.so.1.0 /lib/libintercept.so.1.0
|
||||
RUN ln -sf /lib/libintercept.so.1.0 /lib/libintercept
|
||||
RUN /usr/bin/install -c intercept /usr/bin
|
||||
|
||||
# Add ZT files
|
||||
RUN mkdir -p /var/lib/zerotier-one/networks.d
|
||||
RUN touch /var/lib/zerotier-one/networks.d/e5cd7a9e1c5311ab.conf
|
||||
ADD zerotier-one /
|
||||
ADD zerotier-cli /
|
||||
|
||||
# Install test-setup scripts
|
||||
ADD generate_file.sh /generate_file.sh
|
||||
RUN chmod -v +x /generate_file.sh
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
RUN chmod -v +x /entrypoint.sh
|
||||
|
||||
# Install LWIP library used by service
|
||||
ADD liblwip.so /
|
||||
RUN mkdir -p ext/bin/lwip
|
||||
RUN cp liblwip.so ext/bin/lwip/liblwip.so
|
||||
|
||||
# Start ZeroTier-One
|
||||
CMD ["./entrypoint.sh"]
|
17
docker-test/throughput_httpd_2.4.17/build.sh
Executable file
17
docker-test/throughput_httpd_2.4.17/build.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
cd ../../
|
||||
make clean
|
||||
make
|
||||
cd netcon
|
||||
make -f make-intercept.mk lib
|
||||
rm *.o
|
||||
rm liblwip.so
|
||||
make -f make-liblwip.mk
|
||||
|
||||
cd ../docker-test/throughput_httpd_2.4.17
|
||||
|
||||
cp ../../zerotier-one zerotier-one
|
||||
cp ../../zerotier-cli zerotier-cli
|
||||
|
||||
cp ../../netcon/liblwip.so liblwip.so
|
||||
cp ../../netcon/libintercept.so.1.0 libintercept.so.1.0
|
||||
|
14
docker-test/throughput_httpd_2.4.17/entrypoint.sh
Normal file
14
docker-test/throughput_httpd_2.4.17/entrypoint.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/
|
||||
|
||||
echo '***'
|
||||
echo '*** ZeroTier Network Containers Test Image'
|
||||
echo '*** https://www.zerotier.com/'
|
||||
echo '***'
|
||||
|
||||
./zerotier-one &
|
||||
./zerotier-cli join e5cd7a9e1c5311ab
|
||||
./zerotier-cli listnetworks
|
||||
|
||||
|
1
docker-test/throughput_httpd_2.4.17/generate_file.sh
Normal file
1
docker-test/throughput_httpd_2.4.17/generate_file.sh
Normal file
|
@ -0,0 +1 @@
|
|||
dd if=/dev/urandom of=/var/www/html/big bs=100M count=1
|
54
docker-test/throughput_httpd_2.4.17/intercept
Executable file
54
docker-test/throughput_httpd_2.4.17/intercept
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
# usage:
|
||||
# /usr/bin/intercept program <args>
|
||||
|
||||
if [ $# = 0 ] ; then
|
||||
echo "$0: insufficient arguments"
|
||||
exit
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
on)
|
||||
if [ -z "$LD_PRELOAD" ]
|
||||
then
|
||||
export LD_PRELOAD="/lib/libintercept.so.1.0"
|
||||
else
|
||||
echo $LD_PRELOAD | grep -q "/lib/libintercept\.so.1.0" || \
|
||||
export LD_PRELOAD="/lib/libintercept.so $LD_PRELOAD"
|
||||
fi
|
||||
;;
|
||||
off)
|
||||
export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/lib\/libintercept.so.1.0 \?//'`
|
||||
if [ -z "$LD_PRELOAD" ]
|
||||
then
|
||||
unset LD_PRELOAD
|
||||
fi
|
||||
;;
|
||||
show|sh)
|
||||
echo "LD_PRELOAD=\"$LD_PRELOAD\""
|
||||
;;
|
||||
-h|-?)
|
||||
echo ""
|
||||
;;
|
||||
*)
|
||||
if [ -z "$LD_PRELOAD" ]
|
||||
then
|
||||
export LD_PRELOAD="/lib/libintercept.so.1.0"
|
||||
else
|
||||
echo $LD_PRELOAD | grep -q "/lib/libintercept\.so.1.0" || \
|
||||
export LD_PRELOAD="/lib/libintercept.so.1.0 $LD_PRELOAD"
|
||||
fi
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
${SHELL:-/bin/sh}
|
||||
fi
|
||||
|
||||
if [ $# -gt 0 ]
|
||||
then
|
||||
exec "$@"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
#EOF
|
Loading…
Add table
Add a link
Reference in a new issue