curl 偵測 http2 及壓縮

curl -sI https://j7.lb168.tw/

HTTP/2jjwhuang@u20:~$ curl -sI https://j7.lb168.tw/ | grep HTTP
HTTP/2 200
jjwhuang@u20:~$ curl -sI https://j7.lb168.tw/
HTTP/2 200
server: nginx
date: Wed, 09 Dec 2020 16:17:46 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
vary: Accept-Encoding, Cookie
link: https://j7.lb168.tw/wp-json/; rel=”https://api.w.org/”
strict-transport-security: max-age=15768000

gip, br, deflate 壓縮

curl -s -I -H 'Accept-Encoding: br,gzip,deflate' https://j7.lb168.tw/

gzip

curl -s -I -H ‘Accept-Encoding: br,gzip,deflate’ https://j7.lb168.tw/
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 26 Dec 2020 14:00:15 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
Vary: Accept-Encoding
Link: https://j7.lb168.tw/wp-json/; rel=”https://api.w.org/”
Strict-Transport-Security: max-age=15768000
Content-Encoding: gzip
curl -s -I -H 'Accept-Encoding: br,gzip,deflate' https://www.cloudflare.com/

br

HTTP/2 200
date: Sat, 26 Dec 2020 14:05:00 GMT
content-type: text/html; charset=utf-8
set-cookie: __cfduid=dfd4f99c00673fb9e171266d72145632b1608991500; expires=Mon, 25-Jan-21 14:05:00 GMT; path=/; domain=.www.cloudflare.com; HttpOnly; SameSite=Lax; Secure
cf-ray: 607b5aaf2e9af071-TPE
age: 10
cache-control: public, max-age=30
strict-transport-security: max-age=31536000
vary: Accept-Encoding
cf-cache-status: HIT
cf-request-id: 0740f701770000f0719a8f9000000001
expect-ct: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
report-to: {“endpoints”:[{“url”:”https:\/\/a.nel.cloudflare.com\/report?s=r6No5T5w1q%2B%2Bqi%2Bi1d5rHIjmQoC9AbwOMJgEHUGKM4RdM7riJNtHRvh1cEwnEoYLRahsl4D%2F1ror%2Bt0SeRUOhx9rh8OuBjkNzm31QzGw8Cxr%2FT4%3D”}],”group”:”cf-nel”,”max_age”:604800}
nel: {“report_to”:”cf-nel”,”max_age”:604800}
server: cloudflare
content-encoding: br

http3 偵測

自己下載 curl 編譯XD