Skip to content

Instantly share code, notes, and snippets.

@neontorrent
neontorrent / netcat.sh
Last active September 8, 2024 19:46 — forked from pm-hwks/netcat.sh
[Netcat network test] Netcat commands to test bandwidth between 2 linux servers #netcat #perf-test #linux #network
## Netcat server command
nc -l -p <unused port # > /dev/null
eg:
nc -l -p 1122 > /dev/null
## Netcat Client command
dd if=/dev/zero bs=100M count=1 | nc <netcat server> <netcat port>
eg:
dd if=/dev/zero bs=100M count=1 | nc 10.0.1.251 1122
@neontorrent
neontorrent / install.sh
Last active January 20, 2025 03:56
Centos 8 - tinyproxy, shadowsocks-rust
# install dependencies
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y
yum config-manager --set-enabled PowerTools
yum update
yum install tinyproxy -y
#vi /etc/tinyproxy/tinyproxy.conf
echo 'BasicAuth myuser mypassword
Allow 0.0.0.0' >> /etc/tinyproxy/tinyproxy.conf
@neontorrent
neontorrent / fix_centos_mirrorlist.sh
Last active January 12, 2025 21:34
Fix CentOS repo mirrorlist
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo
@neontorrent
neontorrent / install.sh
Created January 20, 2025 04:32
Ubuntu Tinyproxy + Shadowsocks
apt update
apt install tinyproxy
echo 'BasicAuth myuser mypassword
Allow 0.0.0.0' >> /etc/tinyproxy/tinyproxy.conf
systemctl enable tinyproxy
systemctl restart tinyproxy
systemctl status tinyproxy
FILELIST=$(curl -sL https://github.com/shadowsocks/shadowsocks-rust/releases/download/v1.22.0/shadowsocks-v1.22.0.x86_64-unknown-linux-gnu.tar.xz | tar xvJ -C /tmp)
echo "To uninstall, remove these file under /usr/bin: