- 转移配置文件目录至新目录
/usr/local/etc/v2ray
mkdir -p /usr/local/etc/v2ray
mv /etc/v2ray/config.json /usr/local/etc/v2ray/config.json
- 移除旧脚本安装的 v2ray-core(由于旧脚本停用,只能手动移除)
systemctl stop v2ray
systemctl disable v2ray
rm -f /etc/systemd/system/v2ray.service
version: '3.5' | |
services: | |
shlink-frontend: | |
image: shlinkio/shlink-web-client:stable | |
container_name: shlink-frontend | |
restart: unless-stopped | |
depends_on: | |
- shlink-backend | |
- shlink-db |
// 需要反代的地址 | |
const upstream = 'api.github.com' | |
// 反代地址的子路径 | |
const upstreamPath = '/' | |
// 反代网站的移动端域名 | |
const upstreamMobile = 'api.github.com' | |
// 是否使用 https | |
const useHttps = true |
let github2jsdelivr = (_url) => { | |
regex = {"blob": /(.+)github.com\/(.+)\/(.+)\/blob\/(.+)\/(.+)/, | |
"tree": /(.+)github.com\/(.+)\/(.+)\/blob\/(.+)\/(.+)/}; | |
if(_url.match(regex.tree)){ | |
return _url.replace(regex.tree, "$1cdn.jsdelivr.net/gh/$2/$3@$4/$5"); | |
}else if(_url.match(regex.blob)){ | |
return _url.replace(regex.blob, "$1cdn.jsdelivr.net/gh/$2/$4@$4/$5"); | |
}else{ | |
return _url; | |
} |
{ | |
"run_type": "server", | |
"local_addr": "127.0.0.1", | |
"local_port": 443, | |
"remote_addr": "1.1.1.1", | |
"remote_port": 80, | |
"log_level": 3, | |
"password": [ | |
"your_awesome_password" | |
], |
must.have.sni.com:80 { | |
redir https://must.have.sni.com{uri} | |
} | |
must.have.sni.com:8080 { | |
bind 127.0.0.1 | |
root /var/www/html | |
index index.html | |
tls off | |
} |
#!/bin/bash | |
# censys.io (https://support.censys.io/hc/en-us/articles/360038378552-Frequently-Asked-Questions) | |
echo "74.120.14.0/24" >> /tmp/cen_ips | |
echo "162.142.125.0/24" >> /tmp/cen_ips | |
echo "167.248.133.0/24" >> /tmp/cen_ips | |
echo "192.35.168.0/23" >> /tmp/cen_ips | |
for cenip in `cat /tmp/cen_ips`; do ufw deny from $cenip to any comment 'censys scanners'; done |
dd if=/dev/zero of=/swapfile bs=1024 count=1048576 # allocate space | |
chmod 600 /swapfile # set permission | |
mkswap /swapfile # make swap | |
swapon /swapfile # enable swap | |
echo "/swapfile swap swap defaults 0 0" | tee -a /etc/fstab # make swap permanent | |
sysctl -w "vm.swappiness=10" # set swap percentage | |
echo "vm.swappiness=10" | tee -a /etc/sysctl.conf # make systctl permanent |
sysctl -w "net.ipv6.conf.enp0s31f6.disable_ipv6=1" # change enp0s1f6 to your main interface i.e. eth0 | |
echo "net.ipv6.conf.enp0s31f6.disable_ipv6=1" >> /etc/sysctl.conf # save sysctl conf | |
echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf # disable ipv6 dns record |
/usr/local/etc/v2ray
mkdir -p /usr/local/etc/v2ray
mv /etc/v2ray/config.json /usr/local/etc/v2ray/config.json
systemctl stop v2ray
systemctl disable v2ray
rm -f /etc/systemd/system/v2ray.service
# -*- coding: utf-8 -*- | |
# 暴力美學 2.0 - 以空間換時間 | |
from itertools import permutations | |
candA, candB, candC = [], [], [] | |
for item in permutations(range(1,10)): | |
if(item[2] != 9): # 排除第3位是9的 | |
candA.append(item) |