Comments (4)
You need to provide a TLSConfig:
dialConfig := goftp.Config{
User: "User",
Password: "Password",
TLSMode: goftp.TLSExplicit,
TLSConfig: &tls.Config{
MinVersion: tls.VersionTLS12,
NextProtos: []string{"http/1.1"},
ServerName: strings.Split(addr, ":")[0],
},
}
from goftp.
jwatson-gcu thank for the update . But still i am getting error .I applied above snippet
ftpconfig := goftp.Config{
User: "******",
Password: "******",
TLSMode: goftp.TLSExplicit,
TLSConfig: &tls.Config{
MinVersion: tls.VersionTLS12,
NextProtos: []string{"http/1.1"},
ServerName: strings.Split("*****", ":")[0], #### in place of star i have taken ip addres like 34.89.17.98:21
},
}
fmt.Println(ftpconfig)
client, err := goftp.DialConfig(ftpconfig, "*****") ####here also same
if err != nil {
fmt.Println(err)
}
defer client.Close()
error:
connected to ftp server successfully!!!
error writing command: tls: server selected unsupported protocol version 301
[]
You need to provide a TLSConfig:
dialConfig := goftp.Config{ User: "User", Password: "Password", TLSMode: goftp.TLSExplicit, TLSConfig: &tls.Config{ MinVersion: tls.VersionTLS12, NextProtos: []string{"http/1.1"}, ServerName: strings.Split(addr, ":")[0], }, }
from goftp.
The error indicates that the server you are connecting to does not support TLS 1.2 i.e. MinVersion: tls.VersionTLS12
Remove MinVersion
from tls.Config
and give it a try.
from goftp.
thank's for the update
from goftp.
Related Issues (20)
- No error when unable to connect HOT 3
- Folder containing closing bracket ] don't MLSD / LIST content HOT 1
- Go module version tags?
- CWD is not work HOT 2
- error in ReadDir: failed parsing LIST entry: in Microsoft FTP Service
- Error storing files
- Failed parsing MLSD response on some servers HOT 2
- 出错的时候,数据连接没有关闭 HOT 1
- Retrieve a file from offset? HOT 2
- Failing data connection with STARTTLS (Explicit TLS): tls session not reused HOT 13
- proxy support HOT 7
- Microsoft FTP Service
- Future of goftp HOT 5
- How to support SOCKS ?
- ReadDir report linked file name instead of link name
- Trasfer mode MODE C (S=stream, B=block, C=compressed).
- error reading response: unexpected EOF while storing a 0 file size using TLS HOT 3
- ReadDir timeout because of weird port usage HOT 1
- ReadDir() cannot read windows hosted ftp directories
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goftp.