diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 index 7d19184..0b0bc1d --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (C) 2020 THREATINT (CYPRUS) LTD) +Copyright (C) 2020-2025 FSTPN Cyprus Limited (formally: "THREATINT (CYPRUS) LTD)") Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 6c9a41b..b610676 --- a/README.md +++ b/README.md @@ -14,15 +14,15 @@ We have received feedback from software developers who were confused about how t specific cases. Examples include but are not limited to: * URLs: * We consider URLs that do not have a scheme as valid. - This is a clear violation of [RFC#3986](https://www.rfc-editor.org/rfc/rfc3986.txt) + This is a clear violation of [RFC #3986](https://www.rfc-editor.org/rfc/rfc3986.txt) that says *The scheme and path components are required, (...)*. We are doing this because of several of our own use cases where we had to process large lists of URLs that did not contain a scheme in each end every case. We neither wanted to add a scheme like `http://` by default nor simply - reject entries. If you, however, need a URL that fully complies to RFC#3986 - (e.g. because you want to use it with other libraries), please call ```NormaliseURLSchema()```. + reject entries. If you, however, need a URL that fully complies to RFC #3986 + (e.g. because you want to use it with other libraries), please call `NormaliseURLSchema()`. * Domains * To get an idea, what a valid domain name looks like, we use the list of TLDs (top-level-domains) from - [IANA](https://data.iana.org/TLD/tlds-alpha-by-domain.txt). + [PublicSuffixes.org]("https://publicsuffix.org/list/public_suffix_list.dat"). * FQDNs * _www.site.tld_ **is not** a URL but a FQDN (fully qualified domain name), because it neither has a path component nor a schema (`http://`, `https://`, etc.). @@ -40,4 +40,4 @@ If something still does not make sense, let us know by starting a discussion or Release under the MIT License. (see LICENSE) ## QA -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/01c46c2a6f10458f8e7f09fff5ae1915)](https://app.codacy.com/gh/THREATINT/go-net/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) \ No newline at end of file +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/01c46c2a6f10458f8e7f09fff5ae1915)](https://app.codacy.com/gh/THREATINT/go-net/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) diff --git a/domain.go b/domain.go old mode 100755 new mode 100644 diff --git a/domain_test.go b/domain_test.go old mode 100755 new mode 100644 diff --git a/fqdn.go b/fqdn.go old mode 100755 new mode 100644 diff --git a/fqdn_test.go b/fqdn_test.go old mode 100755 new mode 100644 diff --git a/go.mod b/go.mod old mode 100755 new mode 100644 index 7a9597e..f71b416 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/THREATINT/go-net -go 1.24.0 +go 1.24 require ( github.com/PuerkitoBio/purell v1.2.1 - golang.org/x/net v0.39.0 + golang.org/x/net v0.42.0 ) -require golang.org/x/text v0.24.0 // indirect +require golang.org/x/text v0.27.0 // indirect diff --git a/go.sum b/go.sum index 565d863..16f6b3d 100644 --- a/go.sum +++ b/go.sum @@ -4,7 +4,11 @@ golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= diff --git a/ip.go b/ip.go old mode 100755 new mode 100644 diff --git a/ip_test.go b/ip_test.go old mode 100755 new mode 100644 diff --git a/publicSuffixList_gen.go b/publicSuffixList_gen.go old mode 100755 new mode 100644 index c387104..c914c28 --- a/publicSuffixList_gen.go +++ b/publicSuffixList_gen.go @@ -167,6 +167,7 @@ var PublicSuffix = []string { "mutual.ar", "net.ar", "org.ar", + "seg.ar", "senasa.ar", "tur.ar", "as", @@ -760,18 +761,57 @@ var PublicSuffix = []string { "soc.dz", "tm.dz", "ec", + "abg.ec", + "adm.ec", + "agron.ec", + "arqt.ec", + "art.ec", + "bar.ec", + "chef.ec", "com.ec", + "cont.ec", + "cpa.ec", + "cue.ec", + "dent.ec", + "dgn.ec", + "disco.ec", + "doc.ec", "edu.ec", + "eng.ec", + "esm.ec", "fin.ec", + "fot.ec", + "gal.ec", "gob.ec", "gov.ec", + "gye.ec", + "ibr.ec", "info.ec", "k12.ec", + "lat.ec", + "loj.ec", "med.ec", "mil.ec", + "mktg.ec", + "mon.ec", "net.ec", + "ntr.ec", + "odont.ec", "org.ec", "pro.ec", + "prof.ec", + "psic.ec", + "psiq.ec", + "pub.ec", + "rio.ec", + "rrpp.ec", + "sal.ec", + "tech.ec", + "tul.ec", + "tur.ec", + "uio.ec", + "vet.ec", + "xxx.ec", "edu", "ee", "aip.ee", @@ -866,10 +906,12 @@ var PublicSuffix = []string { "net.gg", "org.gg", "gh", + "biz.gh", "com.gh", "edu.gh", "gov.gh", "mil.gh", + "net.gh", "org.gh", "gi", "com.gi", @@ -1024,6 +1066,7 @@ var PublicSuffix = []string { "co.id", "desa.id", "go.id", + "kop.id", "mil.id", "my.id", "net.id", @@ -5845,7 +5888,6 @@ var PublicSuffix = []string { "beats", "beauty", "beer", - "bentley", "berlin", "best", "bestbuy", @@ -6195,6 +6237,7 @@ var PublicSuffix = []string { "host", "hosting", "hot", + "hotel", "hotels", "hotmail", "house", @@ -6272,7 +6315,6 @@ var PublicSuffix = []string { "lacaixa", "lamborghini", "lamer", - "lancaster", "land", "landrover", "lanxess", @@ -6467,7 +6509,6 @@ var PublicSuffix = []string { "poker", "politie", "porn", - "pramerica", "praxi", "press", "prime", diff --git a/url.go b/url.go old mode 100755 new mode 100644 diff --git a/url_test.go b/url_test.go old mode 100755 new mode 100644