aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/manual/gun.info.asciidoc6
-rw-r--r--doc/src/manual/gun.stream_info.asciidoc22
-rw-r--r--test/tunnel_SUITE.erl1
3 files changed, 24 insertions, 5 deletions
diff --git a/doc/src/manual/gun.info.asciidoc b/doc/src/manual/gun.info.asciidoc
index 095492e..e3c19d3 100644
--- a/doc/src/manual/gun.info.asciidoc
+++ b/doc/src/manual/gun.info.asciidoc
@@ -18,6 +18,7 @@ Info :: #{
protocol => http | http2 | socks | ws,
sock_ip => inet:ip_address(),
sock_port => inet:port_number(),
+ origin_scheme => binary() | undefined,
origin_host => inet:hostname() | inet:ip_address(),
origin_port => inet:port_number(),
intermediaries => [Intermediary],
@@ -28,7 +29,7 @@ Intermediary :: #{
host => inet:hostname() | inet:ip_address(),
port => inet:port_number(),
transport => tcp | tls,
- protocol => http | http2 | socks
+ protocol => http | http2 | socks | raw
}
----
@@ -47,7 +48,8 @@ the connection.
== Changelog
-* *2.0*: The values `owner` and `cookie_store` were added.
+* *2.0*: The values `owner`, `origin_scheme` and `cookie_store` were
+ added.
* *1.3*: The values `socket`, `transport`, `protocol`, `origin_host`,
`origin_port` and `intermediaries` were added.
* *1.0*: Function introduced.
diff --git a/doc/src/manual/gun.stream_info.asciidoc b/doc/src/manual/gun.stream_info.asciidoc
index 34817fa..26ec8e2 100644
--- a/doc/src/manual/gun.stream_info.asciidoc
+++ b/doc/src/manual/gun.stream_info.asciidoc
@@ -13,9 +13,25 @@ stream_info(ConnPid, StreamRef) -> {ok, undefined | Info} | {error, not_connecte
ConnPid :: pid()
StreamRef :: gun:stream_ref()
Info :: #{
- ref => gun:stream_ref(),
- reply_to => pid(),
- state => running | stopping
+ ref => gun:stream_ref(),
+ reply_to => pid(),
+ state => running | stopping,
+ intermediaries => [Intermediary],
+ tunnel => Tunnel
+}
+Intermediary :: #{
+ type => connect | socks5,
+ host => inet:hostname() | inet:ip_address(),
+ port => inet:port_number(),
+ transport => tcp | tls,
+ protocol => http | http2 | socks | raw
+}
+Tunnel :: #{
+ transport => tcp | tls,
+ protocol => http | http2 | socks | raw,
+ origin_scheme => binary(),
+ origin_host => inet:hostname() | inet:ip_address(),
+ origin_port => inet:port_number()
}
----
diff --git a/test/tunnel_SUITE.erl b/test/tunnel_SUITE.erl
index e5fad34..24fb813 100644
--- a/test/tunnel_SUITE.erl
+++ b/test/tunnel_SUITE.erl
@@ -978,6 +978,7 @@ do_proxy2_stream_info(#st{proxy1=Proxy1, proxy1_port=Proxy1Port, proxy2=Proxy2,
_ -> connect
end,
{OriginTransport, OriginProtocol} = do_type(Origin),
+ %% @todo The OriginScheme should probably be undefined if Origin is raw|rawtls.
OriginScheme = case OriginTransport of
tcp -> <<"http">>;
tls -> <<"https">>