Compare commits
2
Commits
1.0.0-alpha1
...
1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a6b8eddbb | ||
|
|
1c8dd338f8 |
No files matched your search
@@ -16,6 +16,7 @@ jobs:
|
||||
uses: https://github.com/actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20.1'
|
||||
cache: false
|
||||
- name: release-build
|
||||
run: go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/honeyspot-${{ github.ref_name }}-linux-amd64
|
||||
- name: release-build-windows
|
||||
|
||||
@@ -55,7 +55,7 @@ func asnLookup(ip net.IP) (*geoip2.ASN, error) {
|
||||
|
||||
if asn == nil {
|
||||
var err error
|
||||
asn, err = geoip2.Open("GeoLite2-aSN.mmdb")
|
||||
asn, err = geoip2.Open("GeoLite2-ASN.mmdb")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -409,7 +409,13 @@ func listen(addr string) {
|
||||
}
|
||||
|
||||
// check is ip
|
||||
ip := net.ParseIP(remoteAddr.String())
|
||||
remoteAddrStr := remoteAddr.String()
|
||||
// remove port with IPv6 support
|
||||
if strings.Contains(remoteAddrStr, ":") {
|
||||
remoteAddrStr = remoteAddrStr[:strings.LastIndex(remoteAddrStr, ":")]
|
||||
}
|
||||
|
||||
ip := net.ParseIP(remoteAddrStr)
|
||||
if ip == nil {
|
||||
log.Warnf("Got request from non-IP %s, ignoring request", remoteAddr)
|
||||
_ = conn.Close()
|
||||
|
||||
Reference in new issue
Block a user