MTA-STS的詳細設定請參考〈How to Set Up MTA-STS and TLS Reporting to Identify and Fix Email Security Issues〉,其中MTA-STS.txt通常是放在自己的主機,但有些網友則是將MTA-STS.txt託管在Cloudflare Workers。
步驟很簡單,到Cloudflare Workers開一個新的應用程式,程式碼參考〈MTA-STS Cloudflare worker〉,只有前面幾行的網域和MX名稱要改:
// This worker is designed to be able to neatly handle MTA-STS policies for multiple domains.// Make a new worker with this script and add your domains to the stsPolicies dict like the example.// Add a DNS AAAA record for mta-sts.yourdomain.com pointing to 100:: and set to proxied,// then add a workers route for mta-sts.yourdomain.com/* pointing to this worker.// You'll still need to manually add the appropriate _mta-sts.yourdomain.com TXT record to enable the policy, // and the _smtp._tls.yourdomain.com TXT record for reporting.const stsPolicies = { "mynet.tw":`version: STSv1mode: enforcemx: mx01.mail.icloud.commx: mx02.mail.icloud.commax_age: 86400`}const respHeaders = { "Content-Type": "text/plain;charset=UTF-8", "X-Clacks-Overhead": "GNU Terry Pratchett, Jon Postel, Alan Turing, Dan Kaminsky"}addEventListener("fetch", event => { event.respondWith(handleRequest(event.request))})async function handleRequest(request) { const reqUrl = new URL(request.url) if (!reqUrl.hostname.startsWith("mta-sts.")) { return new Response(`Incorrect worker route. mta-sts policies must be served on the mta-sts subdomain\n`, {status: 500, headers: respHeaders}) } const policyHost = reqUrl.hostname.slice(8) if (!stsPolicies.hasOwnProperty(policyHost)) { return new Response(`${policyHost} is not defined in the mta-sts worker\n`, {status: 500, headers: respHeaders}) } if (reqUrl.protocol !== "https:" || reqUrl.pathname !== "/.well-known/mta-sts.txt") { reqUrl.protocol = "https:" reqUrl.pathname = "/.well-known/mta-sts.txt" return Response.redirect(reqUrl, 301) } return new Response(stsPolicies[policyHost] + "\n", {status: 200, headers: respHeaders})}
將該Worker新增一個子網域:
mta-sts.mynet.tw
DNS再新增一個TXT紀錄(id可以隨便取,1~32個英文字母和數字):
_mta-sts.mynet.tw IN TXT "v=STSv1; id=12345678"
最後用Mailhardener MTA-STS validator測試設定是否正確。
]]>所以因為銀行App關係,時常要手動開關USB偵錯很麻煩,後來用Tasker建立自動化來跑,確實可以執行──遠東商銀app剛開啟一樣會出現警告訊息,但是等自動化開始執行,訊息自動消失後就能用了。
開啟Tasker → 選擇Tasks → 新增兩個設定檔 → 分別命名為USB Debugging On和USB Debugging Off
USB Debugging On設定內容:
Custom Settings:
TypeGlobalNameadb_enabledValue1
Wait:
1 Second
ADB Wifi:
Commandsh /storage/emulated/0/Android/data/moe.shizuku.privileged.api/start.sh
USB Debugging Off設定內容:
TypeGlobalNameadb_enabledValue0
Tasker和Shizuku各自都要先取得ADB Wifi權限才能執行。
]]>Pixel 8 Pro比Pixel 6 Pro多了不少功能,例如:
手機外盒。
手機正面。這次改回平面螢幕。
手機背面。顏色我選擇海灣藍。
這次放棄Pixel 8 Pro的root,因為只要解鎖Bootloader,之後不論用什麼方式root,或裝什麼模組,都無法躲過SafetyNet的安全機制,Google Play安全防護認證一定會偵測為「裝置未通過認證」,導致很多功能不能用──例如遊戲、銀行、支付等App都開不了。最後沒轍,便將Bootloader鎖回去。
目前手機沒要解鎖root,只將開發人員選項的「OEM解鎖」開關保持開啟。關於root權限,部分App使用Shizuku取得有限度的權限;常用的Tasker使用ADB Wifi來取代。
參考文章:
]]>過一天沒有系統或人員回應,後來到〈Innergie的聯絡表單〉,依序填寫資料,國家地區選Headquarter,重新提交產品故障原因。過了三小時,收到客服人員回信和你聯絡(那幹嘛要產品註冊XD)。
往來多封信件,和客服人員約時間(11/13),他們想看一下這顆故障充電器的狀況。當天來了三位工作人員,特別帶儀器來量測,也帶幾顆Innergie C6新品來測試。經過多次測試討論,無法很快在現場分析出原因,便將壞掉的Innergie 60C Pro帶回去研究,給我其中兩顆已測過的Innergie C6新品。
他們離開時還互相交代說:「東西拿好,可以多給新的,但不要拿到我們自己個人用的充電頭。」
第一次體驗到台達Innergie的保固服務,很特別。客服人員和工程師不在意你買的產品有沒有保固,他們只想找出客戶反應的故障原因並改進,持續提升產品品質。不然他們只要寄新品給我就解決了。
]]>_config.yml
停用內建highlight.js
沒有作用。後來查到網友的說明:
The configuration that I used before to disable highlight.js no longer works:
highlight: enable: false
To disable highlight.js in 7.0.0, it needs extra configuration.
# The default value is 'highlight.js' and here we set it to emptysyntax_highlighter:
I think this should be considered as a breaking change, and it would be reasonable to mention it in the migration guide.
所以我們在_config.yml
依照上述配置來停用highlight.js
:
# The default value is 'highlight.js' and here we set it to emptysyntax_highlighter:highlight: enable: falseprismjs: enable: false
重新清除Hexo快取再重跑一次就可以了。
]]>網路搜尋一下,MacBook Air M2螢幕自動關閉無法喚醒的案例不少:
決定還是到STUDIO A官網預約維修。昨晚拿回電腦,也收到維修報告書。他們確實有重現問題,並且更換了顯示器和角度感應器,再次測試確認故障排除。其實我比較擔心的是──這是不是災情(例如可能不是少數個案,而且修好用一陣子,一樣會壞掉)。
]]>優點:
ghost.tw
來部署。缺點:
目前我主要用iCloud+ Hide My Email,如果要轉寄到不同的信箱,則用x2.email。以上兩個服務偶爾都收不到信的話,才改用Firefox Relay。
]]>安裝方式很簡單,先安裝外掛:
npm install hexo-admonition --save
加入自訂CSS,但是不要直接修改主題的CSS,這裡用自訂CSS檔案來載入。例如到Hexo Light主題新增/themes/light/source/css/_custom
資料夾,裡面新增一個custom.styl
檔案,內容加入:
.admonition { margin: 1.5625em 0; padding: .6rem; overflow: hidden; font-size: 1rem; /* 字體大小 */ page-break-inside: avoid; border-left: .3rem solid #42b983; /* border-radius: .3rem; 四邊圓角 */ /* box-shadow: 0 0.1rem 0.4rem rgba(0,0,0,.05), 0 0 0.05rem rgba(0,0,0,.1); 邊框陰影 */ background-color: #fafafa;}p.admonition-title { position: relative; margin: -.6rem -.6rem .8em -.6rem !important; padding: .4rem .6rem .4rem 2.5rem; font-weight: 700; background-color:rgba(66, 185, 131, .1);}.admonition-title::before { position: absolute; top: .9rem; left: 1rem; width: 12px; height: 12px; background-color: #42b983; border-radius: 50%; content: ' ';}.info>.admonition-title, .todo>.admonition-title { background-color: rgba(0,184,212,.1);}.warning>.admonition-title, .attention>.admonition-title, .caution>.admonition-title { background-color: rgba(255,145,0,.1);}.failure>.admonition-title, .missing>.admonition-title, .fail>.admonition-title, .error>.admonition-title { background-color: rgba(255,82,82,.1);}.admonition.info, .admonition.todo { border-color: #00b8d4;}.admonition.warning, .admonition.attention, .admonition.caution { border-color: #ff9100;}.admonition.failure, .admonition.missing, .admonition.fail, .admonition.error { border-color: #ff5252;}.info>.admonition-title::before, .todo>.admonition-title::before { background-color: #00b8d4; border-radius: 50%;}.warning>.admonition-title::before, .attention>.admonition-title::before, .caution>.admonition-title::before { background-color: #ff9100; border-radius: 50%;}.failure>.admonition-title::before,.missing>.admonition-title::before,.fail>.admonition-title::before,.error>.admonition-title::before{ background-color: #ff5252;; border-radius: 50%;}.admonition>:last-child { margin-bottom: 0 !important;}
編輯/themes/light/source/css/style.styl
檔案,底下加入:
@import '_custom/custom'
改完就可以看到效果了。其他使用方法請參閱考開發者寫的說明。
參考文章:
]]>_redirects
檔案來做轉址,詳細說明請參考〈Redirects and rewrites - Netlify Docs〉。購買域名,名稱越短越好。例如我自己是拿前陣子撿到的race.tw
來用。
到GitHub新建一個儲存庫,新增一個_redirects
檔案,內容為:
# Redirect with a 301/FH4 https://store.steampowered.com/app/1293830/Forza_Horizon_4/
到Netlify新建一個網站,連結GitHub的儲存庫,設定DNS綁定域名,等網站自動化編譯和部署好就完成了。
一般來說,整個網站(儲存庫)只要一個_redirects
檔案就可以做到轉址功能,直接編輯該檔案就能管理轉址內容。你也可以參考〈netlify-shortener〉的方式來建立短網址。
以上述例子來說,當你訪問https://race.tw/FH4,它會重定向到https://store.steampowered.com/app/1293830/Forza_Horizon_4/。
]]>tw域名在國外能選的註冊商不多,看到網友推薦Dynadot的tw域名──註冊、轉移、續約價都是19.99美元,附贈一個1GB免費信箱,所以決定轉移到Dynadot。
在首頁點選「Transfer」,輸入要轉移的域名和認證碼。
出現購物車資訊,進入購物車檢查資料是否正確,準備付費。
選擇付費方式。
下單完成,等待通知信。如果付費失敗,也會有通知信。例如我用郵局VISA竟然刷不過(國外購物刷卡沒問題),換富邦VISA就可刷過。
通知信說轉移時間要6天。
收到Gandi通知信開啟網頁,輸入認證碼同意轉移。
收到Dynadot通知信說域名轉移完成。轉移速度之快,整個流程約30分鐘完成。
之前將域名從匯智資訊轉移至Gandi等了5天才完成轉移。
]]>