修改FTP Client 连接参数,ftpClient.EncryptionMode = FtpEncryptionMode.None

This commit is contained in:
2025-06-06 22:34:31 +08:00
parent aebe88bc2d
commit 4581aa6492
28 changed files with 78 additions and 17 deletions

View File

@@ -157,5 +157,11 @@
</None>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
<Project>{33C6456C-F00D-41AC-A6FB-DB0601495C6A}</Project>
<Name>UTS_Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -614,6 +614,7 @@ Public Class Service1
Select Case command
Case UtsWebPacket.Commands.Heartbeat
'todo:此处需要处理心跳包,获取公网IP与ftp地址
DealHeartbeatPacket(param)
Case UtsWebPacket.Commands.SetLogType

File diff suppressed because one or more lines are too long

View File

@@ -237,5 +237,14 @@
<ItemGroup>
<Content Include="AUTS.ico" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
<Project>{33C6456C-F00D-41AC-A6FB-DB0601495C6A}</Project>
<Name>UTS_Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -513,7 +513,10 @@ Public Class FrmUpdateConfig
''' 一键更新
''' </summary>
Private Sub InstallUpdateService(Optional AlisaName As String = "")
If GetUtsHost() = False Then Return '根据License信息,获取服务器地址
'todo云端获取服务器地址写入注册表
'If GetUtsHost() = False Then Return '根据License信息,获取服务器地址
'校验License
UpdateInstallTip(20, "Begin CheckLicense...")

View File

@@ -185,5 +185,11 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
<Project>{33C6456C-F00D-41AC-A6FB-DB0601495C6A}</Project>
<Name>UTS_Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
'通过使用 "*",如下所示:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.2.0")>
<Assembly: AssemblyFileVersion("2.4.2.0")>
<Assembly: AssemblyVersion("2.4.3.0")>
<Assembly: AssemblyFileVersion("2.4.3.0")>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
'通过使用 "*",如下所示:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.8.6.0")>
<Assembly: AssemblyFileVersion("1.8.6.0")>
<Assembly: AssemblyVersion("1.8.7.0")>
<Assembly: AssemblyFileVersion("1.8.7.0")>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
ca48ce1c02fb0262258d0d8953c37f0ec8538e6954f3dfb45d4c80f6c5c96622
f016d1be56f6fedc61741e9fdbb1f0d49638d13457a53b051aea0362c5491bcc

View File

@@ -183,4 +183,17 @@ G:\Git\AUTS\AUTS_Win\bin\Debug\System.Buffers.xml
G:\Git\AUTS\AUTS_Win\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
G:\Git\AUTS\AUTS_Win\bin\Debug\System.Numerics.Vectors.xml
G:\Git\AUTS\AUTS_Win\bin\Debug\System.Threading.Tasks.Extensions.xml
G:\Git\AUTS\AUTS_Win\bin\Debug\Google.Protobuf.dll
G:\Git\AUTS\AUTS_Win\bin\Debug\Zstandard.Net.dll
G:\Git\AUTS\AUTS_Win\bin\Debug\K4os.Compression.LZ4.Streams.dll
G:\Git\AUTS\AUTS_Win\bin\Debug\BouncyCastle.Crypto.dll
G:\Git\AUTS\AUTS_Win\bin\Debug\Ubiety.Dns.Core.dll
G:\Git\AUTS\AUTS_Win\bin\Debug\K4os.Compression.LZ4.dll
G:\Git\AUTS\AUTS_Win\bin\Debug\K4os.Hash.xxHash.dll
G:\Git\AUTS\AUTS_Win\bin\Debug\MySql.Data.xml
G:\Git\AUTS\AUTS_Win\bin\Debug\Google.Protobuf.pdb
G:\Git\AUTS\AUTS_Win\bin\Debug\Google.Protobuf.xml
G:\Git\AUTS\AUTS_Win\bin\Debug\K4os.Compression.LZ4.Streams.xml
G:\Git\AUTS\AUTS_Win\bin\Debug\K4os.Compression.LZ4.xml
G:\Git\AUTS\AUTS_Win\bin\Debug\K4os.Hash.xxHash.xml
G:\Git\AUTS\AUTS_Win\obj\Debug\AUTS_Win.exe.config

BIN
Document/Hash.exe Normal file

Binary file not shown.

View File

@@ -1,4 +1,5 @@
Imports FluentFTP
Imports System.Text
Imports FluentFTP
Namespace UTSModule
Public Class FtpService
@@ -41,7 +42,10 @@ Namespace UTSModule
Dim result As Boolean
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
ftpClient.EncryptionMode = FtpEncryptionMode.None
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
ftpClient.Encoding = Encoding.UTF8
ftpClient.Connect()
ftpClient.Disconnect()
End Using
@@ -59,7 +63,10 @@ Namespace UTSModule
Dim result As Boolean
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
ftpClient.EncryptionMode = FtpEncryptionMode.None
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
ftpClient.Encoding = Encoding.UTF8
ftpClient.Connect()
result = ftpClient.FileExists(path)
@@ -78,7 +85,10 @@ Namespace UTSModule
Public Sub FtpUpload(remotePath As String, loadPath As String)
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
ftpClient.EncryptionMode = FtpEncryptionMode.None
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
ftpClient.Encoding = Encoding.UTF8
ftpClient.Connect()
ftpClient.UploadFile(loadPath, remotePath, FtpRemoteExists.Overwrite, True)
ftpClient.Disconnect()
@@ -93,7 +103,10 @@ Namespace UTSModule
Public Sub FtpDownload(remotePath As String, loadPath As String)
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
ftpClient.EncryptionMode = FtpEncryptionMode.None
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
ftpClient.Encoding = Encoding.UTF8
ftpClient.Connect()
ftpClient.DownloadFile(loadPath, remotePath)
ftpClient.Disconnect()

View File

@@ -1,4 +1,5 @@
Imports System.Threading
Imports System.Text
Imports System.Threading
Imports FluentFTP
Namespace UTSModule
@@ -76,7 +77,9 @@ Namespace UTSModule
Dim result As Boolean
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
ftpClient.EncryptionMode = FtpEncryptionMode.None
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
ftpClient.Encoding = Encoding.UTF8
ftpClient.Connect()
result = ftpClient.FileExists(path)
@@ -95,7 +98,9 @@ Namespace UTSModule
Public Sub CreateDir(remoteDir As String, Optional force As Boolean = False)
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
ftpClient.EncryptionMode = FtpEncryptionMode.None
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
ftpClient.Encoding = Encoding.UTF8
ftpClient.Connect()
ftpClient.CreateDirectory(remoteDir, force)
ftpClient.Disconnect()
@@ -110,7 +115,9 @@ Namespace UTSModule
Public Sub FtpUpload(remotePath As String, loadPath As String)
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
ftpClient.EncryptionMode = FtpEncryptionMode.None
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
ftpClient.Encoding = Encoding.UTF8
ftpClient.Connect()
ftpClient.UploadFile(loadPath, remotePath, FtpRemoteExists.Overwrite, True)
ftpClient.Disconnect()
@@ -125,7 +132,10 @@ Namespace UTSModule
Public Sub FtpDownload(remotePath As String, loadPath As String)
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
ftpClient.EncryptionMode = FtpEncryptionMode.None
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
ftpClient.Encoding = Encoding.UTF8
ftpClient.Connect()
ftpClient.DownloadFile(loadPath, remotePath)
ftpClient.Disconnect()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.