Browse Source

文件名小写

陈国伟 3 years ago
parent
commit
89a952bc94
6 changed files with 33 additions and 32 deletions
  1. 4 4
      FastGithub.ReverseProxy/CertService.cs
  2. 1 0
      FastGithub/FastGithub.csproj
  3. 9 9
      README.html
  4. 9 9
      README.md
  5. 7 7
      pack.sh
  6. 3 3
      publish.cmd

+ 4 - 4
FastGithub.ReverseProxy/CertService.cs

@@ -16,7 +16,7 @@ namespace FastGithub.ReverseProxy
     /// </summary>
     /// </summary>
     sealed class CertService
     sealed class CertService
     {
     {
-        private const string CAPATH = "CACert";
+        private const string CACert_PATH = "cacert";
         private const int KEY_SIZE_BITS = 2048;
         private const int KEY_SIZE_BITS = 2048;
         private readonly IMemoryCache serverCertCache;
         private readonly IMemoryCache serverCertCache;
         private readonly ILogger<CertService> logger;
         private readonly ILogger<CertService> logger;
@@ -25,12 +25,12 @@ namespace FastGithub.ReverseProxy
         /// <summary>
         /// <summary>
         /// 获取证书文件路径
         /// 获取证书文件路径
         /// </summary>
         /// </summary>
-        public string CaCerFilePath { get; } = $"{CAPATH}/{nameof(FastGithub)}.cer";
+        public string CaCerFilePath { get; } = $"{CACert_PATH}/fastgithub.cer";
 
 
         /// <summary>
         /// <summary>
         /// 获取私钥文件路径
         /// 获取私钥文件路径
         /// </summary>
         /// </summary>
-        public string CaKeyFilePath { get; } = $"{CAPATH}/{nameof(FastGithub)}.key";
+        public string CaKeyFilePath { get; } = $"{CACert_PATH}/fastgithub.key";
 
 
         /// <summary>
         /// <summary>
         /// 证书服务
         /// 证书服务
@@ -43,7 +43,7 @@ namespace FastGithub.ReverseProxy
             this.serverCertCache = serverCertCache;
             this.serverCertCache = serverCertCache;
             this.logger = logger;
             this.logger = logger;
 
 
-            Directory.CreateDirectory(CAPATH);
+            Directory.CreateDirectory(CACert_PATH);
         }
         }
 
 
         /// <summary>
         /// <summary>

+ 1 - 0
FastGithub/FastGithub.csproj

@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk.Web">
 <Project Sdk="Microsoft.NET.Sdk.Web">
 
 
   <PropertyGroup>
   <PropertyGroup>
+    <AssemblyName>fastgithub</AssemblyName>
     <OutputType>Exe</OutputType>
     <OutputType>Exe</OutputType>
     <PackageLicenseExpression>MIT</PackageLicenseExpression>
     <PackageLicenseExpression>MIT</PackageLicenseExpression>
     <IsWebConfigTransformDisabled>true</IsWebConfigTransformDisabled>
     <IsWebConfigTransformDisabled>true</IsWebConfigTransformDisabled>

+ 9 - 9
README.html

@@ -372,20 +372,20 @@ code {
 <h3 id="2-%E9%83%A8%E7%BD%B2%E6%96%B9%E5%BC%8F">2 部署方式</h3>
 <h3 id="2-%E9%83%A8%E7%BD%B2%E6%96%B9%E5%BC%8F">2 部署方式</h3>
 <h4 id="21-windows%E6%9C%AC%E6%9C%BA">2.1 windows本机</h4>
 <h4 id="21-windows%E6%9C%AC%E6%9C%BA">2.1 windows本机</h4>
 <ul>
 <ul>
-<li>双击运行FastGithub.exe程序</li>
-<li><code>FastGithub.exe start</code> // 以windows服务安装并启动</li>
-<li><code>FastGithub.exe stop</code> // 以windows服务卸载并删除</li>
+<li>双击运行fastgithub.exe程序</li>
+<li><code>fastgithub.exe start</code> // 以windows服务安装并启动</li>
+<li><code>fastgithub.exe stop</code> // 以windows服务卸载并删除</li>
 </ul>
 </ul>
 <h4 id="22-linux%E6%9C%AC%E6%9C%BA">2.2 linux本机</h4>
 <h4 id="22-linux%E6%9C%AC%E6%9C%BA">2.2 linux本机</h4>
 <ul>
 <ul>
-<li>执行<code>sudo ./FastGithub</code></li>
-<li>手工安装CACert/FastGithub.cer到受信任的根证书颁发机构</li>
+<li>执行<code>sudo ./fastgithub</code></li>
+<li>手工安装cacert/fastgithub.cer到受信任的根证书颁发机构</li>
 <li>手工设置系统代理为http://127.0.0.1:38457或自动代理为http://127.0.0.1:38457/proxy.pac</li>
 <li>手工设置系统代理为http://127.0.0.1:38457或自动代理为http://127.0.0.1:38457/proxy.pac</li>
 </ul>
 </ul>
 <h4 id="23-macos%E6%9C%AC%E6%9C%BA">2.3 macOS本机</h4>
 <h4 id="23-macos%E6%9C%AC%E6%9C%BA">2.3 macOS本机</h4>
 <ul>
 <ul>
-<li>双击运行FastGithub程序</li>
-<li>手工安装CACert/FastGithub.cer并设置信任</li>
+<li>双击运行fastgithub程序</li>
+<li>手工安装cacert/fastgithub.cer并设置信任</li>
 <li>手工设置系统代理为http://127.0.0.1:38457或自动代理为http://127.0.0.1:38457/proxy.pac</li>
 <li>手工设置系统代理为http://127.0.0.1:38457或自动代理为http://127.0.0.1:38457/proxy.pac</li>
 </ul>
 </ul>
 <h3 id="3-%E8%AF%81%E4%B9%A6%E9%AA%8C%E8%AF%81">3 证书验证</h3>
 <h3 id="3-%E8%AF%81%E4%B9%A6%E9%AA%8C%E8%AF%81">3 证书验证</h3>
@@ -394,9 +394,9 @@ code {
 <p>需要关闭git的证书验证:<code>git config --global http.sslverify false</code></p>
 <p>需要关闭git的证书验证:<code>git config --global http.sslverify false</code></p>
 <h4 id="32-firefox">3.2 firefox</h4>
 <h4 id="32-firefox">3.2 firefox</h4>
 <p>firefox提示<code>连接有潜在的安全问题</code></br></p>
 <p>firefox提示<code>连接有潜在的安全问题</code></br></p>
-<p>设置-&gt;隐私与安全-&gt;证书-&gt;查看证书-&gt;证书颁发机构,导入FastGithub.cer,勾选信任由此证书颁发机构来标识网站</p>
+<p>设置-&gt;隐私与安全-&gt;证书-&gt;查看证书-&gt;证书颁发机构,导入fastgithub.cer,勾选信任由此证书颁发机构来标识网站</p>
 <h3 id="4-%E5%AE%89%E5%85%A8%E6%80%A7%E8%AF%B4%E6%98%8E">4 安全性说明</h3>
 <h3 id="4-%E5%AE%89%E5%85%A8%E6%80%A7%E8%AF%B4%E6%98%8E">4 安全性说明</h3>
-<p>FastGithub为每台不同的主机生成自颁发CA证书,保存在CACert文件夹下。客户端设备需要安装和无条件信任自颁发的CA证书,请不要将证书私钥泄露给他人,以免造成损失。</p>
+<p>FastGithub为每台不同的主机生成自颁发CA证书,保存在cacert文件夹下。客户端设备需要安装和无条件信任自颁发的CA证书,请不要将证书私钥泄露给他人,以免造成损失。</p>
 <h3 id="5-%E5%90%88%E6%B3%95%E6%80%A7%E8%AF%B4%E6%98%8E">5 合法性说明</h3>
 <h3 id="5-%E5%90%88%E6%B3%95%E6%80%A7%E8%AF%B4%E6%98%8E">5 合法性说明</h3>
 <p>《国际联网暂行规定》第六条规定:“计算机信息网络直接进行国际联网,必须使用邮电部国家公用电信网提供的国际出入口信道。任何单位和个人不得自行建立或者使用其他信道进行国际联网。”
 <p>《国际联网暂行规定》第六条规定:“计算机信息网络直接进行国际联网,必须使用邮电部国家公用电信网提供的国际出入口信道。任何单位和个人不得自行建立或者使用其他信道进行国际联网。”
 FastGithub本地代理使用的都是“公用电信网提供的国际出入口信道”,从国外Github服务器到国内用户电脑上FastGithub程序的流量,使用的是正常流量通道,其间未对流量进行任何额外加密(仅有网页原有的TLS加密,区别于VPN的流量加密),而FastGithub获取到网页数据之后发生的整个代理过程完全在国内,不再适用国际互联网相关之规定。</p>
 FastGithub本地代理使用的都是“公用电信网提供的国际出入口信道”,从国外Github服务器到国内用户电脑上FastGithub程序的流量,使用的是正常流量通道,其间未对流量进行任何额外加密(仅有网页原有的TLS加密,区别于VPN的流量加密),而FastGithub获取到网页数据之后发生的整个代理过程完全在国内,不再适用国际互联网相关之规定。</p>

+ 9 - 9
README.md

@@ -6,18 +6,18 @@ github加速神器,解决github打不开、用户头像无法加载、releases
 
 
 ### 2 部署方式
 ### 2 部署方式
 #### 2.1 windows本机
 #### 2.1 windows本机
-* 双击运行FastGithub.exe程序
-* `FastGithub.exe start` // 以windows服务安装并启动
-* `FastGithub.exe stop` // 以windows服务卸载并删除
+* 双击运行fastgithub.exe程序
+* `fastgithub.exe start` // 以windows服务安装并启动
+* `fastgithub.exe stop` // 以windows服务卸载并删除
 
 
 #### 2.2 linux本机
 #### 2.2 linux本机
-* 执行`sudo ./FastGithub`
-* 手工安装CACert/FastGithub.cer到受信任的根证书颁发机构
+* 执行`sudo ./fastgithub`
+* 手工安装cacert/fastgithub.cer到受信任的根证书颁发机构
 * 手工设置系统代理为http://127.0.0.1:38457或自动代理为http://127.0.0.1:38457/proxy.pac
 * 手工设置系统代理为http://127.0.0.1:38457或自动代理为http://127.0.0.1:38457/proxy.pac
 
 
 #### 2.3 macOS本机
 #### 2.3 macOS本机
-* 双击运行FastGithub程序
-* 手工安装CACert/FastGithub.cer并设置信任
+* 双击运行fastgithub程序
+* 手工安装cacert/fastgithub.cer并设置信任
 * 手工设置系统代理为http://127.0.0.1:38457或自动代理为http://127.0.0.1:38457/proxy.pac
 * 手工设置系统代理为http://127.0.0.1:38457或自动代理为http://127.0.0.1:38457/proxy.pac
 
 
   
   
@@ -30,11 +30,11 @@ git操作提示`SSL certificate problem`</br>
 #### 3.2 firefox
 #### 3.2 firefox
 firefox提示`连接有潜在的安全问题`</br>
 firefox提示`连接有潜在的安全问题`</br>
 
 
-设置->隐私与安全->证书->查看证书->证书颁发机构,导入FastGithub.cer,勾选信任由此证书颁发机构来标识网站
+设置->隐私与安全->证书->查看证书->证书颁发机构,导入fastgithub.cer,勾选信任由此证书颁发机构来标识网站
   
   
 
 
 ### 4 安全性说明
 ### 4 安全性说明
-FastGithub为每台不同的主机生成自颁发CA证书,保存在CACert文件夹下。客户端设备需要安装和无条件信任自颁发的CA证书,请不要将证书私钥泄露给他人,以免造成损失。
+FastGithub为每台不同的主机生成自颁发CA证书,保存在cacert文件夹下。客户端设备需要安装和无条件信任自颁发的CA证书,请不要将证书私钥泄露给他人,以免造成损失。
 
 
 ### 5 合法性说明
 ### 5 合法性说明
 《国际联网暂行规定》第六条规定:“计算机信息网络直接进行国际联网,必须使用邮电部国家公用电信网提供的国际出入口信道。任何单位和个人不得自行建立或者使用其他信道进行国际联网。”
 《国际联网暂行规定》第六条规定:“计算机信息网络直接进行国际联网,必须使用邮电部国家公用电信网提供的国际出入口信道。任何单位和个人不得自行建立或者使用其他信道进行国际联网。”

+ 7 - 7
pack.sh

@@ -2,14 +2,14 @@
 cd ./FastGithub/bin/publish
 cd ./FastGithub/bin/publish
  
  
 # win-x64
 # win-x64
-zip -r FastGithub_win-x64.zip FastGithub_win-x64 -x "./FastGithub_win-x64/x86/*" -x "./FastGithub_win-x64/*.pdb"
+zip -r fastgithub_win-x64.zip fastgithub_win-x64 -x "./fastgithub_win-x64/x86/*" -x "./fastgithub_win-x64/*.pdb"
 
 
 # linux-x64
 # linux-x64
-chmod 777 ./FastGithub_linux-x64/FastGithub
-chmod 777 ./FastGithub_linux-x64/dnscryptproxy/dnscrypt-proxy
-zip -r FastGithub_linux-x64.zip FastGithub_linux-x64 -x "./FastGithub_linux-x64/x64/*" -x "./FastGithub_linux-x64/x86/*" -x "./FastGithub_linux-x64/*.pdb"
+chmod 777 ./fastgithub_linux-x64/fastgithub
+chmod 777 ./fastgithub_linux-x64/dnscryptproxy/dnscrypt-proxy
+zip -r fastgithub_linux-x64.zip fastgithub_linux-x64 -x "./fastgithub_linux-x64/x64/*" -x "./fastgithub_linux-x64/x86/*" -x "./fastgithub_linux-x64/*.pdb"
 
 
 # osx-x64
 # osx-x64
-chmod 777 ./FastGithub_osx-x64/FastGithub
-chmod 777 ./FastGithub_osx-x64/dnscryptproxy/dnscrypt-proxy
-zip -r FastGithub_osx-x64.zip FastGithub_osx-x64 -x "./FastGithub_osx-x64/x64/*" -x "./FastGithub_osx-x64/x86/*" -x "./FastGithub_osx-x64/*.pdb"
+chmod 777 ./fastgithub_osx-x64/fastgithub
+chmod 777 ./fastgithub_osx-x64/dnscryptproxy/dnscrypt-proxy
+zip -r fastgithub_osx-x64.zip fastgithub_osx-x64 -x "./fastgithub_osx-x64/x64/*" -x "./fastgithub_osx-x64/x86/*" -x "./fastgithub_osx-x64/*.pdb"

+ 3 - 3
publish.cmd

@@ -1,6 +1,6 @@
 cd ./FastGithub
 cd ./FastGithub
 set output=./bin/publish
 set output=./bin/publish
 if exist "%output%" rd /S /Q "%output%"
 if exist "%output%" rd /S /Q "%output%"
-dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r win-x64 -o "%output%/FastGithub_win-x64"
-dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r linux-x64 -o "%output%/FastGithub_linux-x64"
-dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r osx-x64 -o "%output%/FastGithub_osx-x64"
+dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r win-x64 -o "%output%/fastgithub_win-x64"
+dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r linux-x64 -o "%output%/fastgithub_linux-x64"
+dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r osx-x64 -o "%output%/fastgithub_osx-x64"