Joyber 发布的文章

MaxScale 出手于 MariaDB 开源社区,品质有保障,以下配置摘自6.4.0版本,此版本与网上搜索得到的文章中的配置2.X版本,有很大的区别,且我没有找到可以在重启前进行配置检查的方法,重启不成功则服务就停了,尬

使用maxscale前先搭建好数据库主从复制服务,数据库同步复制正常。
配置生成工具https://sc.toolnb.com/tools/mysqlslave.html
主从复制错误修复工具:https://github.com/hcymysql/pt-slave-repair

如果在使用读写分离时,主库也想参与读查询,需要使用 master_accept_reads=true (允许使用主服务器进行读取,默认是false)

读写分离模块的文档参考:https://mariadb.com/kb/en/mariadb-maxscale-6-readwritesplit

# MaxScale documentation:
# https://mariadb.com/kb/en/mariadb-maxscale-6/

# Global parameters
#
# Complete list of configuration options:
# https://mariadb.com/kb/en/mariadb-maxscale-6-mariadb-maxscale-configuration-guide/

[maxscale]
threads=auto

# Server definitions
#
# Set the address of the server to the network
# address of a MariaDB server.
#

[server1]
type=server
address=172.19.0.10
port=3306
protocol=MariaDBBackend

[server2]
type=server
address=172.19.0.14
port=3306
protocol=MariaDBBackend

[server3]
type=server
address=172.19.0.15
port=3306
protocol=MariaDBBackend

# Monitor for the servers
#
# This will keep MaxScale aware of the state of the servers.
# MariaDB Monitor documentation:
# https://mariadb.com/kb/en/maxscale-6-monitors/

[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=server1,server2,server3
#servers=server1
user=scalemon
password=rseEk2zHc2nFTEz7
monitor_interval=2000


# Service definitions
#
# Service Definition for a read-only service and
# a read/write splitting service.
#

# ReadConnRoute documentation:
# https://mariadb.com/kb/en/mariadb-maxscale-6-readconnroute/

#[Read-Only-Service]
#type=service
#router=readconnroute
#servers=server1
#user=maxscale
#password=maxscale
#router_options=slave

# ReadWriteSplit documentation:
# https://mariadb.com/kb/en/mariadb-maxscale-6-readwritesplit/

[Read-Write-Service]
type=service
router=readwritesplit
servers=server1,server2,server3
user=teaidata
password=rseEk2zHc2nFTEz7
#允许使用主服务器进行读取
master_accept_reads=true

# Listener definitions for the services
#
# These listeners represent the ports the
# services will listen on.
#

#[Read-Only-Listener]
#type=listener
#service=Read-Only-Service
#protocol=MariaDBClient
#port=4008

[Read-Write-Listener]
type=listener
service=Read-Write-Service
protocol=MariaDBClient
port=4006
address=0.0.0.0

官方网址:https://lnmp.org

LNMP一键安装包是一个用Linux Shell编写的可以为CentOS/RHEL/Fedora/Debian/Ubuntu/Raspbian/Deepin/Alibaba/Amazon/Mint/Oracle/Rocky/Alma/Kali/UOS/银河麒麟/openEuler/Anolis OS Linux VPS或独立主机安装LNMP(Nginx/MySQL/PHP)、LNMPA(Nginx/MySQL/PHP/Apache)、LAMP(Apache/MySQL/PHP)生产环境的Shell程序。
安装包集成了一些维护工具,比如切分nginx日志文件的脚本等,本文主要是作者收藏之用

LNMP一键安装包 V1.9正式版
主要增加了对rocky linux 、alma linux、CentOS Stream 9及国产Linux(UOS统信、银河麒麟、华为openEuler、龙蜥Anolis OS)的支持;增加了exif、fileinfo、ldap、bz2、sodium、imap和swoole PHP模块选项,安装前可通过修改lnmp.conf中的对应选项的值为y开启或安装完成后./addons.sh 进行单独安装。增加了MySQL 5.7、8.0 二进制安装选项;增加了目前最新版的PHP 8.1支持及PHP扩展组件对8.1的支持;lnmp.conf增加了nginx模块ngx_fancyindex安装选项;lnmp管理脚本增加301选项及IPv6开启选项,泛域名SSL证书增加ZeroSSL免费SSL选项及一些安装代码优化。

安装教程:https://lnmp.org/install.html
问题反馈及使用交流论坛:https://bbs.vpser.net/forum-25-1.html
打赏捐赠:https://lnmp.org/donation.html

V1.9正式版更新记录

增加rocky linux 和alma linux支持;
增加PHP 8.1支持;
增加PHP模块exif、fileinfo、ldap、bz2、sodium、imap、swoole和SourceGuardian Loader的支持安装,安装lnmp前lnmp.conf 中开启后安装lnmp或 ./addons.sh 安装以上模块;
增加ngx_fancyindex模块,lnmp.conf中开启后,安装lnmp或升级nginx;
增加nginx模块--with-stream_ssl_preread_module,方便使用stream ssl相关配置;
增加UOS统信桌面家庭版、桌面专业版、服务器版支持;
增加银河麒麟服务器操作系统和桌面系统支持;
增加华为openEuler支持;
增加阿里巴巴龙蜥Anolis OS支持;
增加CentOS Stream 9支持;
增加Alma Linux 9支持;
增加MySQL 5.7、8.0 二进制安装和升级方式;
增加PHP 7.4+ webp支持;
lnmp管理脚本增加HTTP 301跳转HTTPS的选项;
lnmp管理脚本增加是否启用IPv6选项;
移除mariadb 10.1, 10.2增加mariadb 10.5, 10.6;
泛域名SSL增加了ZeroSSL支持;
优化AlibabaCloud支持;
优化部分SSL添加代码;
优化FTP用户添加部分代码;
优化离线安装;
优化部分EOL Linux发行版的安装;
优化OpenSSL支持;
优化RHEL 9系下uw-imap支持情况;
调整MariaDB升级下载地址;
更新诸多软件版本;
其他一些功能优化及调整......

protected/config/main.php

...
    'components' => array(

        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
                array( // configuration for the toolbar
                    'class'=>'CFileLogRoute',
                    'levels' => 'trace',
                    'categories' => 'system.db.*',          #只是显示关于数据库信息
                    'logFile'=>'db.log',
                ),
            ),
        ),
),
...

方法已失效,仅作笔记

获取用户主页数据,更换 sec_uid 参数即可,sec_uid PC版用户主页链接中也有
https://www.douyin.com/user/MS4wLjABAAAAM_k4ZhuDZ1k-nT1EXml5moYfsAYsC5U2xpdTDmgO8Io

https://www.iesdouyin.com/web/api/v2/aweme/post/?sec_uid=MS4wLjABAAAAFTNkHANuPtZKteVQsBaMwaIHoSMh3nxqJDOXEDHUnlg&count=21&max_cursor=0&aid=1128&_signature=fJp6thAXIkOb7YKwZF36KXyaeq&dytk=fd2ba6076e7bb73e31504e51bc4baf08

获取视频数据,只需要替换 item_ids 参数即可,item_ids 是视频ID,分享链接中可获得

https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=7108929990414044447

拿到水印视频地址后,把playwm换成play即为无水印地址

以视频https://v.douyin.com/JTBpb4L/为例
1.直接访问获得原始链接https://www.iesdouyin.com/share/video/6925270560700108032/?region=CN&mid=……(url中无关内容已省略)
2.取出videoID 6925270560700108032
3.拼接地址 https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=6925270560700108032 访问后得到json
4.json中'item_list''video''url_list'为有水印地址 https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0d00f7b0000c0do1njj3ie1jhkhicfg&ratio=720p&line=0
5.将有水印地址中的playwm替换为play 即https://aweme.snssdk.com/aweme/v1/play/?video_id=v0d00f7b0000c0do1njj3ie1jhkhicfg&ratio=720p&line=0

本文是转自网络文章,仅用于本人笔记使用:
原文链接:https://blog.csdn.net/weixin_43376602/article/details/102745050

Fiddler手机APP抓包及无法连接网络问题处理
fiddler配置过程
Android手机抓包配置
iOS手机抓包配置
解决fiddler在抓手机APP包的时候连不上网或者网络很慢
解决安卓7.0以上免root抓包
fiddler配置过程
点击Tools->Options->Connections

点击Tools->Options->HTTPS

重启fiddler
确保防火墙允许fiddler进程可以远程连接
手机设备(IOS或Android设备)连接WiFi,需和fiddler在同一个局域网内
Android手机抓包配置
打开设置>WLAN>连接上的WLAN设置>点击代理>手动>设置主机名为fiddler所在的主机的IP(可通过cmd查看),端口为fiddler监听端口(一般为8888)

iOS手机抓包配置
打开设置>WLAN>连接上的WLAN设置>点击代理>手动>设置主机名为fiddler所在的主机的IP(可通过cmd查看),端口为fiddler监听端口(一般为8888)

备注:手机和fiddler所在的主机需要在同一局域网内;测试结束记得关闭代理,否则手机无法上网

解决fiddler在抓手机APP包的时候连不上网或者网络很慢
打开rules->customize rules搜Lavender,然后在下一行中添加代码即可:

if (oSession.host.toLowerCase() == "webserver:8888")
oSession.host = "webserver:80";
1
2

备注:如果影响到电脑的抓包网速,可以选择删除,在需要手机抓包的时候再添加进去

解决安卓7.0以上免root抓包
在安卓手机端下载virtualxposed软件
v0.18.2版本的下载链接:http://m.k73.com/down/android/555129.html

使用教程:
1、下载 VirtualXposed 安装包,安装到手机。

2、安装成功后打开 VirtualXposed,添加应用,安装要使用的APP,以及相应的Xposed模块即可。

3、新安装包在安装的过程中,选择VirtualXposed安装。

4、无需手机root,但每次打开都需要在VirtualXposed APP内打开应用才能生效!