Skip to content

Instantly share code, notes, and snippets.

@stilleshan
stilleshan / acme_docker.sh
Last active October 10, 2024 04:28
基于 docker 环境 acme.sh 申请 Let's Encrypt 泛域名证书的交互式一键脚本.
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# fonts color
Green="\033[32m"
Red="\033[31m"
Yellow="\033[33m"
GreenBG="\033[42;37m"
RedBG="\033[41;37m"
@phlinhng
phlinhng / a-trojan-with-nginx-stream-module.md
Last active March 28, 2024 13:39
Trojan + NGINX 多網站共存

利用 NGINX 的 Stream 模塊 sni_preread 功能,可以做到讓 Trojan 和其他網站在同一台機器上共享 443 端口。

@menyf
menyf / elpass.md
Last active March 14, 2023 09:47
From iCloud Keychain to Elpass

从iCloud Keychain到Elpass

运行环境

  1. macOS latest
  2. Python3

准备工作

  1. 下载mrc-converter-suite并解压
@riverscn
riverscn / 北京联通IPTV内网组播.m3u
Created August 4, 2019 15:55
北京联通IPTV内网组播地址节目表(239.2.1.1网段)
#EXTM3U name="北京联通IPTV(RTP)”
#EXTINF:-1,CCTV-1高清(1)
rtp://239.2.1.129:8000
#EXTINF:-1,CCTV-2高清(2)
rtp://239.2.1.60:8084
#EXTINF:-1,CCTV-4高清(4)
rtp://239.2.1.105:8092
#EXTINF:-1,CCTV-7高清(7)
rtp://239.2.1.61:8104
#EXTINF:-1,CCTV-9高清(9)
echo "deb http://deb.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
echo "deb http://deb.debian.org/debian jessie-backports-sloppy main" >> /etc/apt/sources.list.d/jessie-backports.list
apt update
apt install shadowsocks-libev simple-obfs curl -y
cat > /etc/shadowsocks-libev/config.json <<EOF
{
"server":"0.0.0.0",
"server_port":443,
"local_port":1080,
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active November 18, 2024 13:32
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: warning, notify, info, verbose (默认值: notify)
loglevel = notify
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理
# 设置中.)
@tanb
tanb / xhyve-nextbsd-tutorial.md
Last active June 10, 2017 06:37
NextBSD running on xhyve.

NextBSD Running on Xhyve.

  _   _           _   ____ ____  ____
 | \ | | _____  _| |_| __ ) ___||  _ \
 |  \| |/ _ \ \/ / __|  _ \___ \| | | |
 | |\  |  __/>  <| |_| |_) |__) | |_| |
 |_| \_|\___/_/\_\\__|____/____/|____/

                                              ```                        `
 s` `.....---.......--.``` -/
@tanb
tanb / xhyve-freebsd-tutorial-1.md
Last active November 27, 2021 13:07
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

@Jeff2Ma
Jeff2Ma / Dorm-network.scpt
Last active August 19, 2019 05:17
Automatic proxy configuration set pac file with applescript & shell script http://devework.com/automatic-proxy-configuration-pac-applescript.html
tell application "System Events"
tell network preferences
do shell script "scselect 'Dorm'"
do shell script "sudo networksetup -setairportpower AirPort on" user name "用户名" password "密码" with administrator privileges
do shell script "open /Applications/Shad**socksX.app" user name “用户名" password "密码" with administrator privileges
end tell
end tell