修改FTP Client 连接参数,ftpClient.EncryptionMode = FtpEncryptionMode.None
This commit is contained in:
@@ -157,5 +157,11 @@
|
|||||||
</None>
|
</None>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
</ItemGroup>
|
</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" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -614,6 +614,7 @@ Public Class Service1
|
|||||||
|
|
||||||
Select Case command
|
Select Case command
|
||||||
Case UtsWebPacket.Commands.Heartbeat
|
Case UtsWebPacket.Commands.Heartbeat
|
||||||
|
'todo:此处需要处理心跳包,获取公网IP与ftp地址
|
||||||
DealHeartbeatPacket(param)
|
DealHeartbeatPacket(param)
|
||||||
|
|
||||||
Case UtsWebPacket.Commands.SetLogType
|
Case UtsWebPacket.Commands.SetLogType
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -237,5 +237,14 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="AUTS.ico" />
|
<Content Include="AUTS.ico" />
|
||||||
</ItemGroup>
|
</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" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -513,7 +513,10 @@ Public Class FrmUpdateConfig
|
|||||||
''' 一键更新
|
''' 一键更新
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Private Sub InstallUpdateService(Optional AlisaName As String = "")
|
Private Sub InstallUpdateService(Optional AlisaName As String = "")
|
||||||
If GetUtsHost() = False Then Return '根据License信息,获取服务器地址
|
'todo:云端获取服务器地址写入注册表
|
||||||
|
'If GetUtsHost() = False Then Return '根据License信息,获取服务器地址
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'校验License
|
'校验License
|
||||||
UpdateInstallTip(20, "Begin CheckLicense...")
|
UpdateInstallTip(20, "Begin CheckLicense...")
|
||||||
|
|||||||
Binary file not shown.
@@ -185,5 +185,11 @@
|
|||||||
<Install>false</Install>
|
<Install>false</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</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" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
'通过使用 "*",如下所示:
|
'通过使用 "*",如下所示:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.4.2.0")>
|
<Assembly: AssemblyVersion("2.4.3.0")>
|
||||||
<Assembly: AssemblyFileVersion("2.4.2.0")>
|
<Assembly: AssemblyFileVersion("2.4.3.0")>
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
'通过使用 "*",如下所示:
|
'通过使用 "*",如下所示:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.8.6.0")>
|
<Assembly: AssemblyVersion("1.8.7.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.8.6.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.
Binary file not shown.
@@ -1 +1 @@
|
|||||||
ca48ce1c02fb0262258d0d8953c37f0ec8538e6954f3dfb45d4c80f6c5c96622
|
f016d1be56f6fedc61741e9fdbb1f0d49638d13457a53b051aea0362c5491bcc
|
||||||
|
|||||||
@@ -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.Runtime.CompilerServices.Unsafe.xml
|
||||||
G:\Git\AUTS\AUTS_Win\bin\Debug\System.Numerics.Vectors.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\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
|
G:\Git\AUTS\AUTS_Win\obj\Debug\AUTS_Win.exe.config
|
||||||
|
|||||||
Binary file not shown.
BIN
Document/Hash.exe
Normal file
BIN
Document/Hash.exe
Normal file
Binary file not shown.
@@ -1,4 +1,5 @@
|
|||||||
Imports FluentFTP
|
Imports System.Text
|
||||||
|
Imports FluentFTP
|
||||||
|
|
||||||
Namespace UTSModule
|
Namespace UTSModule
|
||||||
Public Class FtpService
|
Public Class FtpService
|
||||||
@@ -41,7 +42,10 @@ Namespace UTSModule
|
|||||||
Dim result As Boolean
|
Dim result As Boolean
|
||||||
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
ftpClient.EncryptionMode = FtpEncryptionMode.None
|
||||||
|
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
|
||||||
|
ftpClient.Encoding = Encoding.UTF8
|
||||||
|
|
||||||
ftpClient.Connect()
|
ftpClient.Connect()
|
||||||
ftpClient.Disconnect()
|
ftpClient.Disconnect()
|
||||||
End Using
|
End Using
|
||||||
@@ -59,7 +63,10 @@ Namespace UTSModule
|
|||||||
Dim result As Boolean
|
Dim result As Boolean
|
||||||
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
ftpClient.EncryptionMode = FtpEncryptionMode.None
|
||||||
|
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
|
||||||
|
ftpClient.Encoding = Encoding.UTF8
|
||||||
|
|
||||||
ftpClient.Connect()
|
ftpClient.Connect()
|
||||||
|
|
||||||
result = ftpClient.FileExists(path)
|
result = ftpClient.FileExists(path)
|
||||||
@@ -78,7 +85,10 @@ Namespace UTSModule
|
|||||||
Public Sub FtpUpload(remotePath As String, loadPath As String)
|
Public Sub FtpUpload(remotePath As String, loadPath As String)
|
||||||
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
ftpClient.EncryptionMode = FtpEncryptionMode.None
|
||||||
|
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
|
||||||
|
ftpClient.Encoding = Encoding.UTF8
|
||||||
|
|
||||||
ftpClient.Connect()
|
ftpClient.Connect()
|
||||||
ftpClient.UploadFile(loadPath, remotePath, FtpRemoteExists.Overwrite, True)
|
ftpClient.UploadFile(loadPath, remotePath, FtpRemoteExists.Overwrite, True)
|
||||||
ftpClient.Disconnect()
|
ftpClient.Disconnect()
|
||||||
@@ -93,7 +103,10 @@ Namespace UTSModule
|
|||||||
Public Sub FtpDownload(remotePath As String, loadPath As String)
|
Public Sub FtpDownload(remotePath As String, loadPath As String)
|
||||||
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
ftpClient.EncryptionMode = FtpEncryptionMode.None
|
||||||
|
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
|
||||||
|
ftpClient.Encoding = Encoding.UTF8
|
||||||
|
|
||||||
ftpClient.Connect()
|
ftpClient.Connect()
|
||||||
ftpClient.DownloadFile(loadPath, remotePath)
|
ftpClient.DownloadFile(loadPath, remotePath)
|
||||||
ftpClient.Disconnect()
|
ftpClient.Disconnect()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports System.Threading
|
Imports System.Text
|
||||||
|
Imports System.Threading
|
||||||
Imports FluentFTP
|
Imports FluentFTP
|
||||||
|
|
||||||
Namespace UTSModule
|
Namespace UTSModule
|
||||||
@@ -76,7 +77,9 @@ Namespace UTSModule
|
|||||||
Dim result As Boolean
|
Dim result As Boolean
|
||||||
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
ftpClient.EncryptionMode = FtpEncryptionMode.None
|
||||||
|
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
|
||||||
|
ftpClient.Encoding = Encoding.UTF8
|
||||||
ftpClient.Connect()
|
ftpClient.Connect()
|
||||||
|
|
||||||
result = ftpClient.FileExists(path)
|
result = ftpClient.FileExists(path)
|
||||||
@@ -95,7 +98,9 @@ Namespace UTSModule
|
|||||||
Public Sub CreateDir(remoteDir As String, Optional force As Boolean = False)
|
Public Sub CreateDir(remoteDir As String, Optional force As Boolean = False)
|
||||||
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
ftpClient.EncryptionMode = FtpEncryptionMode.None
|
||||||
|
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
|
||||||
|
ftpClient.Encoding = Encoding.UTF8
|
||||||
ftpClient.Connect()
|
ftpClient.Connect()
|
||||||
ftpClient.CreateDirectory(remoteDir, force)
|
ftpClient.CreateDirectory(remoteDir, force)
|
||||||
ftpClient.Disconnect()
|
ftpClient.Disconnect()
|
||||||
@@ -110,7 +115,9 @@ Namespace UTSModule
|
|||||||
Public Sub FtpUpload(remotePath As String, loadPath As String)
|
Public Sub FtpUpload(remotePath As String, loadPath As String)
|
||||||
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
ftpClient.EncryptionMode = FtpEncryptionMode.None
|
||||||
|
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
|
||||||
|
ftpClient.Encoding = Encoding.UTF8
|
||||||
ftpClient.Connect()
|
ftpClient.Connect()
|
||||||
ftpClient.UploadFile(loadPath, remotePath, FtpRemoteExists.Overwrite, True)
|
ftpClient.UploadFile(loadPath, remotePath, FtpRemoteExists.Overwrite, True)
|
||||||
ftpClient.Disconnect()
|
ftpClient.Disconnect()
|
||||||
@@ -125,7 +132,10 @@ Namespace UTSModule
|
|||||||
Public Sub FtpDownload(remotePath As String, loadPath As String)
|
Public Sub FtpDownload(remotePath As String, loadPath As String)
|
||||||
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
Using ftpClient As FtpClient = New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
ftpClient.EncryptionMode = FtpEncryptionMode.None
|
||||||
|
ftpClient.DataConnectionType = FtpDataConnectionType.PASV
|
||||||
|
ftpClient.Encoding = Encoding.UTF8
|
||||||
|
|
||||||
ftpClient.Connect()
|
ftpClient.Connect()
|
||||||
ftpClient.DownloadFile(loadPath, remotePath)
|
ftpClient.DownloadFile(loadPath, remotePath)
|
||||||
ftpClient.Disconnect()
|
ftpClient.Disconnect()
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user