!improved windrivert throughput

This commit is contained in:
nom3ad
2024-01-02 17:53:20 +05:30
committed by Brian May
parent 371258991f
commit e19fc01324
8 changed files with 81 additions and 75 deletions

View File

@ -68,6 +68,13 @@ if [[ $ssh_copy_id == true ]]; then
with_set_x ssh-copy-id -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p "$port" "$user@$host"
fi
sshuttle_bin=${sshuttle_bin:-"$(dirname "$0")/../run"}
if [[ -z $sshuttle_bin || "$sshuttle_bin" == dev ]]; then
cd "$(dirname "$0")/.."
export PYTHONPATH="."
sshuttle_bin="./run"
fi
set -x
exec "${sshuttle_bin}" -r "$user@$host:$port" --ssh-cmd "$ssh_cmd" "${args[@]}"

View File

@ -18,9 +18,6 @@ benchmark() {
local sshuttle_bin="${1?:}"
local node="${2:-'node-1'}"
echo -e "\n======== Benchmarking sshuttle: $sshuttle_bin ========"
if [[ "$sshuttle_bin" == dev ]]; then
sshuttle_bin="../run"
fi
./exec-sshuttle "$node" --sshuttle-bin="$sshuttle_bin" --listen 55771 &
sshuttle_pid=$!
trap 'kill -0 $sshuttle_pid &>/dev/null && kill -15 $sshuttle_pid' EXIT
@ -34,6 +31,6 @@ benchmark() {
if [[ "$1" ]]; then
benchmark "$1"
else
benchmark "${SSHUTTLE_BIN:-/bin/sshuttle}" node-1
benchmark "${SSHUTTLE_BIN:-sshuttle}" node-1
benchmark dev node-1
fi