Skip to content

Instantly share code, notes, and snippets.

@zjx20
zjx20 / TIPS.md
Last active April 30, 2023 07:28 — forked from Anachron/wg_install.sh
A script to spin up a Wireguard VPN server with Unbound recursive DNS in a hurry
  • enable bbrplus on debian 9 and above

    git clone https://github.com/Xaster/bbrplus-debian.git
    cd bbrplus-debian
    # run as root
    make && make install
    
    sysctl -w net.core.default_qdisc=fq

sysctl -w net.ipv4.tcp_congestion_control=bbrplus

@zjx20
zjx20 / convert.sh
Last active May 31, 2024 23:24
Convert v2ray config.json (client side) to a subscription content
#!/bin/bash
# brew install jq
# brew install qrencode
config_file=v2rayx*.json
rss_file=rss.txt
cat $config_file | \
jq --raw-output '
@zjx20
zjx20 / multi.sh
Last active June 6, 2022 08:20
broadcast input to multiple hosts simultaneously with tmux & zsh. idea from https://www.reddit.com/r/tmux/comments/lqp9sd/send_keystrokes_to_multiple_panes_like_iterm2/
# usage: multi ssh the-host{0,1,2}
function multi {
cmd=$1
shift
if [ -z "$TMUX" ]; then
session="multi-${cmd}-$(head -c 4 /dev/urandom | base64 | tr '/+' '_-' | tr -d '=')"
tmux new -d -s "${session}"
else