$ docker run --rm -it -v $PWD:/tmp golang:1.23
>>> version=1.9.2
>>> go install github.com/Jigsaw-Code/outline-ss-server/cmd/outline-ss-server@v$version
>>> cd /go/pkg/mod/github.com/\!jigsaw-\!code/outline-ss-server@v$version/cmd/outline-ss-server
>>> sed -i '90s@^@\tslog.LogAttrs(nil, slog.LevelInfo, "TCP: Found client.", slog.String("ID", entry.ID), slog.String("IP", clientIP.String()))@' ../../service/tcp.go
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
[Interface] | |
PrivateKey = ****** | |
Address = 192.168.x.x/24 | |
DNS = 8.8.x.x | |
[Peer] | |
PublicKey = ****** | |
AllowedIPs = 192.168.x.0/24, 8.8.0.0/16 | |
Endpoint = x.x.x.x:51820 | |
PersistentKeepalive = 25 |
I hereby claim:
- I am vimagick on github.
- I am vimagick (https://keybase.io/vimagick) on keybase.
- I have a public key ASCYaaWA0pKAzSqUKYQZKKaFXfQ0OjjeNwQy1sScAWSuKQo
To claim this, I am signing this object:
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
function FindProxyForURL(url, host) { | |
return "DIRECT"; | |
} |
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/sh | |
WG_HOSTS="192.168.X.1 192.168.Y.1 192.168.Z.1" | |
WG_IFACE=wg | |
for host in $WG_HOSTS; do | |
ping -q -W 1 -i 2 -c 3 $host || { ifup $WG_IFACE; break; } | |
done |
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 | |
# enable ip forwarding | |
sudo sysctl -w net.inet.ip.forwarding=1 | |
# disable pf firewall | |
sudo pfctl -d | |
# flush nat rules | |
sudo pfctl -F nat |
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 | |
CONTAINER_NAME=${1:?container name is empty} | |
NETWORK_MODE=$(docker inspect -f "{{.HostConfig.NetworkMode}}" $CONTAINER_NAME) | |
STATE_PID=$(docker inspect --format '{{.State.Pid}}' $CONTAINER_NAME) | |
VETH_NAME= | |
if [[ $NETWORK_MODE = "host" ]]; then | |
VETH_NAME="host" | |
else |
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
#!/usr/local/bin/bash | |
# | |
# Background Music / Sound Effects Downloader | |
# | |
BASE_URL=https://www.tukuppt.com | |
IDX_URL=$BASE_URL/peiyueso/shipin5097/__zonghe_0_0_0_0_0_0_%d.html | |
#IDX_URL=$BASE_URL/yinxiaomuban/shipin/__zonghe_0_0_0_0_0_0_%d.html | |
API_URL=$BASE_URL/api/audio | |
TOTAL_PAGES=46 |
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
#!/usr/bin/env python3 | |
# | |
# CIDR calculator: find the minimum CIDR which contains multiple ip addresses | |
# | |
# Example: | |
# $ cidr 142.250.66.78 142.250.204.142 142.251.130.14 | |
# 142.250.0.0/15 | |
# | |
import os |
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 | |
yq -o json | jq -r ' | |
.proxies[] | | |
if .type == "ss" then | |
(["ss://", ("\(.cipher):\(.password)"|@base64), "@\(.server):\(.port)"] | join("")) | |
elif .type == "vmess" then | |
({v:"2", ps:.name, add:.server, port:.port, id:.uuid, aid:.alterId, scy:.cipher, net:.network, host:.["ws-opts"].headers.Host, path:.["ws-opts"].path, tls:(if .tls then "tls" else "" end)} | "vmess://\(.|@json|@base64)") | |
elif .type == "trojan" then | |
("trojan://\(.password)@\(.server):\(.port)?sni=\(.sni)&allowInsecure=1" + (if .network == "ws" then "&type=\(.network)&path=\(.["ws-opts"].path)" else "" end)) |
NewerOlder