mirror of
https://github.com/FastTunnel/FastTunnel.git
synced 2025-02-08 02:39:29 +08:00
Merge branch 'v2' of https://github.com/FastTunnel/FastTunnel into v2
# Conflicts: # README.md # README_zh.md
This commit is contained in:
commit
d18581826c
|
@ -17,9 +17,15 @@
|
|||
<None Update="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="install.bat">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="log4net.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="uninstall.bat">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ProjectExtensions>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
CHCP 65001
|
||||
@echo off
|
||||
color 0e
|
||||
@echo ==================================
|
||||
@echo 提醒:请右键本文件,用管理员方式打开。
|
||||
@echo 提醒:请右键本文件,用管理员方式打开。
|
||||
@echo ==================================
|
||||
@echo Start Install FastTunnel.Client
|
||||
|
||||
sc create FastTunnel.Client binPath=%~dp0\FastTunnel.Client.exe start= auto
|
||||
sc description FastTunnel.Client "FastTunnel-开源内网穿透服务,仓库地址:https://github.com/SpringHgui/FastTunnel star项目以支持作者"
|
||||
sc description FastTunnel.Client "FastTunnel-开源内网穿透服务,仓库地址:https://github.com/SpringHgui/FastTunnel star项目以支持作者"
|
||||
Net Start FastTunnel.Client
|
||||
pause
|
|
@ -1,7 +1,8 @@
|
|||
CHCP 65001
|
||||
@echo off
|
||||
color 0e
|
||||
@echo ==================================
|
||||
@echo 提醒:请右键本文件,用管理员方式打开。
|
||||
@echo 提醒:请右键本文件,用管理员方式打开。
|
||||
@echo ==================================
|
||||
@echo Start Remove FastTunnel.Client
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace FastTunnel.Core.Handlers.Server
|
|||
_logger.LogInformation($"WWW {www}");
|
||||
|
||||
server.WebList.AddOrUpdate(www, info, (key, oldInfo) => { return info; });
|
||||
(proxyConfig as InMemoryConfigProvider).AddWeb(hostName);
|
||||
(proxyConfig as InMemoryConfigProvider).AddWeb(www);
|
||||
|
||||
await client.SendCmdAsync(MessageType.Log, $" HTTP | http://{www} => {item.LocalIp}:{item.LocalPort}", CancellationToken.None);
|
||||
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="logs\**" />
|
||||
<Content Remove="logs\**" />
|
||||
|
@ -12,10 +20,12 @@
|
|||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0-preview.4.21253.7" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="6.0.0-preview.4.21253.7" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="5.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.1.5" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.1.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FastTunnel.Api\FastTunnel.Api.csproj" />
|
||||
<ProjectReference Include="..\FastTunnel.Core\FastTunnel.Core.csproj" />
|
||||
|
|
|
@ -7,7 +7,9 @@ using Microsoft.Extensions.Configuration;
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Options;
|
||||
#if DEBUG
|
||||
using Microsoft.OpenApi.Models;
|
||||
#endif
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -26,6 +28,8 @@ namespace FastTunnel.Server
|
|||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers();
|
||||
|
||||
#if DEBUG
|
||||
services.AddSwaggerGen(c =>
|
||||
{
|
||||
c.SwaggerDoc("v2", new OpenApiInfo { Title = "FastTunel.Api", Version = "v2" });
|
||||
|
@ -34,6 +38,7 @@ namespace FastTunnel.Server
|
|||
// -------------------FastTunnel STEP1 OF 3------------------
|
||||
services.AddFastTunnelServer(Configuration.GetSection("ServerSettings"));
|
||||
// -------------------FastTunnel STEP1 END--------------------
|
||||
#endif
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
@ -42,8 +47,10 @@ namespace FastTunnel.Server
|
|||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
#if DEBUG
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v2/swagger.json", "FastTunel.WebApi v2"));
|
||||
#endif
|
||||
}
|
||||
|
||||
// -------------------FastTunnel STEP2 OF 3------------------
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CHCP 65001
|
||||
@echo off
|
||||
color 0e
|
||||
@echo ==================================
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
CHCP 65001
|
||||
@echo off
|
||||
color 0e
|
||||
@echo ==================================
|
||||
@echo 提醒:请右键本文件,用管理员方式打开。
|
||||
@echo 提醒:请右键本文件,用管理员方式打开。
|
||||
@echo ==================================
|
||||
@echo Start Remove FastTunnel.Server
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@ But do not use this service for important items.
|
|||
## Repositories
|
||||
|
||||
GitHub : [FastTunnel](https://github.com/SpringHgui/FastTunnel)
|
||||
Gitee: [FastTunnel](https://gitee.com/Hgui/FastTunnel)
|
||||
Gitee: [FastTunnel](https://gitee.com/Hgui/FastTunnel)
|
||||
Docs: https://doc.suidao.io
|
||||
|
||||
**If helpful, click on ⭐Star to support this project, please submit an issue if you have needs and bugs, and welcome coder to PR**
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user