0%

代理设置

正向代理

  1. squid
    1
    2
    3
    4
    5
    6
    7
    yum update -y
    yum install squid -y
    ls /etc/squid/
    vi /etc/squid/squid.conf
    systemctl status squid
    systemctl start squid
    systemctl status squid

配置文件:/etc/squid/squid.conf

1
2
3
4
5
acl all_clients src all

http_access allow all_clients

http_port 31288
  1. tinyproxy
  2. V2Ray
  3. apache httpd
  4. ccproxy
  5. stunnel
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
      yum install stunnel
    cd /etc/stunnel/
    touch stunnel.conf

    启动:stunnel
    停止:ps -ef|grep stunnel|kill


    openssl genrsa -out key.pem 2048
    openssl req -new -x509 -key key.pem -out
    openssl req -new -x509 -key key.pem -out cert.pem -days 1095
    cat key.pem cert.pem >> /etc/stunnel/stunnel.pem

配置文件:/etc/stunnel/stunnel.conf

1
2
3
4
5
6
7
8
9
10
verify = 2

CAfile = /etc/stunnel/stunnel.pem
sslVersion = all
client = no

[squid]
accept = 65501
connect = 127.0.0.1:31288
cert = /etc/stunnel/stunnel.pem

反向代理

  1. frp
  2. nginx – 正向 https 问题
  3. java – cookies问题

客户端工具

  1. clashx
  2. Shadowrocket - ios付费
  3. google chrome 插件 Proxy SwitchyOmega - 直接浏览器访问
  4. git使用方法
    1
    git clone -c http.proxy="http://ip:31228" https://blgit.rfdevx.techx/taya/backend/web-api.git
  5. stunnel
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    apt-get install stunnel
    vi /etc/default/stunnel4

    cd /etc/stunnel/
    cp /usr/share/doc/stunnel4/examples/stunnel.conf-sample stunnel.conf

    启动:stunnel
    停止:ps -ef|grep stunnel|kill

    systemctl start stunnel4

配置文件:/etc/stunnel/stunnel.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
debug = info
output = /var/log/stunnel.log

sslVersion = all

cert = /etc/stunnel/stunnel.pem
key = /etc/stunnel/stunnel.pem

[stunnel]
client = yes
accept = 22566
connect = 74.211.196.164:65011
CAfile = /etc/stunnel/stunnel.pem

参考

  1. docker 部署 squid
  2. squid + stunnel

nuxt ssr 服务端渲染

打包

1
2
3
4
yarn build
npm run build

# 生成 .output

测试

1
2
3
node .output/server/index.mjs

# 正常运行

服务器运行 pm2 多进程

在.output添加ecosystem.config.js

1
2
3
4
5
6
7
8
9
10
11
12
13
module.exports = {
apps: [
{
name: "liaoruan",
exec_mode: "cluster",
instances: "max",
script: "./server/index.mjs",
env: {
NITRO_PORT: 3000
}
}
]
};

安装pm2\部署应用

1
2
3
4
5
6
nvm list
nvm use v18.20.2
npm install -g pm2
pm2 start ecosystem.config.js
pm2 list
pm2 stop 0

参考

  1. nuxt打包部署至服务器端
  2. pm2 命令

有意思的

互联网思维话术

1
2
3
4
5
6
7
8
9
10
化缘 改叫 众筹
算命 改叫 分析师
八卦小报 改叫 自媒体
统计 改叫 大数据分析
忽悠 改叫 互联网思维
做耳机 改叫 可穿戴设备
IDC 自称 云计算
办公室出租 叫做 孵化器
放高利贷 叫做 资本运作
借钱给朋友 叫 天使投资

图片识别

软件安装

1
2
3
4
docker pull tesseractshadow/tesseract4re

保证在后端运行不会停止
docker run -itd --name ocr tesseractshadow/tesseract4re bash

操作命令

1
2
3
docker exec -it ocr bash

tesseract sfz-demo.jpg result -l chi_sim --psm 5