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
| #!/usr/bin/bash | |
| CIDR_LIST=${CIDR_LIST:-} | |
| CIDR_URL=${CIDR_URL:-"https://www.cloudflare.com/ips-v4"} | |
| fping_shuf= | |
| fping_interval=1 | |
| fping_count=3 | |
| fping_period=1000 | |
| st_url=https://speed.cloudflare.com/__down?bytes=125000000 |
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
| #tempory hosts set for one comdline | |
| #为一行命令设置设置一个临时的指向sni服务器的hosts | |
| #example: | |
| # tmphosts wwww.github.com curl https://www.github.com | |
| function tmphosts(){ | |
| local sni_ip="192.168.2.254" | |
| # create temporary file | |
| # https://unix.stackexchange.com/questions/181937/how-create-a-temporary-file-in-shell-script | |
| tmpfile=$(mktemp /tmp/abc-script.XXXXXX) | |
| exec 3>"$tmpfile" |
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
| function add-bom(){ | |
| [ -z "$1" ] && echo "need filename" && return 1 | |
| printf '\xEF\xBB\xBF' > $1.tmp | |
| cat $1 >> $1.tmp | |
| mv $1.tmp $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
| <plugin> | |
| <artifactId>maven-resources-plugin</artifactId> | |
| <version>3.1.0</version> | |
| <executions> | |
| <execution> | |
| <id>copy-resource-one</id> | |
| <phase>install</phase> | |
| <goals> | |
| <goal>copy-resources</goal> | |
| </goals> |