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 | |
# china_ip_list.txt from https://github.com/17mon/china_ip_list | |
set -x | |
chnroute_file=./china_ip_list/china_ip_list.txt | |
src_addr=192.168.100.1/24 | |
gamesrc_addr=192.168.200.1/24 | |
game_port=1082 | |
local_port=1081 | |
clash_dns_port=1053 |
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 | |
set -e | |
[[ $UID != 0 ]] && exec sudo -E "$(readlink -f "$0")" "$@" | |
up() { | |
# setup wg0 | |
ip link add dev wg0 type wireguard | |
ip addr add dev wg0 10.0.200.13/32 | |
wg setconf wg0 /etc/wireguard/wg0.conf |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Curve</title> | |
<script defer> | |
//弧长c 拱高h - 半径r 弦长l | |
// 圆心角a | |
function calcR1(h, l) { | |
const r = ( Math.pow(h,2) + Math.pow((l/2),2) )/ 2/h; | |
const a = 2 * Math.asin( l / 2 / h ); |