mirror of
https://github.com/FastTunnel/FastTunnel.git
synced 2025-02-08 02:39:29 +08:00
检查配置文件参数 WebDomain
This commit is contained in:
parent
856f19c6a6
commit
dc11b4efce
|
@ -3,6 +3,7 @@ using FastTunnel.Core.Models;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using FastTunnel.Core.Handlers.Server;
|
||||
using System.Collections.Concurrent;
|
||||
using System;
|
||||
|
||||
namespace FastTunnel.Core.Core
|
||||
{
|
||||
|
@ -25,10 +26,21 @@ namespace FastTunnel.Core.Core
|
|||
public void Run()
|
||||
{
|
||||
_logger.LogDebug("FastTunnel Server Start");
|
||||
|
||||
CheckSettins();
|
||||
|
||||
ListenClient();
|
||||
ListenHttp();
|
||||
}
|
||||
|
||||
private void CheckSettins()
|
||||
{
|
||||
if (string.IsNullOrEmpty(ServerSettings.WebDomain))
|
||||
{
|
||||
throw new Exception("[WebDomain] 配置不能为空");
|
||||
}
|
||||
}
|
||||
|
||||
private void ListenClient()
|
||||
{
|
||||
IListener client_listener = new AsyncListener(ServerSettings.BindAddr, ServerSettings.BindPort, _logger);
|
||||
|
|
Loading…
Reference in New Issue
Block a user