2026/04/17

昨天看文章有提到 MediaMTX 這個軟体
單一檔案就可以執行
想說下載來玩玩
有几個點要注意

使用obs串流時 輸出 設定一定要修改如下 否則無法串流成功


















另外就是直接用browser 打開 使用 webrtc 時 影像沒問題 但完全沒聲音
但這時用 vlc 去開 影像聲音都沒問題
查到說是音訊編碼的問題
但srs沒有這個問題

使用如下指令推流 影音都沒問題

ffmpeg -re -i input.mp4 \
  -c:v libx264 -preset veryfast -tune zerolatency \
  -c:a libopus -ar 48000 -ac 2 -b:a 96k \
  -f rtsp rtsp://localhost:8554/live


還有一個問題就是browser打開後預設是靜音 要手動打開



使用以下指令進行螢幕擷取並串流 影音都沒問題

ffmpeg -f x11grab -video_size 1024x768 -framerate 30 -i :0.0 \
-f pulse -i default \
-c:v libx264 -preset veryfast -pix_fmt yuv420p -g 60 -bf 0 \
-c:a libopus -b:a 128k -ar 48000 -ac 2 \
-flags +global_header \
-rtsp_transport tcp -f rtsp rtsp://localhost:8554/live


obs目前還沒找到方法

2026/04/14

之前filegator docker 更新後 之前建的user都會不見
而且admin的密碼也會還原成預設

原來是少加了一個對應

-v filegator-private:/var/www/filegator/private

完整如下

docker run -d -p 9999:8080 -v filegator-data:/var/www/filegator/repository -v filegator-private:/var/www/filegator/private --name filegator --restart=always filegator/filegator:latest

2026/03/21

超級好用的docker更新工具

https://github.com/mag37/dockcheck

2026/03/10

安裝openclaw時 大模型的選單裡沒有 ollama 可以選
只能利用ollama去呼叫

ollama launch openclaw --model gpt-oss:120b-cloud

一些ollama會用到的指令

ollama ls



一些openclaw會用到的指令

openclaw plugins list

openclaw update

openclaw logs --follow

openclaw onboard

openclaw approvals allowlist 


2026/03/09

上週因為ruckus switch 的power壞了
查log時竟然查到內部攻擊者








想說能不能從vsz把user踢掉
程式如下

#!/bin/bash

#how to use

#./vsz_kick_ip ip

VSZ="https://10.1.1.1:8443"
USER="user"
PASS="passwd"

IP="$1"

#拿到cookie.txt

curl -k -c /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/session" \
  -H "Content-Type: application/json" \
  -d "{\"username\": \"$USER\", \"password\": \"$PASS\"}"

#使用cookie.txt 找出 ip 是那個 mac

MAC=$(curl -sk -b /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/query/client" -H "Content-Type: application/json" -d '{"limit": 100000,"index": 0}'|jq|grep $IP -A 2|tail -n 1|cut -d '"' -f 4)

echo $MAC


#取出 mac 並斷線

curl -sk -b /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/clients/disconnect" -H "Content-Type: application/json" -d '{"mac":"'$MAC'"}'

運作沒問題
但踢掉後又會馬上連線 所以沒用
本來是想再加入黑名單
但現在的無線又是隨几mac
所以感覺作用不大
再想想要怎麼處理

2026/03/05

今天要把graylog升到 7.0.5
竟然出現以下問題

file /usr/lib/.build-id/0f/5bf41e3e207feb6cab260b2366f1697c13555b conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/2a/45eebcedc9ddddd7e43512f1c1d13a625cfe52 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/32/f8130f4d86dfcf5f9af96b1cb932eda8015165 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/3c/51e24cab713cbc44a4b05fed44660d7d8e4035 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/3d/552045a6af8c09b554b88b43d19a50b9e52b99 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/7f/0274197caa4afcc5c5430232e140211d611a4f conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/db/dfd874aa078c8f1feacc28175a6a874c060d6a conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/e7/189286cdb1e6c44b0968f6d52855af9696ae2c conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64

都是官方的吔 沒測試就丟出來

只能直接手動下載二個rpm

https://downloads.graylog.org/el/stable/7.0/x86_64

再來

rpm -ivh --force graylog-server-7.0.5-1.x86_64.rpm graylog-datanode-7.0.5-1.x86_64.rpm


2026/03/03

還是 ollama

一開始安裝是使用 官方提供的script 裝在lxc上

curl -fsSL https://ollama.com/install.sh | sh

接下來視需求跑model

ollama run gpt-oss:20b

要看下載了那些 model

使用 ollama ls

跑起來在文字介面上可以下指令

如果需要有網頁界面

最快的方式是在同一台几器跑 open-webui 

docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main

登入後就可以選擇任何已下載的模型來使用 很方便 直接選擇就能用 不需要 先 ollma run

ollama 也有docker可以使用

https://hub.docker.com/r/ollama/ollama

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama


裝好後使用以下指令進到內部再下指令

docker exec -it ollama /bin/bash