服务器的网络至少要能顺畅地访问 Nix Cache(https://cache.nixos.org), 大部分用作代理的(中国境外的)服务器通常都没有问题。
This file contains hidden or 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 | |
| set -e | |
| has_command() { | |
| local _command=$1 | |
| type -P "$_command" > /dev/null 2>&1 | |
| } |
This file contains hidden or 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 | |
| # nftables-apply -- a safer way to update nftables remotely | |
| # | |
| # Usage: | |
| # nftables-apply [-hV] [-t timeout] [-w savefile] {[rulesfile]|-c [runcmd]} | |
| # | |
| # Versions: | |
| # * 1.0 Copyright 2006 Martin F. Krafft <madduck@madduck.net> | |
| # Original version | |
| # * 1.1 Copyright 2010 GW <gw.2010@tnode.com or http://gw.tnode.com/> |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Fuck arm64/amd64 | |
| // @namespace https://haruue.net/ | |
| // @version 1.0 | |
| // @description 将网页中容易混淆的架构名替换为不易混淆的名称:amd64 → x86-64,arm64 → aarch64 | |
| // @author haruue | |
| // @match *://*/* | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or 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
| { | |
| "log": {}, | |
| "inbounds": [ | |
| { | |
| "protocol": "dokodemo-door", | |
| "listen": "10.11.5.2", | |
| "port": 80, | |
| "settings": { | |
| "address": "255.255.255.254", | |
| "port": 80, |
This file contains hidden or 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
| import sys | |
| import socket | |
| import ipaddress | |
| def csum_add(csum, addend): | |
| csum += addend | |
| if csum > 0xFFFF: | |
| return (csum&0xFFFF) + 1 | |
| return csum & 0xFFFF |
This file contains hidden or 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
| { stdenv, lib, linuxPackages, kernel ? linuxPackages.kernel, kmod }: | |
| let | |
| kbuilddir = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; | |
| in | |
| stdenv.mkDerivation rec { | |
| name = "xtables-addons-kmod-${version}-${kernel.version}"; | |
| version = "3.24"; | |
| src = fetchTarball { |
This file contains hidden or 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
| define hn2_pl_bogons_v4 = [ | |
| 0.0.0.0/8+, # RFC 1122 'this' network | |
| 10.0.0.0/8+, # RFC 1918 private space | |
| 100.64.0.0/10+, # RFC 6598 Carrier grade nat space | |
| 127.0.0.0/8+, # RFC 1122 localhost | |
| 169.254.0.0/16+, # RFC 3927 link local | |
| 172.16.0.0/12+, # RFC 1918 private space | |
| 192.0.2.0/24+, # RFC 5737 TEST-NET-1 | |
| 192.88.99.0/24+, # RFC 7526 deprecated 6to4 relay anycast | |
| 192.168.0.0/16+, # RFC 1918 private space |
I hereby claim:
- I am haruue on github.
- I am haruue (https://keybase.io/haruue) on keybase.
- I have a public key whose fingerprint is 8E5F CFA4 78CC 95E0 73E1 1FC1 28D3 B779 3561 6774
To claim this, I am signing this object:
NewerOlder