SpoofDPI: add 0.12.0
This commit is contained in:
7
SpoofDPI/README
Normal file
7
SpoofDPI/README
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Axel accelerates the HTTP/FTP downloading process by using multiple
|
||||||
|
connections for one file. It can use multiple mirrors for a download.
|
||||||
|
Axel has no dependencies and is lightweight, so it might be useful as a
|
||||||
|
wget clone on byte-critical systems. Axel is the perfect utility for
|
||||||
|
those connections to wherever you are downloading from that may have a
|
||||||
|
limit on ftp stream speeds, http sessions that burst and slow down, or
|
||||||
|
servers with a slow connection.
|
||||||
92
SpoofDPI/SpoofDPI.SlackBuild
Normal file
92
SpoofDPI/SpoofDPI.SlackBuild
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Slackware build script for SpoofDPI
|
||||||
|
|
||||||
|
# Copyright 2024 Sergei Fedosoff <eleksir@gmail.com>
|
||||||
|
#
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use of this script, with or without modification, is
|
||||||
|
# permitted provided that the following conditions are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of this script must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||||
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
cd $(dirname $0) ; CWD=$(pwd)
|
||||||
|
|
||||||
|
PRGNAM=SpoofDPI
|
||||||
|
VERSION=${VERSION:-0.12.0}
|
||||||
|
BUILD=${BUILD:-1}
|
||||||
|
TAG=${TAG:-_EXs}
|
||||||
|
PKGTYPE=${PKGTYPE:-tgz}
|
||||||
|
|
||||||
|
if [ -z "$ARCH" ]; then
|
||||||
|
case "$( uname -m )" in
|
||||||
|
i?86) ARCH=i586 ;;
|
||||||
|
arm*) ARCH=arm ;;
|
||||||
|
*) ARCH=$( uname -m ) ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||||
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
TMP=${TMP:-/tmp/EXs}
|
||||||
|
PKG=$TMP/package-$PRGNAM
|
||||||
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
|
if [ "$ARCH" = "i586" ]; then
|
||||||
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||||
|
LIBDIRSUFFIX=""
|
||||||
|
elif [ "$ARCH" = "i686" ]; then
|
||||||
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||||
|
LIBDIRSUFFIX=""
|
||||||
|
elif [ "$ARCH" = "x86_64" ]; then
|
||||||
|
SLKCFLAGS="-O2 -fPIC"
|
||||||
|
LIBDIRSUFFIX="64"
|
||||||
|
else
|
||||||
|
SLKCFLAGS="-O2"
|
||||||
|
LIBDIRSUFFIX=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
rm -rf $PKG
|
||||||
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
|
cd $TMP
|
||||||
|
rm -rf $PRGNAM-$VERSION
|
||||||
|
tar xf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||||
|
cd $PRGNAM-$VERSION
|
||||||
|
chown -R root:root .
|
||||||
|
find -L . \
|
||||||
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||||
|
-exec chmod 755 {} \+ -o \
|
||||||
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||||
|
-exec chmod 644 {} \+
|
||||||
|
|
||||||
|
CGO_ENABLED=0 go build -ldflags '-w -s -extldflags "-static"' -trimpath -tags timetzdata -o spoofdpi ./cmd/spoofdpi
|
||||||
|
|
||||||
|
install -Dpm 0755 spoofdpi $PKG/usr/sbin/spoofdpi
|
||||||
|
install -Dpm 0644 $CWD/rc.spoofdpi $PKG/etc/rc.d/rc.spoofdpi.new
|
||||||
|
install -Dpm 0644 $CWD/spoofdpi.sysconfig $PKG/etc/default/spoofdpi.new
|
||||||
|
install -Ddm 0755 $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
install -Dpm 0644 LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
install -Dpm 0644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
install -Dpm 0644 $CWD/slack-desc $PKG/install/slack-desc
|
||||||
|
install -Dpm 0644 $CWD/doinst.sh $PKG/install/doinst.sh
|
||||||
|
|
||||||
|
cd $PKG
|
||||||
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|
||||||
11
SpoofDPI/SpoofDPI.info
Normal file
11
SpoofDPI/SpoofDPI.info
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
PRGNAM="SpoofDPI"
|
||||||
|
VERSION="0.12.0"
|
||||||
|
HOMEPAGE="https://github.com/xvzc/SpoofDPI"
|
||||||
|
DOWNLOAD="https://github.com/xvzc/SpoofDPI/archive/refs/tags/v0.12.0/SpoofDPI-0.12.0.tar.gz"
|
||||||
|
MD5SUM="d43ae5a52c3adf6825bc94775ee88f7f"
|
||||||
|
DOWNLOAD_x86_64=""
|
||||||
|
MD5SUM_x86_64=""
|
||||||
|
REQUIRES=""
|
||||||
|
BUILDREQUIRES="google-go-lang"
|
||||||
|
MAINTAINER="Sergei Fedosoff"
|
||||||
|
EMAIL="eleksir@gmail.com"
|
||||||
26
SpoofDPI/doinst.sh
Normal file
26
SpoofDPI/doinst.sh
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
config() {
|
||||||
|
NEW="$1"
|
||||||
|
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||||
|
# If there's no config file by that name, mv it over:
|
||||||
|
if [ ! -r $OLD ]; then
|
||||||
|
mv $NEW $OLD
|
||||||
|
elif [ "$(cat $OLD|md5sum)" = "$(cat $NEW|md5sum)" ]; then
|
||||||
|
# toss the redundant copy
|
||||||
|
rm $NEW
|
||||||
|
fi
|
||||||
|
# Otherwise, we leave the .new copy for the admin to consider...
|
||||||
|
}
|
||||||
|
|
||||||
|
preserve_perms() {
|
||||||
|
NEW="$1"
|
||||||
|
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||||
|
if [ -e $OLD ]; then
|
||||||
|
cp -a $OLD ${NEW}.incoming
|
||||||
|
cat $NEW > ${NEW}.incoming
|
||||||
|
mv ${NEW}.incoming $NEW
|
||||||
|
fi
|
||||||
|
config $NEW
|
||||||
|
}
|
||||||
|
|
||||||
|
config etc/default/spoofdpi.new
|
||||||
|
preserve_perms etc/rc.d/rc.spoofdpi.new
|
||||||
82
SpoofDPI/rc.spoofdpi
Normal file
82
SpoofDPI/rc.spoofdpi
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Copyright 2024 Sergei Fedosoff <eleksir@gmail.com>
|
||||||
|
#
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
#
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
source /etc/defaults/spoofdpi
|
||||||
|
PIDFILE="/run/spoofdpi.pid"
|
||||||
|
|
||||||
|
_start() {
|
||||||
|
# make sure bitlbee isn't running yet
|
||||||
|
if [ ! -f $PIDFILE ]; then
|
||||||
|
/usr/sbin/daemonize -p $PIDFILE -- /usr/sbin/spoofdpi $OPTIONS
|
||||||
|
else
|
||||||
|
echo "spoofdpi is already active and running under PID: $(cat $PIDFILE)"
|
||||||
|
echo "if you think this is wrong, remove the offending PID file"
|
||||||
|
echo "and restart spoof"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_stop() {
|
||||||
|
echo -n "Stopping spoofdpi..."
|
||||||
|
|
||||||
|
if [ -r $PIDFILE ]; then
|
||||||
|
kill $(cat $PIDFILE)
|
||||||
|
|
||||||
|
for i in 1 2 3; do
|
||||||
|
if [ -f $PIDFILE ]; then
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -r $PIDFILE ]; then
|
||||||
|
kill -9 $(cat $PIDFILE) 2>/dev/null
|
||||||
|
rm $PIDFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "done"
|
||||||
|
else
|
||||||
|
echo "Unable to find $PIDFILE and stop spoofdpi"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Let's see how we are being called.
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
_start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
_stop
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
_stop
|
||||||
|
sleep 3
|
||||||
|
_start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $(basename $0) {start|stop|restart}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
19
SpoofDPI/slack-desc
Normal file
19
SpoofDPI/slack-desc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# HOW TO EDIT THIS FILE:
|
||||||
|
# The "handy ruler" below makes it easier to edit a package description.
|
||||||
|
# Line up the first '|' above the ':' following the base package name, and
|
||||||
|
# the '|' on the right side marks the last column you can put a character in.
|
||||||
|
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||||
|
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||||
|
|
||||||
|
|-----handy-ruler------------------------------------------------------|
|
||||||
|
SpoofDPI: SpoofDPI
|
||||||
|
SpoofDPI:
|
||||||
|
SpoofDPI: A simple and fast software designed to bypass Deep Packet Inspection.
|
||||||
|
SpoofDPI:
|
||||||
|
SpoofDPI:
|
||||||
|
SpoofDPI:
|
||||||
|
SpoofDPI:
|
||||||
|
SpoofDPI: Homepage: https://github.com/xvzc/SpoofDPI
|
||||||
|
SpoofDPI:
|
||||||
|
SpoofDPI:
|
||||||
|
SpoofDPI:
|
||||||
2
SpoofDPI/spoofdpi.sysconfig
Normal file
2
SpoofDPI/spoofdpi.sysconfig
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Options for running SpoofDPI daemon
|
||||||
|
OPTIONS="-addr 127.0.0.1 -port 8080 -no-banner -system-proxy false"
|
||||||
Reference in New Issue
Block a user