外网细节修改 增加账号

This commit is contained in:
范露尧
2022-10-27 09:28:40 +08:00
parent 2e5e01a35d
commit cc6cdfa714
5 changed files with 61 additions and 22 deletions

View File

@@ -30,4 +30,10 @@
<Key>NxWKPixtbPX6fRbts2ht0NvWDyVgUbuDxTZiWbWdguU2OuIJhgmHB5Q75kmXkxtJ</Key> <Key>NxWKPixtbPX6fRbts2ht0NvWDyVgUbuDxTZiWbWdguU2OuIJhgmHB5Q75kmXkxtJ</Key>
<ServiceSecret>6EBbbHHcGJpDKaNwjhrV4WHrftabpyDYILtlFW7SSZOwNxCnb0XEsifOqEpgdfjo</ServiceSecret> <ServiceSecret>6EBbbHHcGJpDKaNwjhrV4WHrftabpyDYILtlFW7SSZOwNxCnb0XEsifOqEpgdfjo</ServiceSecret>
</AccountInfo> </AccountInfo>
<AccountInfo>
<AppID>Reg.Custom.SourceCode</AppID>
<AppSecret>ab2cb0aa78cb986d3d05059b8f9bafee</AppSecret>
<Key>86bf52124bc423351c9da81cb3dd8c94</Key>
<ServiceSecret>Reg.Custom.SourceCode</ServiceSecret>
</AccountInfo>
</ArrayOfAccountInfo> </ArrayOfAccountInfo>

View File

@@ -12,6 +12,21 @@
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@@ -105,5 +120,12 @@
<Name>Getf.Service.Transfer.Core</Name> <Name>Getf.Service.Transfer.Core</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

@@ -12,17 +12,17 @@ using System.Threading.Tasks;
namespace Getf.Service.Transfer.WinService namespace Getf.Service.Transfer.WinService
{ {
public partial class Service1 : ServiceBase public partial class Service1 : ServiceBase
{ {
private Server _Server; private Server _Server;
public Service1() public Service1()
{ {
InitializeComponent(); InitializeComponent();
} }
protected override void OnStart(string[] args) protected override void OnStart(string[] args)
{ {
/*var ipInfo = System.Configuration.ConfigurationManager.AppSettings["IpInfo"].Split(':'); /*var ipInfo = System.Configuration.ConfigurationManager.AppSettings["IpInfo"].Split(':');
_Server = new Server(); _Server = new Server();
if (ipInfo[0] != String.Empty) if (ipInfo[0] != String.Empty)
{ {
@@ -34,16 +34,19 @@ namespace Getf.Service.Transfer.WinService
} }
_Server.Start();*/ _Server.Start();*/
var boostrap = BootstrapFactory.CreateBootstrap(); var boostrap = BootstrapFactory.CreateBootstrap();
boostrap.Initialize(); boostrap.Initialize();
boostrap.Start(); boostrap.Start();
} }
protected override void OnStop() protected override void OnStop()
{ {
_Server.Stop(); if (_Server != null)
_Server.Dispose(); {
_Server = null; _Server.Stop();
} _Server.Dispose();
} _Server = null;
}
}
}
} }

View File

@@ -30,4 +30,10 @@
<Key>NxWKPixtbPX6fRbts2ht0NvWDyVgUbuDxTZiWbWdguU2OuIJhgmHB5Q75kmXkxtJ</Key> <Key>NxWKPixtbPX6fRbts2ht0NvWDyVgUbuDxTZiWbWdguU2OuIJhgmHB5Q75kmXkxtJ</Key>
<ServiceSecret>6EBbbHHcGJpDKaNwjhrV4WHrftabpyDYILtlFW7SSZOwNxCnb0XEsifOqEpgdfjo</ServiceSecret> <ServiceSecret>6EBbbHHcGJpDKaNwjhrV4WHrftabpyDYILtlFW7SSZOwNxCnb0XEsifOqEpgdfjo</ServiceSecret>
</AccountInfo> </AccountInfo>
<AccountInfo>
<AppID>Reg.Custom.SourceCode</AppID>
<AppSecret>ab2cb0aa78cb986d3d05059b8f9bafee</AppSecret>
<Key>86bf52124bc423351c9da81cb3dd8c94</Key>
<ServiceSecret>Reg.Custom.SourceCode</ServiceSecret>
</AccountInfo>
</ArrayOfAccountInfo> </ArrayOfAccountInfo>

View File

@@ -81,7 +81,9 @@
<None Include="supersocket.sh" /> <None Include="supersocket.sh" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="AccountConfig.xml" /> <Content Include="AccountConfig.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>