Skip to content

Commit

Permalink
使用go1.9编译
Browse files Browse the repository at this point in the history
  • Loading branch information
Kisesy committed Jan 15, 2018
1 parent e373e4e commit f259f22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- tip
- 1.9

before_install:
- go get github.com/Kisesy/gscan_quic
Expand Down
10 changes: 4 additions & 6 deletions quic.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ import (
var errNoSuchBucket = []byte("<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist.</Message></Error>")

func testQuic(ip string, config *ScanConfig, record *ScanRecord) bool {
addr := net.JoinHostPort(ip, "443")

start := time.Now()
udpAddr, err := net.ResolveUDPAddr("udp", addr)
if err != nil {
return false
}

udpConn, err := net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: 0})
if err != nil {
return false
Expand All @@ -49,6 +44,9 @@ func testQuic(ip string, config *ScanConfig, record *ScanRecord) bool {
InsecureSkipVerify: true,
ServerName: serverName,
}

udpAddr := &net.UDPAddr{IP: net.ParseIP(ip), Port: 443}
addr := net.JoinHostPort(serverName, "443")
quicSessn, err := quic.Dial(udpConn, udpAddr, addr, tlsCfg, quicCfg)
if err != nil {
return false
Expand Down

0 comments on commit f259f22

Please sign in to comment.