passthrough

This commit is contained in:
veypi
2021-03-09 22:00:38 +08:00
parent 38c65fd5dc
commit 53b7cbe1dd
7 changed files with 298 additions and 23 deletions
+16
View File
@@ -0,0 +1,16 @@
# caddy
## caddyfile
```bash
*.nps.veypi.com:80 {
reverse_proxy 127.0.0.1:800
# or
file_server [<matcher>] [browse] {
root /
hide <files...>
index <filenames...>
browse [<template_file>]
}
}
```
+7 -16
View File
@@ -6,29 +6,20 @@
# Distributed under terms of the MIT license.
#
#!/bin/sh
LANG=""
while true
do
up_time1=`ifconfig $1 | grep "bytes" | awk '{print $6}'`
down_time1=`ifconfig $1 | grep "bytes" | awk '{print $2}'`
up_time1=`ifconfig $1 | grep "TX packets" | awk '{print $5}'`
down_time1=`ifconfig $1 | grep "RX packets" | awk '{print $5}'`
sleep 1
clear
up_time2=`ifconfig $1 | grep "bytes" | awk '{print $6}'`
down_time2=`ifconfig $1 | grep "bytes" | awk '{print $2}'`
up_time1=${up_time1}
up_time2=${up_time2}
down_time1=${down_time1}
down_time2=${down_time2}
up_time2=`ifconfig $1 | grep "TX packets" | awk '{print $5}'`
down_time2=`ifconfig $1 | grep "RX packets" | awk '{print $5}'`
up_time=`expr $up_time2 - $up_time1`
down_time=`expr $down_time2 - $down_time1`
up_time=`expr $up_time / 1024`
down_time=`expr $down_time / 1024`
echo 上传速度: $up_time kb/s
echo 下载速度: $down_time kb/s
echo 上传速度: $up_time KB/s
echo 下载速度: $down_time KB/s
done
+20
View File
@@ -0,0 +1,20 @@
# 打包系统
https://blog.csdn.net/zanj0525/article/details/79129375
https://github.com/chamuco/respin
```bash
sudo add-apt-repository ppa:sergiomejia666/respin
sudo apt-get install respin
sudo respin backup
```
2
https://www.cnblogs.com/jikexianfeng/p/6103504.html
```bash
```
+5 -5
View File
@@ -9,26 +9,26 @@ from_port=$3
to=$4
to_port=$5
if ! [ -e "$1" ]; then
if ! [ -n "$1" ]; then
echo "iptable chan not found" >&1
exit 1
fi
if ! [ -e "$2" ]; then
if ! [ -n "$2" ]; then
echo "from host not found" >&1
exit 1
fi
if ! [ -e "$3" ]; then
if ! [ -n "$3" ]; then
echo "from port not found" >&1
exit 1
fi
if ! [ -e "$4" ]; then
if ! [ -n "$4" ]; then
echo "destination host not found" >&1
exit 1
fi
if ! [ -e "$5" ]; then
if ! [ -n "$5" ]; then
echo "destination port not found" >&1
exit 1
fi