海运的博客

ubuntu编译红米ax6000/360 t7闭源驱动immortalwrt固件

发布时间:October 9, 2023 // 分类: // No Comments

编译环境:

apt install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev ncurses-term zlib1g-dev gawk

使用普通用户编译:

useradd -m -s /bin/bash openwrt
su -l openwrt
git clone --single-branch --depth=1 https://github.com/hanwckf/immortalwrt-mt798x.git
cd immortalwrt-mt798x
./scripts/feeds update -a
./scripts/feeds install -a
cp defconfig/mt7986-ax6000.config .config
#t7
#cp defconfig/mt7981-ax3000.config .config
make menuconfig
make -j 2

替换iproute2及添加mdns-repeater:

cd
git clone --single-branch --depth=1 https://github.com/immortalwrt/immortalwrt.git
git clone --single-branch --depth=1 https://github.com/immortalwrt/packages.git
mv immortalwrt-mt798x/package/network/utils/iproute2 ./
mv immortalwrt/package/network/utils/iproute2 immortalwrt-mt798x/package/network/utils/
mv packages/net/mdns-repeater immortalwrt-mt798x/package/network/

此内容被密码保护

发布时间:October 7, 2023 // 分类: // No Comments

请输入密码访问

安装onlyoffice

发布时间:September 3, 2023 // 分类: // No Comments

docker run -i -t -d -p 80:80 --name onlyoffice --restart=always -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice  onlyoffice/documentserver
docker exec onlyoffice sudo supervisorctl start ds:example
docker exec onlyoffice sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf
docker stop onlyoffice 
docker start onlyoffice 

nginx前端:

upstream docservice {
  server 192.168.1.2:80;
}
map $http_upgrade $proxy_connection {
  default upgrade;
  "" close;
}

server {
  listen 0.0.0.0:80;
  listen [::]:80;
  server_name office.haiyun.me;
  server_tokens off;
  return 301 https://$server_name$request_uri;
}

server {
  listen 0.0.0.0:443 ssl;
  listen [::]:443 ssl;
  server_name office.haiyun.me;
  server_tokens off;
  root /usr/share/nginx/html;

  ssl_certificate /var/acme/haiyun.me_ecc/fullchain.cer;
  ssl_certificate_key /var/acme/haiyun.me_ecc/haiyun.me.key;
  ssl_trusted_certificate /var/acme/haiyun.me_ecc/ca.cer;
  ssl_verify_client off;
  ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
  ssl_session_cache  builtin:1000  shared:SSL:10m;
  ssl_prefer_server_ciphers   on;

  add_header X-Content-Type-Options nosniff;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $proxy_connection;
  proxy_set_header X-Forwarded-Host $http_host;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  location ~ ^/$ {
    return 301 https://$server_name/example/?lang=zh;
  }
  location / {
    proxy_pass http://docservice;
    proxy_http_version 1.1;
  }
  access_log /run/log/nginx/office.haiyun.me.log ssl;
  error_log  /run/log/nginx/office.haiyun.me_error.log;
}

ssh生成/转换私钥格式及openssl使用ssh证书rsa非对称加解密文件

发布时间:August 5, 2023 // 分类: // No Comments

ssh生成私钥格式可选择PKCS8/PEM/SSH2,使用ssh-keygen生成PEM格式私钥:

ssh-keygen -t rsa -P "passwd" -b 4096 -C Haiyun -m PEM -f ~/.ssh/id_rsa

转换私钥格式为PKCS8或SSH2:

ssh-keygen -P "passwd" -N "passwd" -e -p -m PKCS8 -f ~/.ssh/id_rsa
ssh-keygen -P "passwd" -N "passwd" -e -p -m SSH2 -f ~/.ssh/id_rsa

从ssh私钥生成openssl可识别的公钥:

ssh-keygen -e -m PKCS8 -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub.pkcs8
openssl rsa -in ~/.ssh/id_rsa -pubout -outform PEM > ~/.ssh/id_rsa.pub.pkcs8

openssl使用公私钥加解密:

openssl rsautl -encrypt -pubin -inkey ~/.ssh/id_rsa.pub.pkcs8 -ssl -in test.txt -out test.enc
openssl rsautl -decrypt -inkey ~/.ssh/id_rsa -in test.enc -out test.dec

ubuntu/debian禁用qemu-guest-agent

发布时间:August 4, 2023 // 分类: // No Comments

删除qemu-guest-agent软件包:

systemctl stop qemu-guest-agent     
apt-get autoremove --purge qemu-guest-agent -y 

qemu-guest-agent通过virtio_console内核模块建立的虚拟设备和服务器交互:

/dev/virtio-ports/org.qemu.guest_agent.0
/dev/vport1p1

卸载并禁用virtio_console模块:

rmmod virtio_console 
echo "blacklist virtio_console" >> /etc/modprobe.d/blacklist.conf
分类
最新文章
最近回复
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...
  • jiangker: good, very helpful to me
  • fengfeng: N1 armbian 能有编译下内核吗。。我要开启can 不懂怎么操作
  • 1: 方法一ngtcp2要改下:./configure PKG_CONFIG_PATH=/usr/l...
归档