This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
youtube-dl -f bestaudio -x --audio-format mp3 --audio-quality 0 $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Build OpenResty Nginx from Sourcecode on Debian 11/10 (support brotil) | |
# | |
set -x | |
set -e | |
ENV_OPENSSLVER=1.1.1m | |
ENV_OPENRESTYVER=1.19.9.1 | |
apt update -y | |
apt install -y build-essential git wget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
서론 | |
windows + 파이선 = 똥 | |
리눅스 + 데스크탑환경 = 똥 | |
windows + wsl = wsl에 gui가없다 | |
해결방안 | |
windows desktop을 gui server로 쓰고 wsl에서 gui server에 요청 | |
python명령은 windows desktop에서 wsl로 (vscode 플러그인) | |
구축 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# WARNING: | |
# 방화벽 기능으로 주로 사용하는 filter 테이블의 INPUT 체인보다 PREROUTING이 상위 체인이기 때문에 포워딩 룰에 대해서 방화벽의 룰이 무효합니다. | |
# mangle 테이블을 사용하거나 raw 테이블을 사용해야합니다. | |
# | |
WAN_INTERFACE=eth0 | |
WAN_IPADDRESS=198.51.100.35 | |
WAN_INBOUND_PORT=63389 | |
LAN_NETWORK=192.168.0.0/16 | |
LAN_REAL_IPADDRESS=192.168.201.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
apt install -y golang git | |
go get github.com/path-network/go-mmproxy | |
mkdir -p /svc/mmproxy | |
cp $HOME/go/bin/go-mmproxy /svc/mmproxy/ | |
cat > /svc/mmproxy/path-prefixes.txt << _ | |
127.0.0.0/8 | |
10.0.0.0/8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
set -e | |
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates | |
wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add - | |
# x86_64, amd64 | |
codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release` | |
echo "deb http://openresty.org/package/debian $codename openresty" | sudo tee /etc/apt/sources.list.d/openresty.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Usage: ./bulk-command-remote.bash file <run_local_script.bash> | |
# ./bulk-command-remote.bash ping -c 1 8.8.8.8 | |
# | |
key=~/private.key | |
default_username="ubuntu" | |
# "IP" "SSH-Port" "Username" | |
declare -a serverlist=( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COOKIEJAR1='./tmp_cookie.tmp' | |
rm -f $COOKIEJAR1 | |
touch $COOKIEJAR1 | |
if [ "$?" -ne 0 ]; then | |
echo "uanble to access $COOKIEJAR1 file." | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const snireader = (buffer) => { | |
let pos = 0; | |
if (buffer[pos] !== 0x16) { | |
// SNI: Handshake | |
return; | |
} | |
if (buffer[pos = pos + 5] !== 0x01) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INTERFACE="hev6_tunnel" | |
SERVERv4_ADDRESS="216.218.226.238" | |
CLIENTv4_ADDRESS="198.51.100.69" | |
# Server Tunnel Address for route; Do not enter a prefix here | |
SERVERv6_TUNADDRESS="2001:470:6969::1" | |
# Client Tunnel Address; you must have to define a prefix | |
CLIENTv6_TUNADDRESS="2001:470:6969::2/64" |