Skip to content

Commit

Permalink
fix: remove port flag
Browse files Browse the repository at this point in the history
  • Loading branch information
amircybersec committed Oct 25, 2023
1 parent 71cbd83 commit 69f4e92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion x/examples/outline-connectivity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Example:
KEY=ss://ENCRYPTION_KEY@HOST:PORT/
COLLECTOR_URL=https://collector.example.com/metrics
for PREFIX in POST%20 HTTP%2F1.1%20 %05%C3%9C_%C3%A0%01%20 %16%03%01%40%00%01 %13%03%03%3F %16%03%03%40%00%02; do
go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-connectivity@latest -transport="$KEY?prefix=$PREFIX" -proto tcp -resolver 8.8.8.8 -port 53 -report-to $COLLECTOR_URL -report-success-rate 0.2 -report-failure-rate 1.0 && echo Prefix "$PREFIX" works!
go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-connectivity@latest -transport="$KEY?prefix=$PREFIX" -proto tcp -resolver 8.8.8.8 -report-to $COLLECTOR_URL -report-success-rate 0.2 -report-failure-rate 1.0 && echo Prefix "$PREFIX" works!
done
```
3 changes: 1 addition & 2 deletions x/examples/outline-connectivity/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ func main() {
resolverFlag := flag.String("resolver", "8.8.8.8,2001:4860:4860::8888", "Comma-separated list of addresses of DNS resolver to use for the test")
protoFlag := flag.String("proto", "tcp,udp", "Comma-separated list of the protocols to test. Must be \"tcp\", \"udp\", or a combination of them")
reportToFlag := flag.String("report-to", "", "URL to send JSON error reports to")
portFlag := flag.String("port", "53", "Resolver port to use for the test")
reportSuccessFlag := flag.Float64("report-success-rate", 0.1, "Report success to collector with this probability - must be between 0 and 1")
reportFailureFlag := flag.Float64("report-failure-rate", 1, "Report failure to collector with this probability - must be between 0 and 1")

Expand Down Expand Up @@ -168,7 +167,7 @@ func main() {
jsonEncoder.SetEscapeHTML(false)
for _, resolverHost := range strings.Split(*resolverFlag, ",") {
resolverHost := strings.TrimSpace(resolverHost)
resolverAddress := net.JoinHostPort(resolverHost, *portFlag)
resolverAddress := net.JoinHostPort(resolverHost, "53")
for _, proto := range strings.Split(*protoFlag, ",") {
proto = strings.TrimSpace(proto)

Expand Down

0 comments on commit 69f4e92

Please sign in to comment.