tools

typora

Draw Diagrams

Draw Diagrams With Markdown

epy

epub reader on terminal

  • epy /path/to/your/book/book.epub (Remember to make sure your book’s title doesn’t contain any spaces)
  • c Switching the color profile
  • Shift + h Previous chapter
  • Shift + l Next chapter
  • Shift + g Skip to the end of the chapter
  • g Skip to the beginning of the chapter
  • Shift + m Show metadata of the book
  • t Table of contents
  • / Search
  • b Add bookmark
  • Shift + b Show bookmarks
  • q Quit
  • - Shrink the text
  • + Enlarge the text
  • o Open an image
  • s Show or hide progress

mihomo

https://github.com/MetaCubeX/mihomo

config

config file

vim ~/.config/mihomo/config.yaml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
mixed-port: 17890
allow-lan: false # Set to true if you want other devices on your local network to use this proxy
mode: rule

external-controller: 0.0.0.0:19093

dns:
enable: true
listen: 0.0.0.0:1053
ipv6: false
default-nameserver:
- 223.5.5.5
- 8.8.8.8
nameserver:
- 1.1.1.1
- 8.8.8.8

proxy-providers:
my-ssr-sub:
type: http
url: "https://xxx"
path: ./proxy_providers/my-ssr-sub.yaml
interval: 86400 # Auto-update interval in seconds (e.g., once a day)
exclude-filter: "网址|剩余|过期|回家"
health-check:
enable: true
url: https://www.gstatic.com/generate_204
interval: 300 # Test node latency every 5 minutes
timeout: 5000

proxy-groups:
- name: "Proxy"
type: url-test
use:
- my-ssr-sub
url: "https://www.gstatic.com/generate_204" # Required for url-test
interval: 300 # Tests ping every 5 minutes
tolerance: 50 # Prevents constant switching

rules:
- GEOIP,LAN,DIRECT # Bypass local network
- GEOIP,CN,DIRECT # Bypass Chinese IPs (change CN to your country code if needed)
- MATCH,Proxy # Route everything else to the "Proxy" group

dict file

1
2
3
4
cd ~/.config/mihomo

wget -O Country.mmdb "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/country.mmdb"
wget -O geoip.dat "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat"

startup

1
nohup ./mihomo  -d ~/.config/mihomo 2>&1 &

usage

1
2
3
4
export http_proxy="http://127.0.0.1:17890"
export https_proxy="http://127.0.0.1:17890"

http_proxy="http://127.0.0.1:17890" https_proxy="http://127.0.0.1:17890" xxx

command

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# check active node
curl -s http://127.0.0.1:19093/proxies/Proxy | jq -r '.now'
or
curl -s http://127.0.0.1:19093/proxies/Proxy | grep -o '"now":"[^"]*"'

# switch node
curl -X PUT http://127.0.0.1:19093/proxies/Proxy \
-H "Content-Type: application/json" \
-d '{"name": "V4-韩国02|NF "}' # 注意NF后面可能有个空格

# test
curl -I -v -x http://127.0.0.1:17890 https://github.com

# update subcribe nodes
curl -X PUT http://127.0.0.1:19093/providers/proxies/my-ssr-sub