国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
#!/system/bin/sh | |
set -ex | |
# ENABLE ipv4 forward | |
sysctl -w net.ipv4.ip_forward=1 | |
# DISABLE ipv6 | |
sysctl -w net.ipv6.conf.all.disable_ipv6=1 | |
sysctl -w net.ipv6.conf.default.disable_ipv6=1 |
# mihomo (Clash Meta) 懒人配置 | |
# 版本 V1.19-250408 | |
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33 | |
# https://obdo.cc/meta | |
# 作者: 笨蛋ovo (bdovo.cc) | |
# Telegram: https://t.me/baka_not_baka | |
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel | |
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta | |
# 转载请保留此注释 | |
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解 |
#!/usr/sbin/nft -f | |
## vim: ft=pf | |
flush ruleset | |
define wan = eth0 | |
define cjd = tun0 | |
define wg_int = wg0 | |
define vpn_gw = 192.168.10.1 | |
define vpn_net = 192.168.10.0/24 | |
define proto_allow = { ah, esp, igmp, ipv6 } |
# clash | |
iptables -t nat -N clash | |
iptables -t nat -A clash -p tcp -m multiport --sports 21,22,80,443,445,3389,5201,5900,5901,5902 -j RETURN | |
iptables -t nat -A clash -d 0.0.0.0/8 -j RETURN | |
iptables -t nat -A clash -d 10.0.0.0/8 -j RETURN | |
iptables -t nat -A clash -d 127.0.0.0/8 -j RETURN | |
iptables -t nat -A clash -d 169.254.0.0/16 -j RETURN | |
iptables -t nat -A clash -d 172.16.0.0/12 -j RETURN | |
iptables -t nat -A clash -d 192.168.0.0/16 -j RETURN | |
iptables -t nat -A clash -d 224.0.0.0/4 -j RETURN |
ip rule add fwmark 0x233 lookup 100 | |
ip route add local 0.0.0.0/0 dev lo table 100 |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
# https://fedoraproject.org/wiki/PackagingDrafts/Go | |
%global commit 63fe64c471e7d76be96a625350468dfc65c06c31 | |
%global shortcommit %(c=%{commit}; echo ${c:0:7}) | |
Name: example-app | |
Version: 1.0.0 | |
Release: 6%{?dist} | |
Summary: This application is an example for the golang binary RPM spec | |
License: ASL 2.0 | |
URL: http://www.example-app.io |
#!/bin/sh | |
# cross & static compile shadowsocks-libev | |
PCRE_VER=8.41 | |
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz" | |
MBEDTLS_VER=2.6.0 | |
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz" |
ssh-keygen | |
-t ed25519 - for greatest security (bits are a fixed size and -b flag will be ignored) | |
-t rsa - for greatest portability (key needs to be greater than 4096 bits) | |
-t ecdsa - faster than RSA or DSA (bits can only be 256, 284, or 521) | |
-t dsa - DEEMED INSECURE - DSA limted to 1024 bit key as specified by FIPS 186-2, No longer allowed by default in OpenSSH 7.0+ | |
-t rsa1 - DEEMED INSECURE - has weaknesses and shouldn't be used (used in protocol 1) | |
-b 4096 bit size | |
-a 500 rounds (should be no smaller than 64, result in slower passphrase verification and increased resistance to brute-force password cracking) | |
-C "[email protected]" comment.. |