aboutsummaryrefslogtreecommitdiffstats
path: root/test/socks_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/socks_SUITE.erl')
-rw-r--r--test/socks_SUITE.erl26
1 files changed, 21 insertions, 5 deletions
diff --git a/test/socks_SUITE.erl b/test/socks_SUITE.erl
index 07b3497..81d4c10 100644
--- a/test/socks_SUITE.erl
+++ b/test/socks_SUITE.erl
@@ -146,21 +146,37 @@ do_auth_method({username_password, _, _}) -> username_password.
socks5_tcp_http_none(_) ->
doc("Use Socks5 over TCP and without authentication to connect to an HTTP server."),
- do_socks5_tcp_http(<<"http">>, tcp, tcp, none).
+ do_socks5_http(<<"http">>, tcp, tcp, none).
socks5_tcp_http_username_password(_) ->
doc("Use Socks5 over TCP and without authentication to connect to an HTTP server."),
- do_socks5_tcp_http(<<"http">>, tcp, tcp, {username_password, <<"user">>, <<"password">>}).
+ do_socks5_http(<<"http">>, tcp, tcp, {username_password, <<"user">>, <<"password">>}).
socks5_tcp_https_none(_) ->
doc("Use Socks5 over TCP and without authentication to connect to an HTTPS server."),
- do_socks5_tcp_http(<<"https">>, tls, tcp, none).
+ do_socks5_http(<<"https">>, tls, tcp, none).
socks5_tcp_https_username_password(_) ->
doc("Use Socks5 over TCP and without authentication to connect to an HTTPS server."),
- do_socks5_tcp_http(<<"https">>, tls, tcp, {username_password, <<"user">>, <<"password">>}).
+ do_socks5_http(<<"https">>, tls, tcp, {username_password, <<"user">>, <<"password">>}).
-do_socks5_tcp_http(OriginScheme, OriginTransport, ProxyTransport, SocksAuth) ->
+socks5_tls_http_none(_) ->
+ doc("Use Socks5 over TLS and without authentication to connect to an HTTP server."),
+ do_socks5_http(<<"http">>, tcp, tls, none).
+
+socks5_tls_http_username_password(_) ->
+ doc("Use Socks5 over TLS and without authentication to connect to an HTTP server."),
+ do_socks5_http(<<"http">>, tcp, tls, {username_password, <<"user">>, <<"password">>}).
+
+socks5_tls_https_none(_) ->
+ doc("Use Socks5 over TLS and without authentication to connect to an HTTP server."),
+ do_socks5_http(<<"https">>, tls, tls, none).
+
+socks5_tls_https_username_password(_) ->
+ doc("Use Socks5 over TLS and without authentication to connect to an HTTP server."),
+ do_socks5_http(<<"https">>, tls, tls, {username_password, <<"user">>, <<"password">>}).
+
+do_socks5_http(OriginScheme, OriginTransport, ProxyTransport, SocksAuth) ->
{ok, OriginPid, OriginPort} = init_origin(OriginTransport, http),
{ok, ProxyPid, ProxyPort} = do_proxy_start(ProxyTransport, SocksAuth),
Authority = iolist_to_binary(["localhost:", integer_to_binary(OriginPort)]),