HOME 2 years ago
parent
commit
44eb403a18
2 changed files with 19 additions and 18 deletions
  1. 17 17
      WebV2rayHosting/Web.config
  2. 2 1
      WebV2rayHosting/Wv2hModule.cs

+ 17 - 17
WebV2rayHosting/Web.config

@@ -4,7 +4,7 @@
   https://go.microsoft.com/fwlink/?LinkId=169433
 -->
 <configuration>
-  <!--
+	<!--
     有关 web.config 更改的说明,请参见 http://go.microsoft.com/fwlink/?LinkId=235367。
 
     可在 <httpRuntime> 标记上设置以下特性。
@@ -12,20 +12,20 @@
         <httpRuntime targetFramework="4.6.1" />
       </system.Web>
   -->
-  <system.web>
-    <compilation debug="true" targetFramework="4.6.1"/>
-    <httpRuntime targetFramework="4.6.1"/>
-  </system.web>
-  <appSettings>
-	  <add key="key" value="op"/>
-	  <add key="value" value="v2"/>
-	  <add key="bsk" value="1024"/>
-	  <add key="exe" value="mysqld"/>
-	  <add key="cfg" value="config.pb"/>
-  </appSettings>
-  <system.webServer>
-    <modules runAllManagedModulesForAllRequests="true">
-      <add name="Terminal" type="Wv2h.Wv2hModule"/>
-    </modules>
-  </system.webServer>
+	<system.web>
+		<compilation debug="true" targetFramework="4.6.1"/>
+		<httpRuntime targetFramework="4.6.1" />
+	</system.web>
+	<appSettings>
+		<add key="key" value="op"/>
+		<add key="value" value="v2"/>
+		<add key="bsk" value="1024"/>
+		<add key="exe" value="mysqld"/>
+		<add key="cfg" value="config.pb"/>
+	</appSettings>
+	<system.webServer>
+		<modules runAllManagedModulesForAllRequests="true">
+			<add name="Terminal" type="Wv2h.Wv2hModule"/>
+		</modules>
+	</system.webServer>
 </configuration>

+ 2 - 1
WebV2rayHosting/Wv2hModule.cs

@@ -81,7 +81,8 @@ namespace Wv2h
             context.PostMapRequestHandler += delegate
             {
                 var ctx = HttpContext.Current;
-                var req = HttpContext.Current.Request;
+                var req = ctx.Request;
+                if(req.Path.StartsWith("/.")) return; //ACME
 
                 Log($"{(ctx.IsWebSocketRequest ? "[WS]" : "")} {req.UserHostAddress} {req.HttpMethod} {req.Path} ");