[tor-commits] [meek/proxy] Add some commented test cases to think about.
dcf at torproject.org
dcf at torproject.org
Sun May 25 18:24:19 UTC 2014
commit 5c185a06eb766055211a942cc3e3c80deb677a38
Author: David Fifield <david at bamsoftware.com>
Date: Sun May 25 11:18:33 2014 -0700
Add some commented test cases to think about.
It may make sense for use to ensure that the proxy URL has a separable
host name and port. On the other hand, that's one of the error
conditions the application is going to have to check for anyway when it
goes to connect to the proxy.
---
meek-client/proxy_test.go | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meek-client/proxy_test.go b/meek-client/proxy_test.go
index d26362d..77123b9 100644
--- a/meek-client/proxy_test.go
+++ b/meek-client/proxy_test.go
@@ -40,6 +40,16 @@ func TestGetProxyURL(t *testing.T) {
{"socks4a://localhost:1080", "socks4a://localhost:1080"},
{"unknown://localhost/whatever", "unknown://localhost/whatever"},
}
+ /*
+ No port: reject; or infer from scheme?
+ http://localhost
+ socks4a://localhost
+ socks5://localhost
+ Port without host: probably reject?
+ http://:8080
+ socks4a://:1080
+ socks5://:1080
+ */
os.Clearenv()
u, err := PtGetProxyURL()
More information about the tor-commits
mailing list