mirror of
https://github.com/bol-van/zapret.git
synced 2025-03-15 04:41:37 +03:00
Compare commits
No commits in common. "e58cceb618d801cbc933ec3bab814c2e3778da39" and "b82dbcd0e6ca1b38954cb59f6f5c7135eb68a5ca" have entirely different histories.
e58cceb618
...
b82dbcd0e6
@ -348,26 +348,6 @@ check_system()
|
|||||||
echo firewall type is $FWTYPE
|
echo firewall type is $FWTYPE
|
||||||
}
|
}
|
||||||
|
|
||||||
zp_already_running()
|
|
||||||
{
|
|
||||||
case "$UNAME" in
|
|
||||||
CYGWIN)
|
|
||||||
win_process_exists $PKTWSD || win_process_exists goodbyedpi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
process_exists $PKTWSD || process_exists tpws
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
check_already()
|
|
||||||
{
|
|
||||||
echo \* checking already running zapret processes
|
|
||||||
if zp_already_running; then
|
|
||||||
echo "!!! WARNING. some dpi bypass processes already running !!!"
|
|
||||||
echo "!!! WARNING. blockcheck requires all DPI bypass methods disabled !!!"
|
|
||||||
echo "!!! WARNING. pls stop all dpi bypass instances that may interfere with blockcheck !!!"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
freebsd_module_loaded()
|
freebsd_module_loaded()
|
||||||
{
|
{
|
||||||
# $1 - module name
|
# $1 - module name
|
||||||
@ -905,17 +885,17 @@ tpws_curl_test()
|
|||||||
# $1 - test function
|
# $1 - test function
|
||||||
# $2 - domain
|
# $2 - domain
|
||||||
# $3,$4,$5, ... - tpws params
|
# $3,$4,$5, ... - tpws params
|
||||||
echo - checking tpws $3 $4 $5 $6 $7 $8 $9 $TPWS_EXTRA "$TPWS_EXTRA_1" "$TPWS_EXTRA_2" "$TPWS_EXTRA_3" "$TPWS_EXTRA_4" "$TPWS_EXTRA_5" "$TPWS_EXTRA_6" "$TPWS_EXTRA_7" "$TPWS_EXTRA_8" "$TPWS_EXTRA_9"
|
echo - checking tpws $3 $4 $5 $6 $7 $8 $9 $TPWS_EXTRA
|
||||||
local ALL_PROXY="socks5://127.0.0.1:$SOCKS_PORT"
|
local ALL_PROXY="socks5://127.0.0.1:$SOCKS_PORT"
|
||||||
ws_curl_test tpws_start "$@" $TPWS_EXTRA "$TPWS_EXTRA_1" "$TPWS_EXTRA_2" "$TPWS_EXTRA_3" "$TPWS_EXTRA_4" "$TPWS_EXTRA_5" "$TPWS_EXTRA_6" "$TPWS_EXTRA_7" "$TPWS_EXTRA_8" "$TPWS_EXTRA_9"
|
ws_curl_test tpws_start "$@" $TPWS_EXTRA
|
||||||
}
|
}
|
||||||
pktws_curl_test()
|
pktws_curl_test()
|
||||||
{
|
{
|
||||||
# $1 - test function
|
# $1 - test function
|
||||||
# $2 - domain
|
# $2 - domain
|
||||||
# $3,$4,$5, ... - nfqws/dvtws params
|
# $3,$4,$5, ... - nfqws/dvtws params
|
||||||
echo - checking $PKTWSD ${WF:+$WF }$3 $4 $5 $6 $7 $8 $9 $PKTWS_EXTRA "$PKTWS_EXTRA_1" "$PKTWS_EXTRA_2" "$PKTWS_EXTRA_3" "$PKTWS_EXTRA_4" "$PKTWS_EXTRA_5" "$PKTWS_EXTRA_6" "$PKTWS_EXTRA_7" "$PKTWS_EXTRA_8" "$PKTWS_EXTRA_9"
|
echo - checking $PKTWSD ${WF:+$WF }$3 $4 $5 $6 $7 $8 $9 $PKTWS_EXTRA
|
||||||
ws_curl_test pktws_start "$@" $PKTWS_EXTRA "$PKTWS_EXTRA_1" "$PKTWS_EXTRA_2" "$PKTWS_EXTRA_3" "$PKTWS_EXTRA_4" "$PKTWS_EXTRA_5" "$PKTWS_EXTRA_6" "$PKTWS_EXTRA_7" "$PKTWS_EXTRA_8" "$PKTWS_EXTRA_9"
|
ws_curl_test pktws_start "$@" $PKTWS_EXTRA
|
||||||
}
|
}
|
||||||
xxxws_curl_test_update()
|
xxxws_curl_test_update()
|
||||||
{
|
{
|
||||||
@ -1816,7 +1796,6 @@ sigsilent()
|
|||||||
fsleep_setup
|
fsleep_setup
|
||||||
fix_sbin_path
|
fix_sbin_path
|
||||||
check_system
|
check_system
|
||||||
check_already
|
|
||||||
[ "$UNAME" = CYGWIN ] || require_root
|
[ "$UNAME" = CYGWIN ] || require_root
|
||||||
check_prerequisites
|
check_prerequisites
|
||||||
trap sigint_cleanup INT
|
trap sigint_cleanup INT
|
||||||
|
@ -313,22 +313,6 @@ shell_name()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
process_exists()
|
|
||||||
{
|
|
||||||
if exists pgrep; then
|
|
||||||
pgrep ^$1$ >/dev/null
|
|
||||||
elif exists pidof; then
|
|
||||||
pidof $1 >/dev/null
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
win_process_exists()
|
|
||||||
{
|
|
||||||
tasklist /NH /FI "IMAGENAME eq ${1}.exe" | grep -q "^${1}.exe"
|
|
||||||
}
|
|
||||||
|
|
||||||
std_ports()
|
std_ports()
|
||||||
{
|
{
|
||||||
HTTP_PORTS=${HTTP_PORTS:-80}
|
HTTP_PORTS=${HTTP_PORTS:-80}
|
||||||
|
@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=tpws
|
PKG_NAME:=tpws
|
||||||
PKG_VERSION:=1.4
|
PKG_VERSION:=1.4
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0-or-later
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
PKG_MAINTAINER:=Zapret
|
PKG_MAINTAINER:=Zapret
|
||||||
@ -17,7 +17,7 @@ define Package/tpws
|
|||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
TITLE:=TPWS DPI bypass proxy server
|
TITLE:=TPWS DPI bypass proxy server
|
||||||
SUBMENU:=Zapret
|
SUBMENU:=Zapret
|
||||||
DEPENDS:=+zlib +libcap +libcap
|
DEPENDS:=+zlib +libcap +libcap +iptables
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/tpws/description
|
define Package/tpws/description
|
||||||
@ -44,8 +44,8 @@ define Package/tpws/install
|
|||||||
$(INSTALL_BIN) ./files/zapret.init $(1)/etc/init.d/zapret
|
$(INSTALL_BIN) ./files/zapret.init $(1)/etc/init.d/zapret
|
||||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||||
$(INSTALL_DATA) ./files/zapret.hotplug $(1)/etc/hotplug.d/iface/90-zapret
|
$(INSTALL_DATA) ./files/zapret.hotplug $(1)/etc/hotplug.d/iface/90-zapret
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/opt/zapret/tpws
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tpws $(1)/usr/bin
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tpws $(1)/opt/zapret/tpws
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,tpws))
|
$(eval $(call BuildPackage,tpws))
|
||||||
|
@ -60,7 +60,7 @@ start_service()
|
|||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
|
|
||||||
procd_set_param command "/usr/bin/tpws"
|
procd_set_param command "/opt/zapret/tpws/tpws"
|
||||||
procd_append_param command "--port=$lport"
|
procd_append_param command "--port=$lport"
|
||||||
procd_append_param command "--user=nobody"
|
procd_append_param command "--user=nobody"
|
||||||
procd_append_param command "--bind-addr=$lanaddr"
|
procd_append_param command "--bind-addr=$lanaddr"
|
||||||
|
@ -185,8 +185,7 @@ start_daemons()
|
|||||||
}
|
}
|
||||||
stop_daemons()
|
stop_daemons()
|
||||||
{
|
{
|
||||||
local svc="$(basename ${basescript:-$initscript})"
|
procd_kill "$(basename ${basescript:-$initscript})" "$1"
|
||||||
procd_running "$svc" "$1" && procd_kill "$svc" "$1"
|
|
||||||
}
|
}
|
||||||
restart_daemons()
|
restart_daemons()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user