Skip to content

Instantly share code, notes, and snippets.

View NNdroid's full-sized avatar
🎯
Focusing

NNdroid

🎯
Focusing
View GitHub Profile
@NNdroid
NNdroid / 0-go-os-arch.md
Created December 22, 2022 00:36 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@NNdroid
NNdroid / realtimetrafficd-install.sh
Created December 22, 2022 00:37
simply to install realtimetrafficd
#!/bin/bash
DOWNLOAD_URL="https://github.com/longsleep/realtimetraffic/releases/download/v0.2.0/realtimetrafficd-v0.2.0_amd64"
BIN_DST_DIR=/usr/local/bin
RUNNING_LISTENER=0.0.0.0:8006
function check_error() {
if [ $? == 1 ]; then
echo $1
exit 1
fi
www.nndroid.com {
tls it@nndroid.com
@ws {
path /path
header Connection *Upgrade*
header Upgrade websocket
}
reverse_proxy @ws [2001:b030:a42d:5d04::]:20629
}
#!/bin/bash
RELEASE_API="https://api.github.com/repos/net-byte/vtun/releases/latest"
BIN_DST_DIR=/usr/local/bin
RESOURCE_DST_DIR=/usr/local/etc/vtun
CIDR_V4="192.168.90.0/24"
CIDR_V6="fced:9999::/64"
SIP_V4="192.168.90.1"
SIP_V6="fced:9999::1"
RUNNING_LISTENER=":443"
DEFAULT_KEY="defaultkey"
@NNdroid
NNdroid / balance.go
Created May 30, 2023 00:03 — forked from darkhelmet/balance.go
Simple TCP load balancer in Go.
package main
import (
"flag"
"io"
"log"
"net"
"strings"
)
#!/bin/bash
PROXY=""
RELEASE_API="https://api.github.com/repos/librespeed/speedtest-go/releases/latest"
BIN_DST_DIR=/usr/local/bin
RESOURCE_DST_DIR=/usr/local/etc/speedtest-backend
function getReleaseInfo() {
response=$(curl ${RELEASE_API})
if [ $? == 0 ]; then
echo $response
#remove local 53 service
rm -rf /etc/resolv.conf
ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
sed -i 's/#DNS=/DNS=9.9.9.9/; s/#DNSStubListener=yes/DNSStubListener=no/' /etc/systemd/resolved.conf
systemctl restart systemd-resolved
#install yggdrasil
wget -O yggdrasil.deb https://github.com/yggdrasil-network/yggdrasil-go/releases/download/v0.4.7/yggdrasil-0.4.7-amd64.deb
dpkg -i yggdrasil.deb
sed -i 's#^ Peers.*$# Peer\s\: \[\n tl\s\:\/\/supergay.network:443\n \]#g' /etc/yggdrasil.conf
sed -i 's/IfName: auto/IfName: ygg0/g' /etc/yggdrasil.conf
@NNdroid
NNdroid / sniproxy-installer.sh
Created June 7, 2023 12:40
sniproxy installer
#!/bin/bash
RELEASE_API="https://api.github.com/repos/XIU2/SNIProxy/releases/latest"
BIN_DST_DIR=/usr/local/bin
RESOURCE_DST_DIR=/usr/local/etc/sniproxy
function getReleaseInfo() {
response=$(curl ${RELEASE_API})
if [ $? == 0 ]; then
echo $response
return 0
@NNdroid
NNdroid / hev-socks5-server-installer.sh
Last active January 16, 2026 22:00
hev-socks5-server installer
#!/bin/bash
RELEASE_API="https://api.github.com/repos/heiher/hev-socks5-server/releases/latest"
BIN_DST_DIR=/usr/local/bin
RESOURCE_DST_DIR=/usr/local/etc/hev-socks5-server
function getReleaseInfo() {
response=$(curl ${RELEASE_API})
if [ $? == 0 ]; then
echo $response
return 0
@NNdroid
NNdroid / hev-socks5-tunnel-installer.sh
Created July 6, 2023 07:41
hev-socks5-tunnel installer
#!/bin/bash
RELEASE_API="https://api.github.com/repos/heiher/hev-socks5-tunnel/releases/latest"
BIN_DST_DIR=/usr/local/bin
RESOURCE_DST_DIR=/usr/local/etc/hev-socks5-tunnel
function getReleaseInfo() {
response=$(curl ${RELEASE_API})
if [ $? == 0 ]; then
echo $response
return 0