github圖片打不開解決方案


github界面的圖片打不開的原因是域名污染! 為什么會出現域名污染,這是一個深刻但不方便這里解說的問題。

 

解決方案(推薦第2種)

1、要么更換本地網絡配置中的DNS服務器地址為國外DNS服務器,這導致本地電腦打開網站比較慢。

更換本地DNS地址是最好的方式,推薦一個離中國比較近的DNS服務器地址(位於美國西海岸):

74.82.42.42

一般的PC電腦可以設置兩個DNS地址,國內的DNS地址114.114.114.144已經被污染了。如果設置兩個DNS地址,一個國內,另外一個國外,還是會受到DNS污染影響。

如果只設置一個國外DNS地址,除非你已經FQ成功,否則打開很慢。

 

2、要么使用本地host方式直接映射到一個公網地址(推薦這種)

下面介紹一個host的方式(這個方式不夠徹底,因為git的圖片服務器域名很多):

打開ipaddress.com深入地址,輸入域名(這些域名是通過檢查git上圖片鏈接地址得到)

raw.githubusercontent.com

camo.githubusercontent.com

查詢這個域名在中國大陸沒有被污染的國外地址。

或者直接打開如下鏈接

https://github.com.ipaddress.com/

https://github.com.ipaddress.com/www.github.com

https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com
https://githubusercontent.com.ipaddress.com/gist.githubusercontent.com
https://githubusercontent.com.ipaddress.com/cloud.githubusercontent.com
https://githubusercontent.com.ipaddress.com/camo.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars0.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars1.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars2.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars3.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars4.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars5.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars6.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars7.githubusercontent.com
https://githubusercontent.com.ipaddress.com/avatars8.githubusercontent.com

 

修改windows下的host文件

C:\Windows\System32\drivers\etc\hosts

或者linux下host文件

/etc/hosts

添加如下一行:

199.232.28.133 raw.githubusercontent.com
199.232.68.133 gist.githubusercontent.com
199.232.28.133 cloud.githubusercontent.com
199.232.28.133 camo.githubusercontent.com
199.232.28.133 avatars0.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
199.232.28.133 avatars2.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com

 

大功告成,重啟瀏覽器,打開github。。。

你會驚訝的發現還是打不開github圖片,為什么?

小概率的情況下,可以正常打開github,大部分情況下還是不能打開!

 

因為一般的互聯網民上網是在家里或者公司這類地方上網。從網絡管控層面划分,屬於普通互聯網用戶層,這層網絡拓撲結構中,ZF部署了大量的審查,監測設備,包括DNS污染,TCP重置等等若干手段。

這個時候需要通過PPTP微PN(自行准備IDC機房服務器,自行搭建一套PPTPD服務器,自行部署這套開源微PN服務)連接到IDC服務器區域,這條線路幾乎屬於骨干網,沒有那么多嚴厲的審查(但是依然上不了谷歌等網站)但可以正常打開github

也就是說,配合PPTP微PN加host解析方式就可以徹底流暢打開github,包括圖片了。

 

為什么不用PPTP微PN直接FQ到外國,因為PPTP微PN和open微PN等都已經被ZF的IT從業者做了深度協議規則解析並過濾了。

監測系統會自動捕捉這類流量,並通過探測服務端來封鎖FQ服務器,這個操作只會在網絡數據流要出國的時候操作,在國內互訪是不受影響的。

通過兩層跳板,一級跳板在國內雲服務器那,二級跳板在國外,二級跳板啟用防火牆源地址過濾:

-A INPUT -p tcp -m state --state NEW -m tcp -s xxx.xxx.xx.xx --dport 27512 -j ACCEPT

最佳實踐

分兩步走:

1、 使用雲服務器(阿里雲,亞馬遜雲,微軟雲)搭建一套PPTP-微PN(有固定IP,shadow-socks server使用iptables做源地址過濾,只允許該雲服務器連接shadow-socks端口和ssh端口,這種方式FQ無法探測到。);

2、電腦鏈接PPTP--微PN,然后啟用shadow-socks代理FQ。

完美解決github圖片不能正常顯示問題。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM