README.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>README.md</title>
  5. <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
  6. <style>
  7. /* https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/media/markdown.css */
  8. /*---------------------------------------------------------------------------------------------
  9. * Copyright (c) Microsoft Corporation. All rights reserved.
  10. * Licensed under the MIT License. See License.txt in the project root for license information.
  11. *--------------------------------------------------------------------------------------------*/
  12. body {
  13. font-family: var(--vscode-markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif);
  14. font-size: var(--vscode-markdown-font-size, 14px);
  15. padding: 0 26px;
  16. line-height: var(--vscode-markdown-line-height, 22px);
  17. word-wrap: break-word;
  18. }
  19. #code-csp-warning {
  20. position: fixed;
  21. top: 0;
  22. right: 0;
  23. color: white;
  24. margin: 16px;
  25. text-align: center;
  26. font-size: 12px;
  27. font-family: sans-serif;
  28. background-color:#444444;
  29. cursor: pointer;
  30. padding: 6px;
  31. box-shadow: 1px 1px 1px rgba(0,0,0,.25);
  32. }
  33. #code-csp-warning:hover {
  34. text-decoration: none;
  35. background-color:#007acc;
  36. box-shadow: 2px 2px 2px rgba(0,0,0,.25);
  37. }
  38. body.scrollBeyondLastLine {
  39. margin-bottom: calc(100vh - 22px);
  40. }
  41. body.showEditorSelection .code-line {
  42. position: relative;
  43. }
  44. body.showEditorSelection .code-active-line:before,
  45. body.showEditorSelection .code-line:hover:before {
  46. content: "";
  47. display: block;
  48. position: absolute;
  49. top: 0;
  50. left: -12px;
  51. height: 100%;
  52. }
  53. body.showEditorSelection li.code-active-line:before,
  54. body.showEditorSelection li.code-line:hover:before {
  55. left: -30px;
  56. }
  57. .vscode-light.showEditorSelection .code-active-line:before {
  58. border-left: 3px solid rgba(0, 0, 0, 0.15);
  59. }
  60. .vscode-light.showEditorSelection .code-line:hover:before {
  61. border-left: 3px solid rgba(0, 0, 0, 0.40);
  62. }
  63. .vscode-light.showEditorSelection .code-line .code-line:hover:before {
  64. border-left: none;
  65. }
  66. .vscode-dark.showEditorSelection .code-active-line:before {
  67. border-left: 3px solid rgba(255, 255, 255, 0.4);
  68. }
  69. .vscode-dark.showEditorSelection .code-line:hover:before {
  70. border-left: 3px solid rgba(255, 255, 255, 0.60);
  71. }
  72. .vscode-dark.showEditorSelection .code-line .code-line:hover:before {
  73. border-left: none;
  74. }
  75. .vscode-high-contrast.showEditorSelection .code-active-line:before {
  76. border-left: 3px solid rgba(255, 160, 0, 0.7);
  77. }
  78. .vscode-high-contrast.showEditorSelection .code-line:hover:before {
  79. border-left: 3px solid rgba(255, 160, 0, 1);
  80. }
  81. .vscode-high-contrast.showEditorSelection .code-line .code-line:hover:before {
  82. border-left: none;
  83. }
  84. img {
  85. max-width: 100%;
  86. max-height: 100%;
  87. }
  88. a {
  89. text-decoration: none;
  90. }
  91. a:hover {
  92. text-decoration: underline;
  93. }
  94. a:focus,
  95. input:focus,
  96. select:focus,
  97. textarea:focus {
  98. outline: 1px solid -webkit-focus-ring-color;
  99. outline-offset: -1px;
  100. }
  101. hr {
  102. border: 0;
  103. height: 2px;
  104. border-bottom: 2px solid;
  105. }
  106. h1 {
  107. padding-bottom: 0.3em;
  108. line-height: 1.2;
  109. border-bottom-width: 1px;
  110. border-bottom-style: solid;
  111. }
  112. h1, h2, h3 {
  113. font-weight: normal;
  114. }
  115. table {
  116. border-collapse: collapse;
  117. }
  118. table > thead > tr > th {
  119. text-align: left;
  120. border-bottom: 1px solid;
  121. }
  122. table > thead > tr > th,
  123. table > thead > tr > td,
  124. table > tbody > tr > th,
  125. table > tbody > tr > td {
  126. padding: 5px 10px;
  127. }
  128. table > tbody > tr + tr > td {
  129. border-top: 1px solid;
  130. }
  131. blockquote {
  132. margin: 0 7px 0 5px;
  133. padding: 0 16px 0 10px;
  134. border-left-width: 5px;
  135. border-left-style: solid;
  136. }
  137. code {
  138. font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
  139. font-size: 1em;
  140. line-height: 1.357em;
  141. }
  142. body.wordWrap pre {
  143. white-space: pre-wrap;
  144. }
  145. pre:not(.hljs),
  146. pre.hljs code > div {
  147. padding: 16px;
  148. border-radius: 3px;
  149. overflow: auto;
  150. }
  151. pre code {
  152. color: var(--vscode-editor-foreground);
  153. tab-size: 4;
  154. }
  155. /** Theming */
  156. .vscode-light pre {
  157. background-color: rgba(220, 220, 220, 0.4);
  158. }
  159. .vscode-dark pre {
  160. background-color: rgba(10, 10, 10, 0.4);
  161. }
  162. .vscode-high-contrast pre {
  163. background-color: rgb(0, 0, 0);
  164. }
  165. .vscode-high-contrast h1 {
  166. border-color: rgb(0, 0, 0);
  167. }
  168. .vscode-light table > thead > tr > th {
  169. border-color: rgba(0, 0, 0, 0.69);
  170. }
  171. .vscode-dark table > thead > tr > th {
  172. border-color: rgba(255, 255, 255, 0.69);
  173. }
  174. .vscode-light h1,
  175. .vscode-light hr,
  176. .vscode-light table > tbody > tr + tr > td {
  177. border-color: rgba(0, 0, 0, 0.18);
  178. }
  179. .vscode-dark h1,
  180. .vscode-dark hr,
  181. .vscode-dark table > tbody > tr + tr > td {
  182. border-color: rgba(255, 255, 255, 0.18);
  183. }
  184. </style>
  185. <style>
  186. /* Tomorrow Theme */
  187. /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
  188. /* Original theme - https://github.com/chriskempson/tomorrow-theme */
  189. /* Tomorrow Comment */
  190. .hljs-comment,
  191. .hljs-quote {
  192. color: #8e908c;
  193. }
  194. /* Tomorrow Red */
  195. .hljs-variable,
  196. .hljs-template-variable,
  197. .hljs-tag,
  198. .hljs-name,
  199. .hljs-selector-id,
  200. .hljs-selector-class,
  201. .hljs-regexp,
  202. .hljs-deletion {
  203. color: #c82829;
  204. }
  205. /* Tomorrow Orange */
  206. .hljs-number,
  207. .hljs-built_in,
  208. .hljs-builtin-name,
  209. .hljs-literal,
  210. .hljs-type,
  211. .hljs-params,
  212. .hljs-meta,
  213. .hljs-link {
  214. color: #f5871f;
  215. }
  216. /* Tomorrow Yellow */
  217. .hljs-attribute {
  218. color: #eab700;
  219. }
  220. /* Tomorrow Green */
  221. .hljs-string,
  222. .hljs-symbol,
  223. .hljs-bullet,
  224. .hljs-addition {
  225. color: #718c00;
  226. }
  227. /* Tomorrow Blue */
  228. .hljs-title,
  229. .hljs-section {
  230. color: #4271ae;
  231. }
  232. /* Tomorrow Purple */
  233. .hljs-keyword,
  234. .hljs-selector-tag {
  235. color: #8959a8;
  236. }
  237. .hljs {
  238. display: block;
  239. overflow-x: auto;
  240. color: #4d4d4c;
  241. padding: 0.5em;
  242. }
  243. .hljs-emphasis {
  244. font-style: italic;
  245. }
  246. .hljs-strong {
  247. font-weight: bold;
  248. }
  249. </style>
  250. <style>
  251. /*
  252. * Markdown PDF CSS
  253. */
  254. body {
  255. font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif, "Meiryo";
  256. padding: 0 12px;
  257. }
  258. pre {
  259. background-color: #f8f8f8;
  260. border: 1px solid #cccccc;
  261. border-radius: 3px;
  262. overflow-x: auto;
  263. white-space: pre-wrap;
  264. overflow-wrap: break-word;
  265. }
  266. pre:not(.hljs) {
  267. padding: 23px;
  268. line-height: 19px;
  269. }
  270. blockquote {
  271. background: rgba(127, 127, 127, 0.1);
  272. border-color: rgba(0, 122, 204, 0.5);
  273. }
  274. .emoji {
  275. height: 1.4em;
  276. }
  277. code {
  278. font-size: 14px;
  279. line-height: 19px;
  280. }
  281. /* for inline code */
  282. :not(pre):not(.hljs) > code {
  283. color: #C9AE75; /* Change the old color so it seems less like an error */
  284. font-size: inherit;
  285. }
  286. /* Page Break : use <div class="page"/> to insert page break
  287. -------------------------------------------------------- */
  288. .page {
  289. page-break-after: always;
  290. }
  291. </style>
  292. <script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>
  293. </head>
  294. <body>
  295. <script>
  296. mermaid.initialize({
  297. startOnLoad: true,
  298. theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast')
  299. ? 'dark'
  300. : 'default'
  301. });
  302. </script>
  303. <h1 id="fastgithub">FastGithub</h1>
  304. <p>github加速神器,解决github打不开、用户头像无法加载、releases无法上传下载、git-clone、git-pull、git-push失败等问题。</p>
  305. <h3 id="1-%E7%A8%8B%E5%BA%8F%E4%B8%8B%E8%BD%BD">1 程序下载</h3>
  306. <ul>
  307. <li><a href="https://github.com/dotnetcore/fastgithub/releases">github-release</a></li>
  308. <li>Q群1 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=cx_MgEIvoo1EMkrKg5tXz8vMdtPap3Rw&amp;jump_from=webapi">307306673</a> [已满]</li>
  309. <li>Q群2 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=6BBJ1nrJwe1o1E4-NJfwSOP-C4sMGc4q&amp;jump_from=webapi">742376932</a></li>
  310. </ul>
  311. <h3 id="2-%E9%83%A8%E7%BD%B2%E6%96%B9%E5%BC%8F">2 部署方式</h3>
  312. <h4 id="21-windows-x64%E6%A1%8C%E9%9D%A2">2.1 windows-x64桌面</h4>
  313. <ul>
  314. <li>双击运行FastGithub.UI.exe</li>
  315. </ul>
  316. <h4 id="22-windows-x64%E6%9C%8D%E5%8A%A1">2.2 windows-x64服务</h4>
  317. <ul>
  318. <li><code>fastgithub.exe start</code> // 以windows服务安装并启动</li>
  319. <li><code>fastgithub.exe stop</code> // 以windows服务卸载并删除</li>
  320. </ul>
  321. <h4 id="23-linux-x64%E7%BB%88%E7%AB%AF">2.3 linux-x64终端</h4>
  322. <ul>
  323. <li><code>sudo ./fastgithub</code></li>
  324. <li>设置系统自动代理为<code>http://127.0.0.1:38457</code>,或手动代理http/https为<code>127.0.0.1:38457</code></li>
  325. </ul>
  326. <h4 id="24-linux-x64%E6%9C%8D%E5%8A%A1">2.4 linux-x64服务</h4>
  327. <ul>
  328. <li><code>sudo ./fastgithub start</code> // 以systemd服务安装并启动</li>
  329. <li><code>sudo ./fastgithub stop</code> // 以systemd服务卸载并删除</li>
  330. <li>设置系统自动代理为<code>http://127.0.0.1:38457</code>,或手动代理http/https为<code>127.0.0.1:38457</code></li>
  331. </ul>
  332. <h4 id="25-macos-x64">2.5 macOS-x64</h4>
  333. <ul>
  334. <li>双击运行fastgithub</li>
  335. <li>安装cacert/fastgithub.cer并设置信任</li>
  336. <li>设置系统自动代理为<code>http://127.0.0.1:38457</code>,或手动代理http/https为<code>127.0.0.1:38457</code></li>
  337. <li><a href="https://github.com/dotnetcore/FastGithub/blob/master/MacOSXConfig.md">具体配置详情</a></li>
  338. </ul>
  339. <h4 id="26-docker-compose%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2">2.6 docker-compose一键部署</h4>
  340. <ul>
  341. <li>准备好docker 18.09, docker-compose.</li>
  342. <li>在源码目录下,有一个docker-compose.yaml 文件,专用于在实际项目中,临时使用github.com源码,而做的demo配置。</li>
  343. <li>根据自己的需要更新docker-compose.yaml中的sample和build镜像即可完成拉github.com源码加速,并基于源码做后续的操作。</li>
  344. </ul>
  345. <h3 id="3-%E8%BD%AF%E4%BB%B6%E5%8A%9F%E8%83%BD">3 软件功能</h3>
  346. <ul>
  347. <li>提供域名的纯净IP解析;</li>
  348. <li>提供IP测速并选择最快的IP;</li>
  349. <li>提供域名的tls连接自定义配置;</li>
  350. <li>google的CDN资源替换,解决大量国外网站无法加载js和css的问题;</li>
  351. </ul>
  352. <h3 id="4-%E8%AF%81%E4%B9%A6%E9%AA%8C%E8%AF%81">4 证书验证</h3>
  353. <h4 id="41-git">4.1 git</h4>
  354. <p>git操作提示<code>SSL certificate problem</code></br>
  355. 需要关闭git的证书验证:<code>git config --global http.sslverify false</code></p>
  356. <h4 id="42-firefox">4.2 firefox</h4>
  357. <p>firefox提示<code>连接有潜在的安全问题</code></br>
  358. 设置-&gt;隐私与安全-&gt;证书-&gt;查看证书-&gt;证书颁发机构,导入cacert/fastgithub.cer,勾选“信任由此证书颁发机构来标识网站”</p>
  359. <h3 id="5-%E5%AE%89%E5%85%A8%E6%80%A7%E8%AF%B4%E6%98%8E">5 安全性说明</h3>
  360. <p>FastGithub为每台不同的主机生成自颁发CA证书,保存在cacert文件夹下。客户端设备需要安装和无条件信任自颁发的CA证书,请不要将证书私钥泄露给他人,以免造成损失。</p>
  361. <h3 id="6-%E5%90%88%E6%B3%95%E6%80%A7%E8%AF%B4%E6%98%8E">6 合法性说明</h3>
  362. <p>《国际联网暂行规定》第六条规定:“计算机信息网络直接进行国际联网,必须使用邮电部国家公用电信网提供的国际出入口信道。任何单位和个人不得自行建立或者使用其他信道进行国际联网。”
  363. FastGithub本地代理使用的都是“公用电信网提供的国际出入口信道”,从国外Github服务器到国内用户电脑上FastGithub程序的流量,使用的是正常流量通道,其间未对流量进行任何额外加密(仅有网页原有的TLS加密,区别于VPN的流量加密),而FastGithub获取到网页数据之后发生的整个代理过程完全在国内,不再适用国际互联网相关之规定。</p>
  364. </body>
  365. </html>