ycd / dstp Goto Github PK
View Code? Open in Web Editor NEW🧪 Run common networking tests against any site.
License: MIT License
🧪 Run common networking tests against any site.
License: MIT License
Hello!
I tried with a website down like jetable.org
But no answer/summary from the tool dstp 💥
Is there a timeout option ?
➜ dstp jetable.org
^C
~ took 8m 32s
➜ dig +short jetable.org
193.200.42.56
➜ ping jetable.org
PING jetable.org (193.200.42.56): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
^C
--- jetable.org ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
Add cron-job ability so that the dstp can re-run the tests against the given site in the specified amount of time and add the logic for announcing results in slack, discord etc.
An example usage in my mind:
$ export SLACK_TOKEN="token"
$ export SLACK_CHANNEL_ID="1234567"
$ dstp --cron=300 --announce="slack" 8.8.8.8
Then this re-runs the tests in every 5 minutes(300 sec) and announces the results to given slack channel.
Is it possible to install this tool with go install
? Any reasons why you guys prefer go build + cp? Interesting tool!
Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the ycd/tap tap (not Homebrew/brew or Homebrew/core):
/opt/homebrew/Library/Taps/ycd/homebrew-tap/Formula/dstp.rb:6
brew formula needs update.
I got following error in WSL (Windows Subsystem for Linux) terminal (Ubuntu 20.04):
me@JNNH00004L:~$ dstp https://google.com
Ping: failed to run ping: socket: permission denied
DNS: failed to run ping: socket: permission denied
SystemDNS: resolving 216.58.201.78, 2a00:1450:4014:800::200e
TLS: certificate is valid for 56 more days
HTTPS: got 200 OK
Ping command is working OK:
me@JNNH00004L:~$ ping google.com
PING google.com (216.58.201.78) 56(84) bytes of data.
64 bytes from prg03s01-in-f78.1e100.net (216.58.201.78): icmp_seq=1 ttl=113 time=24.6 ms
64 bytes from prg03s01-in-f78.1e100.net (216.58.201.78): icmp_seq=2 ttl=113 time=20.9 ms
Thanks for creating this project. I just came across it and was eager trying it out, installed it and wondered why the output on my terminal was:
$ dstp
"docker container stop" requires at least 1 argument.
See 'docker container stop --help'.
Usage: docker container stop [OPTIONS] CONTAINER [CONTAINER...]
Stop one or more running containers
This is because of the Docker Plugin for oh-my-zsh
. It provides an alias for the Docker stop
command.
Maybe this is something you'd like to mention in your README.
Thanks for making such a useful tool! It would be swell if it could be used to test services running on alternate ports. Plex, for example, often uses port 32400
:
# A standard service listening on 443 with a trusted cert.
❯ dstp https://standardService.myDomain.tld
Ping: 251.027µs
DNS: resolving VALID_IP
SystemDNS: resolving VALID_IP
TLS: certificate is valid for 79 more days
HTTPS: got 200 OK
# A Plex server running remotely on port 32400 with a trusted cert.
❯ dstp https://plex.myDomian.tld:32400
Ping: no response (this is expected from the location this server is running)
DNS: resolving VALID_IP
SystemDNS: resolving VALID_IP
TLS: dial tcp VALID_IP:443: connect: connection timed out
HTTPS: Get "https://plex.myDomain.tld": dial tcp VALID_IP:443: i/o timeout
I got the same result passing the URL with the -a
flag. The expectation is that the tests would use the port provided in this argument where applicable.
One distinction that could be useful is to do both a resolution through the system, like by calling gethostbyname()
in the glibc, and doing the DNS resolution manually by querying the root DNS servers or 8.8.8.8. Both can yield different results and help inform why a host might fail.
There are many reasons why a system resolver might yield a different result. A few that come to mind:
Hello,
I've noticed that I am unable to run the tests with ./dstp -a 8.8.8.8
on macOS (haven't tested on Linux yet). I've isolated the issue with how the flags are parsed in
Line 44 in 1c9140c
I was able to isolate it by adding fmt.Println(values)
in cmd/dstp/main.go
and seeing that values
was empty:
$ make; sudo ./dstp -a 8.8.8.8
go build -o dstp cmd/dstp/main.go
Password:
opts.Addr value: 8.8.8.8
values variable value: []
address cannot be empty
Usage: dstp [OPTIONS] [ARGS]
Options:
-a, --addr <string> The URL or the IP address to run tests against [REQUIRED]
-o, --out <string> The type of the output, either json or plaintext [Default: plaintext]
-c <bool> Run all the tests concurrently. [Default: false]
-h, --help Show this message and exit.
In order to run it, I have to update
Line 69 in 1c9140c
values
size condition:
$ tail config/config.go
if opts.Addr != "" { // && len(values) >= 1 {
// opts.Addr = values[0]
} else {
fmt.Println(opts.Addr)
return nil, fmt.Errorf("address cannot be empty")
}
return opts, nil
}
$ make; sudo ./dstp -a 8.8.8.8
go build -o dstp cmd/dstp/main.go
Password:
opts.Addr value: 8.8.8.8
values variable value: []
Ping: 329.766ms
DNS: resolving 8.8.8.8
TLS: certificate is valid for 60 more days
HTTPS: got 200 OK
Another issue I've noticed is that on macOS, you need to set pinger.SetPrivileged(true)
on
Line 13 in 1c9140c
Line 41 in 1c9140c
dstp
with sudo
. I suppose that it's the same issue as on Linux.
go version:
$ go version
go version go1.17.2 darwin/amd64
OS:
$ uname -a
Darwin 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64
go test
does not get passed on https://github.com/ycd/dstp/releases/tag/v0.4.0:
https://github.com/aminvakil/aur/runs/5522345117?check_suite_focus=true#step:11:95
go: downloading github.com/kr/pretty v0.2.1
go: downloading github.com/google/go-cmp v0.5.6
go: downloading github.com/yuin/goldmark v1.4.0
go: downloading github.com/kr/text v0.1.0
package github.com/rhysd/actionlint/playground
imports syscall/js: build constraints exclude all Go files in /usr/lib/go/src/syscall/js
Hello there 👋
I am currently trying the tool and I installed it with go install
.
By copy/pasting the command from the CLI, I got the following error
go install: version is required when current directory is not in a module
Try 'go install github.com/ycd/dstp/cmd/dstp@latest' to install the latest version
Using the following does not solve the installation:
go install github.com/ycd/dstp/cmd/dstp@latest
Do you have an idea how it could be installed with go ?
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.