Reference: https://toutyrater.github.io/prep/install.html # 1. Install Install or update by script: wget https://install.direct/go.sh sudo bash go.sh Return: PORT:111 UUID:9d1712fd-f641-4be9-b2ca-99c9dc000aeb # 2. Config 2.1. WebSocket+TLS+Web Stable but not fast! Server /etc/v2ray/config.json : { "inbounds": [{ "port": 111, "listen": "127.0.0.1", "protocol": "vmess", "settings": { "clients": [ { "id": "9d1712fd-f641-4be9-b2ca-99c9dc000aeb", "level": 1, "alterId": 64 } ] }, "streamSettings": { "network": "ws", "wsSettings": { "path": "/wahaha" } } }], "outbounds": [{ "protocol": "freedom", "settings": {} }] } Client: { "inbounds": [ { "port": 1080, "listen": "127.0.0.1", "protocol": "socks", "sniffing": { "enabled": true, "destOverride": ["http", "tls"] }, "settings": { "auth": "noauth", "udp": false } } ],......
There are steps to make Hexo works well with caddy, github webhooks and service script write by python3.
Why not nginx, because I know well about it, I think, and now I want to try caddy.
Why not git to deploy it? This is the way to use git for deployment. But it was outdated or I think, use webhooks and caddy maybe the pop and better way than that.
This is not as common use for webhooks, the main idear for easy to write hexo blog is follow:
One github’s repository cloned at your local system: Only write your md files at there. Two folders at VPS to clone your md files and generate by hexo for deploy.
Advantage: Write blog so easy, just write down and push to github. Generate at server, so you never need install hexo to your local system, so you can write and push anywhere have git installed Generate at server, so it will stable and faster than local.
Disadvantage: Many settings and preparations at VPS.
My System environment:
- Local: Windows 10
- VPS: Ubuntu 18.04 LTS
OK, let’s GO!
Outline:
- Preparation for your host: git
- Preparation for your VPS: git, Node.js, Hexo, webhook scripts
- Install and config Caddy to your VPS
1. 服务器环境
系统:CentOS 7.6 防火墙:firewalld
1.1. 防火墙配置
此防火墙为 CentOS 7.6 自带自启动,默认没有任何通路出去,你只能从外面ping的通,ssh连接,其他什么也做不了。
下面我们开放两个端口,一个是 80/TCP ,一个是自定义的ssh连接端口 123/TCP.
Run:
$ firewall-cmd --permanent --add-port=80/tcp
$ firewall-cmd --permanent --add-port=123/tcp
- firewall-cmd:是Linux提供的操作firewall的一个工具;
- –permanent:表示设置为持久;
- –add-port:标识添加的端口;
- –zone=public:指定的zone为public(不加此参数默认都是添加到这里).
默认的,通过命令行添加的规则会添加到文件: /etc/firewalld/zones/public.xml .
You can download logParser from microsoft : https://www.microsoft.com/en-us/download/confirmation.aspx?id=24659 # 1. In short, run: LogParser "select [#Fields: date-time] as date, sender-address, recipient-address, recipient-count, return-path, client-hostname, client-ip, server-hostname, server-ip, original-client-ip, original-server-ip, event-id, total-bytes, connector-id, message-subject, source into C:\ExChange\log_all\result.csv from C:\ExChange\log_all\MessageTracking\*.LOG" -i:CSV -headerRow:on -nSkipLines:4 code above can export all logs to one csv file. -nSkipLines:4 : filter 4 lines at begin.the log files’ first 4 lines is the head of file,no need for export. [#Fields: date-time] as date : style like #Fields: date-time is complex title for csv, make it like [#Fields: date-time] can get the true info from log files. # 2.......