幾個 Web API Manager 要設定的東西...

在上一篇提到的「控制瀏覽器裡的 Web API」,用了一兩天後有遇到一些問題,大概整理一下...

  • Gmail 會開不起來,需要將 mail.google.com 列入白名單 (一個阻擋條件都不能設),這是因為遇到瀏覽器的 bug,在「General breakage on specific site · Issue #55 · snyderp/web-api-manager」這邊作者有找到問題,他判斷是瀏覽器的問題後開了 ticket 給 FirefoxChrome,不知道什麼時候會好...
  • 同理,Facebook 右上角的通知也出不來,也是同樣的問題,需要把 www.facebook.com 列入白名單。
  • 另外是 Google Maps 用滑鼠滾輪滾動本來是平滑式的縮放,現在用起來會變成階段式的縮放,原因是 Google Maps 用到 WebGL Specification (在 Lite 裡面會阻擋)。這有兩個方向可以改,一個是把 www.google.com (或是 www.google.com.tw,看你用的網域) 另外開一組設定管理,另外一個是直接把 WebGL Specification 的阻擋關掉。

目前遇到的大概就是這些了...

控制瀏覽器裡的 Web API

在「阻止网站调用不必要的你的浏览器 API」這篇裡面看到的,論文的作者發展了 ChromeFirefox 的延伸套件,可以控制瀏覽器內的 Web API。套件原始程式碼在 GitHubsnyderp/web-api-manager,頁面上有 Chrome 與 Firefox 延伸套件的連結可以直接安裝。

套件本身預設不會擋任何 Web API,但提供了三種不同的 Preset 讓你選 (Lite、Conservative 與 Aggressive),一般情況下用 Lite (擋掉 17 種 Web API) 就有不錯的效果了。另外也可以針對某些網域做另外的調整... (雖然還沒用過 XD)

直接抓 Google Chrome 上給的截圖:

這是個好東西啊,有些 API 出來擺明就是來追蹤使用者的... 關掉省麻煩 XD

2FA 的 QR code 與 CanvasFingerprintBlock

在「Rasmus Lerdorf 關於 VPS 的介紹測試...」這篇的留言裡,Jimmy 提到 Vultr 是有 2FA 可以用的 (當初沒找到...),於是就花了點時間設定...

但設定的過程中發現 TOTP 的 QR code 出不來,但在 dev console 裡面卻看得到 img 元素。

這種情況前幾個月在另外一個網站上也遇過 (當下拿 Firefox 測也不行),於是就認為他們網站的問題,開了 support ticket 也沒回,一直沒下文的情況下就丟著。現在在 Vultr 上又遇到同樣的問題的話,看起來有可能是我的問題 (或是他們兩個站台都用同樣的 library),於是就仔細點找...

找的過程中間發現有 canvas 元素,然後 canvas 元素有個 inline css 是 display: none;,先試著把這條拿掉,就出現了... 接下來就好猜了。

在 2014 年的「用 Canvas Fingerprint 取代部份 Cookie」這篇就有提過可以用 Canvas 追蹤使用者的問題,於是就有介紹了 CanvasFingerprintBlock 這個在 Google Chrome 上的套件,阻擋 Canvas 的存取。一關掉這個套件就正常了 XDDD

為了隱私問題,套件本身還是掛著,但當遇到發現有 QR code 出不來的時候就知道去 dev console 內改掉 XDDD

然後回到原來本來以為有問題的那個網站,也是一樣進 dev console 改掉後就看得到可以掃了... 看起來這兩個站可能是用一樣的 library?找出來再去戳這兩個站好了...

Amazon EC2 的可用頻寬提昇

AWSJeff Barr 宣佈了有 ENAEC2 instance 的頻寬提升到 25Gbps:「The Floodgates Are Open – Increased Network Bandwidth for EC2 Instances」。

分成三種,第一種是對 S3 的頻寬提昇:

EC2 to S3 – Traffic to and from Amazon Simple Storage Service (S3) can now take advantage of up to 25 Gbps of bandwidth. Previously, traffic of this type had access to 5 Gbps of bandwidth. This will be of benefit to applications that access large amounts of data in S3 or that make use of S3 for backup and restore.

第二種是 EC2 對 EC2 (內網):

EC2 to EC2 – Traffic to and from EC2 instances in the same or different Availability Zones within a region can now take advantage of up to 5 Gbps of bandwidth for single-flow traffic, or 25 Gbps of bandwidth for multi-flow traffic (a flow represents a single, point-to-point network connection) by using private IPv4 or IPv6 addresses, as described here.

第三種也是 EC2 對 EC2,但是是在同一個 Cluster Placement Group:

EC2 to EC2 (Cluster Placement Group) – Traffic to and from EC2 instances within a cluster placement group can continue to take advantage of up to 10 Gbps of lower-latency bandwidth for single-flow traffic, or 25 Gbps of lower-latency bandwidth for multi-flow traffic.

有 ENA 的有這些,好像沒看到 CentOS

ENA-enabled AMIs are available for Amazon Linux, Ubuntu 14.04 & 16.04, RHEL 7.4, SLES 12, and Windows Server (2008 R2, 2012, 2012 R2, and 2016). The FreeBSD AMI in AWS Marketplace is also ENA-enabled, as is VMware Cloud on AWS.

AWS 多了一卡車服務符合 PCI DSS

碰到信用卡卡號時會需要的 PCI DSS,在 AWS 上面多了一卡車服務過了這個認證:「AWS Adds 16 More Services to Its PCI DSS Compliance Program」。

多了這些,有不少其實蠻常用的東西:

  • Amazon Inspector
  • Amazon Macie
  • Amazon QuickSight
  • Amazon S3 Transfer Acceleration
  • Amazon SageMaker
  • Amazon Simple Notification Service
  • AWS Batch
  • AWS CodeBuild
  • AWS Lambda@Edge
  • AWS Shield
  • AWS Snowball
  • AWS Snowball Edge
  • AWS Snowmobile
  • AWS Systems Manager
  • AWS X-Ray

Lambda@Edge 可以用表示信用卡處理頁面上也可以卡這個服務進來了,另外比較意外的是,SNS 之前居然沒在 PCI DSS 清單裡面喔 XDDD

1Password 使用 Terraform 的案例...

看到「Terraforming 1Password」這篇以及這則 Tweet,講 1Password 導入 Terraform 將會中斷服務幾個小時:

這根本是負面宣傳 XDDD

無論是對 1Password 的技術能力,或是 Terraform 的彈性來說...

用郵件訂閱 Google Groups 上的 Mailing List

除了註冊 Google 帳號外,另外一個方式是透過 e-mail 直接登記。在這篇有人問到類似的問題:「How can I subscribe to a Google mailing list with a non-Google e-mail address?」。

不是 Accepted 那個答案,而是 c33s 給的答案:

Look for group email address in the heading of “Group email”, it will look like: Group email (Group Name)@googlegroups.com or visit the group web page on Google Groups, and click on “About this group”.

Send an email to (Group Name)+subscribe@googlegroups.com. +subscribe is the key, which is appended to the end of group’s email address. (Group Name) is the name of the group. Space is substituted by “-” (hyphen).

如果是 trac-announce 這個群組,就寄到 trac-announce+subscribe@googlegroups.com 這個位置,他會寄一封信回來確認,你把整封信回回去就可以了... (信裡有 auth key,寄回去就可以通過)

這個技巧在官方文件裡沒出現過... 但一直都是有效的 :o

擋 mobile.twitter.com 上的廣告

在桌機上面用 mobile.twitter.com 速度比 twitter.com 快很多,所以平常用桌機時都是用 mobile 這個版本在逛,但因為 mobile 版本對 css name 有處理過,使得 uBlock Origin 這類軟體不好處理廣告的部份...

前陣子在日本的時候發現頁面上多了一堆廣告,本來以為是在日本用日本 IP address 才會有所以就沒有太在意,結果回台灣後發現也出現了... 看起來是 css name 又因為改版被改掉而使得原本的規則失效了...

網路上找其他方法看看有沒有方向,結果找到「Block "Promoted Tweets" on mobile.twitter.com · Issue #351 · uBlockOrigin/uAssets」這篇,雖然最後的 commit 還是用 css name 的方式,但在留言處 Jud 提到可以用 Procedural cosmetic filters 中的 XPath 解決:

mobile.twitter.com##:xpath(/html/body//div[@role="article"][.//text()[starts-with(., "Promoted")]])

這條規則不算難懂,先找出 <div role="article"> 的元素,然後判斷下面的節點有沒有文字化開頭後是 Promoted 的字串。

在還沒有更新規則之前,這個拿來擋一擋應該還行... 不過條件寫的有點簡單,可能會有誤判,也許改抓 div 的「Promoted by 」應該會比較好?也就是這樣:

mobile.twitter.com##:xpath(/html/body//div[@role="article"][.//div[text()[starts-with(., "Promoted by ")]]])

就先這樣搞吧...

Ubuntu 18.04 將從 Wayland 換回 Xorg...

在「Ubuntu 18.04 LTS is Switching back to Xorg」這邊看到 Ubuntu 18.04 將要從 Wayland 換回 Xorg 的消息,只能說不意外 XDDD

Ubuntu 官方的說明在「Bionic Beaver 18.04 LTS to use Xorg by default」這邊,文章裡面給了三個理由:

  • Screen sharing in software like WebRTC services, Google Hangouts, Skype, etc works well under Xorg.
  • Remote Desktop control for example RDP & VNC works well under Xorg.
  • Recoverability from Shell crashes is less dramatic under Xorg.

講白了就是還有一堆東西有問題,看起來在 17.10 導入 Wayland 後沒搞定:

17.10, released in October 2017, ships with the Wayland based graphics server as the default and the Xorg based equivalent is available as an option from the login screen.

在 18.04 預設會用 Xorg,但系統內還是會有 Wayland 讓使用者可以選:

The Wayland session will still be available, pre-installed, for people to use, but for our ‘out of the box’ users the Ubuntu experience needs to be stable and provide the features they have come to expect and use in daily life and Xorg is the best choice here, at least for 18.04 LTS, but for 18.10 we will re-evaluate Wayland as the default.

再測個兩年吧 XD

Netflix 在 Time Series Data Storage 上的努力...

在「Scaling Time Series Data Storage — Part I」這篇看到 Netflix 在 Time Series Data Storage 上所做的努力...

因為應用在寫多讀少的場景,所以選擇使用 Cassandra,遇到瓶頸後把常寫入的與不太會改變的拆開儲存,並且用不同方式最佳化。包括了 cache 與 compression 都拿出來用了...

不知道他們內部有沒有評估 ScyllaDB 的想法...