- Check domain name availability using Domainr's JSON API.
domainr / epp Goto Github PK
View Code? Open in Web Editor NEWEPP (Extensible Provisioning Protocol) client for Go
License: MIT License
EPP (Extensible Provisioning Protocol) client for Go
License: MIT License
The public LoginResult
field is marked as deprecated but is still actively used by the package itself (specifically the public Login
method writes to this field)...
https://github.com/domainr/epp/blob/main/conn.go#L45-L46
What is the upgrade path for an application using the value assigned to LoginResult
?
We successfully connected EPP server but fail when sending manual command (domain registration). We tried several variants using the underlying TLS connection and even modifying the library. We are stuck with the same error every time
Example code:
func euStart() {
dialer := &net.Dialer{
LocalAddr: &net.TCPAddr{
IP: net.ParseIP("xx.xx.xx.xxx"),
Port: 0}}
eppConn, err := tls.DialWithDialer(dialer, "tcp", "xxx:700", nil)
if err != nil {
fmt.Println("EPP dial error: ", err)
os.Exit(3)
}
eppClient, err := epp.NewConn(eppConn)
if err != nil {
fmt.Println("EPP init error: ", err)
os.Exit(3)
}
err = eppClient.Login("xxx", "xxx", "")
if err != nil {
fmt.Println("EPP login error: ", err)
os.Exit(3)
}
domain := "test6890.eu"
xml := "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><command><create><domain:create xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\"><domain:name>" + domain + "</domain:name><domain:registrant>xxx</domain:registrant><domain:contact type=\"billing\">xxx</domain:contact><domain:contact type=\"tech\">xxx</domain:contact><domain:authInfo><domain:pw> </domain:pw></domain:authInfo></domain:create></create></command></epp>"
eppClient.Conn.Write([]byte(xml + "\n"))
}
We get a runtime error at time of writing to connection (last line):
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x61b62b]
goroutine 1 [running]:
main.euReg(0x7ffc6eaef84d, 0xb)
/home/debian/xxx.go:186 +0xdb
main.xxx(0x7ffc6eaef84d, 0xb)
/home/debian/xxx.go:57 +0x3ae
main.main()
/home/debian/xxx.go:31 +0xd2
Any ideas? Thanks
From @wbond:
I think the remaining thing to do here is to default uppercase TLD, and use the switch for the
dotTLD
form ones. Otherwise we'll have to hardcode every Verisign TLD into the codeAlternatively we make it more extensible and pass the subProduct ID in via the extension data parameter and use separate code to determine which should be prefixed with
dot
. That waydomainr/epp
is able to handle other registries that may use thenamestore
extension.
When I run cmd/epp.go to connect remote epp server ,show me the error
Loading CA certificate from cacert.pem
Loading certificate cert.pem and key key.pem
Connecting to epp.registrysystem.net:700
Establishing TLS connection
remote error: tls: handshake failure
EXITING
exit status 1
// Set up TLS
cfg := &tls.Config{
PreferServerCipherSuites:true,
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
},
MinVersion: tls.VersionTLS11,
MaxVersion: tls.VersionTLS11,
InsecureSkipVerify:true,
ServerName: host,
}
go version go1.10.3 linux/amd64
Thanks a lot!
To query Verisign EPP servers, you need to use the namestoreExt (https://www.verisign.com/assets/namestore-extension.pdf?inc=www.verisigninc.com) and provide a subProduct from the following:
dotCOM
dotBZ
dotCC
dotTV
dotCOM
dotNET
dotEDU
dotJOBS
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.