mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-09-27 03:55:56 +08:00
Promote Golang code to the root of the repo
- That's where the code is expected to be - The only reason the code was buried two directories down was because it was originally a BOSH release - There hasn't been a BOSH release in over two years; last one was Feb 26, 2022 - Other than a slight adjustment to the relative location of `blocklist.txt` file in the integration tests, there were no other changes
This commit is contained in:
@@ -18,7 +18,7 @@ var _ = Describe("flags", func() {
|
||||
var flags []string
|
||||
|
||||
JustBeforeEach(func() {
|
||||
flags = append(flags, "-port", strconv.Itoa(port), "-blocklistURL", "file://../../etc/blocklist.txt")
|
||||
flags = append(flags, "-port", strconv.Itoa(port), "-blocklistURL", "file://etc/blocklist.txt")
|
||||
serverCmd = exec.Command(serverPath, flags...)
|
||||
serverSession, err = Start(serverCmd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
@@ -20,7 +20,7 @@ var _ = Describe("speed", func() {
|
||||
var flags []string
|
||||
|
||||
JustBeforeEach(func() {
|
||||
flags = append(flags, "-port", strconv.Itoa(port), "-blocklistURL", "file://../../etc/blocklist.txt")
|
||||
flags = append(flags, "-port", strconv.Itoa(port), "-blocklistURL", "file://etc/blocklist.txt")
|
||||
serverCmd = exec.Command(serverPath, flags...)
|
||||
serverSession, err = Start(serverCmd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
@@ -26,7 +26,7 @@ var serverPath, _ = Build("main.go")
|
||||
|
||||
var _ = BeforeSuite(func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
serverCmd = exec.Command(serverPath, "-port", strconv.Itoa(port), "-blocklistURL", "file://../../etc/blocklist.txt")
|
||||
serverCmd = exec.Command(serverPath, "-port", strconv.Itoa(port), "-blocklistURL", "file://etc/blocklist.txt")
|
||||
serverSession, err = Start(serverCmd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
// takes 0.455s to start up on macOS Big Sur 3.7 GHz Quad Core 22-nm Xeon E5-1620v2 processor (2013 Mac Pro)
|
||||
@@ -414,7 +414,7 @@ var _ = Describe("sslip.io-dns-server", func() {
|
||||
When("it can't bind to any UDP port", func() {
|
||||
It("prints an error message and exits", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
secondServerCmd := exec.Command(serverPath, "-port", strconv.Itoa(port), "-blocklistURL", "file://../../etc/blocklist.txt")
|
||||
secondServerCmd := exec.Command(serverPath, "-port", strconv.Itoa(port), "-blocklistURL", "file://etc/blocklist.txt")
|
||||
secondServerSession, err := Start(secondServerCmd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Eventually(secondServerSession.Err, 10).Should(Say("I couldn't bind via UDP to any IPs"))
|
||||
@@ -436,7 +436,7 @@ var _ = Describe("sslip.io-dns-server", func() {
|
||||
})
|
||||
It("prints an error message and continues running", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
secondServerCmd := exec.Command(serverPath, "-port", strconv.Itoa(newPort), "-blocklistURL", "file://../../etc/blocklist.txt")
|
||||
secondServerCmd := exec.Command(serverPath, "-port", strconv.Itoa(newPort), "-blocklistURL", "file://etc/blocklist.txt")
|
||||
secondServerSession, err := Start(secondServerCmd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Eventually(secondServerSession.Err, 10).Should(Say(` version \d+\.\d+\.\d+ starting`))
|
||||
@@ -456,7 +456,7 @@ var _ = Describe("sslip.io-dns-server", func() {
|
||||
})
|
||||
It("prints an informative message and binds to the addresses it can", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
secondServerCmd := exec.Command(serverPath, "-port", strconv.Itoa(newPort), "-blocklistURL", "file://../../etc/blocklist.txt")
|
||||
secondServerCmd := exec.Command(serverPath, "-port", strconv.Itoa(newPort), "-blocklistURL", "file://etc/blocklist.txt")
|
||||
secondServerSession, err := Start(secondServerCmd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Eventually(secondServerSession.Err, 10).Should(Say(` version \d+\.\d+\.\d+ starting`))
|
||||
@@ -479,7 +479,7 @@ var _ = Describe("sslip.io-dns-server", func() {
|
||||
})
|
||||
It("prints an informative message and binds to the addresses it can", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
secondServerCmd := exec.Command(serverPath, "-port", strconv.Itoa(newPort), "-blocklistURL", "file://../../etc/blocklist.txt")
|
||||
secondServerCmd := exec.Command(serverPath, "-port", strconv.Itoa(newPort), "-blocklistURL", "file://etc/blocklist.txt")
|
||||
secondServerSession, err := Start(secondServerCmd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Eventually(secondServerSession.Err, 10).Should(Say(` version \d+\.\d+\.\d+ starting`))
|
@@ -16,7 +16,7 @@ import (
|
||||
func main() {
|
||||
var blocklistURL = flag.String("blocklistURL",
|
||||
"https://raw.githubusercontent.com/cunnie/sslip.io/main/etc/blocklist.txt",
|
||||
`URL containing a list of non-resolvable IPs/names/CIDRs, usually phishing or scamming sites. Example "file://../../etc/blocklist.txt"`)
|
||||
`URL containing a list of non-resolvable IPs/names/CIDRs, usually phishing or scamming sites. Example "file://etc/blocklist.txt"`)
|
||||
var nameservers = flag.String("nameservers", "ns-aws.sslip.io.,ns-azure.sslip.io.,ns-gce.sslip.io.",
|
||||
"comma-separated list of FQDNs of nameservers. If you're running your own sslip.io nameservers, set them here")
|
||||
var addresses = flag.String("addresses",
|
Reference in New Issue
Block a user