让你的论坛支持http3 QUIC传输协议
鍒氬垰鍙戦敊鐗堝潡浜!鍑嗗搴熻瘽鐣欏悗闈紝鍏堣閲嶇偣锛屽叾瀹炲崌绾т娇鐢╤ttp3闈炲父绠鍗
瀹濆涓轰緥锛
1銆佺‘瀹歯ginx鏄1.25浠ヤ笂鐗堟湰鍗冲彲锛屾帹鑽恘ginx1.27 +
2銆佹湇鍔″櫒瀹夊叏缁勫拰瀹濆瀹夊叏閲岄兘宸茬粡鏀捐UDP 绔彛443
3銆佺綉绔檔ginx閰嶇疆浠ユ垜鐨勪负渚嬶細(缃戠珯鏀寔ipv6鐨勬妸涓や釜listen [::]:443鍓嶉潰鐨#鍒犻櫎)
- server{ listen 80; server_name ~^xxxx\.com$; # 鍖归厤xxxx.com浣嗕笉鍖归厤瀛愬煙鍚 return 301 https://www.xxxx.com$request_uri; # 閲嶅畾鍚戝埌甯ww鐨凥TTPS鍩熷悕}server{ listen 443 ssl; #listen [::]:443 ssl; listen 443 quic reuseport; #listen [::]:443 quic reuseport; http2 on; ssl_early_data on; add_header Alt-Svc 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=:443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"'; server_name www.xxxx.com; index index.php index.html index.htm default.php default.htm default.html; root /www/wwwroot/xxxx.com;
TLS鎻℃墜锛氭渶濂藉彧鐣欎竴涓1.3锛屼篃鍙互鐪嬫儏鍐垫渶澶氬啀淇濈暀涓涓1.2
浣跨敤cdn鐨勶紝鍦╟dn閲岀殑https閰嶇疆锛屽紑鍚疩UIC锛孴LS鐗堟湰閰嶇疆鍙繚鐣橳LS1.3 鏁堟灉鏇翠匠
妫娴嬩綘鐨勭綉绔欐槸鍚︽敮鎸乭ttp3鍦板潃锛歨ttps://http3.wcode.net/
http3浠嬬粛
HTTP/3 涓 HTTP/2 鍑犱箮瀹屽叏鐩稿悓銆傚畠浠殑涓昏鍖哄埆鍦ㄤ簬鍦 QUIC 鎴 TCP 涔嬩笂鐨勫姛鑳界殑鎶鏈疄鐜般備絾鏄紝鐢变簬 HTTP/3 鍙互浣跨敤 QUIC 鐨勬墍鏈夋柊鍔熻兘锛屽洜姝ぢ犲湪鍔犺浇缃戦〉鍜屾祦寮忎紶杈撹棰戞椂锛岄璁″叾鎬ц兘浼氭洿楂樸傚湪瀹炶返涓紝姝f槸杩欎竴鏂归潰淇冧娇 HTTP/3 寰楀埌浜嗚繀閫熼噰鐢ㄣ
QUIC 灏嗗府鍔╀慨澶 HTTP/2 鐨勪竴浜涢噸澶х己鐐
寮鍙戜竴绉嶆柟娉曟潵瑙e喅褰撴櫤鑳芥墜鏈轰粠 WiFi 鍒囨崲鍒拌渹绐濇暟鎹椂锛堜緥濡傜寮瀹舵垨鍔炲叕瀹ゆ椂锛夋ц兘缂撴參鐨勯棶棰
鍑忓皯涓㈠寘鐨勫奖鍝嶁斺斿綋涓涓俊鎭寘娌℃湁鍒拌揪鐩殑鍦版椂锛屽畠涓嶄細鍐嶉樆濉炴墍鏈夌殑淇℃伅娴侊紙绉颁负鈥滈槦澶撮樆濉炩濈殑闂锛
鍏朵粬濂藉鍖呮嫭锛
鏇村揩鐨勮繛鎺ュ缓绔
QUIC 鍏佽聽TLS聽鐗堟湰鍗忓晢涓庡姞瀵嗗拰浼犺緭鎻℃墜鍚屾椂鍙戠敓
闆跺線杩旀椂闂绰(0-RTT)
瀵逛簬瀹冧滑宸茬粡杩炴帴鐨勬湇鍔″櫒锛屽鎴风鍙互璺宠繃鎻℃墜瑕佹眰锛堜簰鐩哥‘璁ゅ拰楠岃瘉浠ョ‘瀹氬畠浠皢濡備綍閫氫俊鐨勮繃绋嬶級
鏇村叏闈㈢殑鍔犲瘑
QUIC 鐨勬柊鎻℃墜鏂瑰紡灏嗛粯璁ゆ彁渚涘姞瀵嗭紝杩欐槸瀵 HTTP/2 鐨勫法澶у崌绾э紝骞跺皢鏈夊姪浜庡噺杞绘敾鍑荤殑椋庨櫓