efl_net_dialer: improve proxy docs.

Document some proxy behavior like done by CURL, so we'll follow that
standard, with $http_proxy, $socks_proxy, $all_proxy and $no_proxy.

also add some missing @since.
This commit is contained in:
Gustavo Sverzut Barbieri 2016-09-16 22:19:37 -03:00
parent f42e649476
commit b2e562d4c6
4 changed files with 80 additions and 5 deletions

View File

@ -66,15 +66,29 @@ interface Efl.Net.Dialer (Efl.Net.Socket) {
@property proxy {
[[Controls/retrieve if the dialer should use a proxy.
The proxy is an URL in the form such as:
The proxy is an URL in the form:
- protocol://username:password\@proxyserver:port
Where protocol is defined per class, such as a TCP or
UDP dialer will use 'socks4', 'socks4a', 'socks5' or
'socks5h'; while http and websocket will want those or
'http'.
Whenever appropriate dialers may use system proxy if the
proxy is NULL (the default). To forcefully disable
proxy, use an empty string ("").
- http://username:password\@proxyserver:port
- http://username\@proxyserver:port
- http://proxyserver:port
- http://proxyserver (default port)
- socks5://username:password\@proxyserver:port
- socks5://username\@proxyserver:port
- socks5://username:password\@proxyserver:port (SOCKSv5)
- socks5h://username\@proxyserver:port (let socks server to resolve domain)
- socks5://proxyserver:port
- socks5://proxyserver (default port)
- socks5://proxyserver (default port 1080)
- socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain)
- socks4://proxyserver:port (SOCKSv4)
]]
get { }
set { }

View File

@ -30,6 +30,23 @@ class Efl.Net.Dialer.Http (Efl.Loop_User, Efl.Net.Dialer, Efl.Io.Sizer) {
To enable debugging use EINA_LOG_LEVELS=ecore_con:4 environment
variable.
If the proxy is NULL (default), then the system proxy will be
used. On UNIX that's the environment variable $http_proxy (or
'$all_proxy') is used if the given address doesn't match
$no_proxy patterns. To disable proxy use an empty string. If
provided proxy must be one of the protocols:
- http://username:password\@proxyserver:port
- http://username\@proxyserver:port
- http://proxyserver:port
- http://proxyserver (default port 1080)
- socks5://username:password\@proxyserver:port (SOCKSv5)
- socks5h://username\@proxyserver:port (let socks server to resolve domain)
- socks5://proxyserver:port
- socks5://proxyserver (default port 1080)
- socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain)
- socks4://proxyserver:port (SOCKSv4)
@since 1.19
]]
methods {

View File

@ -1,6 +1,24 @@
class Efl.Net.Dialer.Tcp (Efl.Net.Socket.Tcp, Efl.Net.Dialer) {
[[Connects to a remote TCP server.
If the proxy is NULL (default), then the system proxy will be
used. On UNIX that's the environment variable $socks_proxy (or
'$proxy' or '$all_proxy') is used if the given address doesn't
match $no_proxy patterns. To disable proxy use an empty string.
If the proxy is NULL (default), then the system proxy will be
used. On UNIX that's the environment variable $socks_proxy (or
'$all_proxy') is used if the given address doesn't match
$no_proxy patterns. To disable proxy use an empty string. If
provided proxy must be one of the protocols:
- socks5://username:password\@proxyserver:port (SOCKSv5)
- socks5h://username\@proxyserver:port (let socks server to resolve domain)
- socks5://proxyserver:port
- socks5://proxyserver (default port 1080)
- socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain)
- socks4://proxyserver:port (SOCKSv4)
@since 1.19
]]

View File

@ -2,7 +2,10 @@ import eina_types;
import efl_net_http_types;
enum Efl.Net.Dialer.Websocket.Streaming_Mode {
[[How to map WebSocket to EFL I/O Interfaces.]]
[[How to map WebSocket to EFL I/O Interfaces.
@since 1.19
]]
disabled, [[@Efl.Io.Writer.write and @Efl.Io.Reader.read will fail by returning ENOSTR]]
binary, [[@Efl.Io.Writer.write will result in @Efl.Net.Dialer.Websocket.binary_send]]
text, [[@Efl.Io.Writer.write will result in @Efl.Net.Dialer.Websocket.text_send]]
@ -15,6 +18,8 @@ enum Efl.Net.Dialer.Websocket.Close_Reason {
using "_start" and "end" suffixes.
See https://tools.ietf.org/html/rfc6455#section-7.4.1
@since 1.19
]]
normal = 1000, [[indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled.]]
going_away = 1001, [[indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page.]]
@ -34,6 +39,10 @@ enum Efl.Net.Dialer.Websocket.Close_Reason {
}
struct Efl.Net.Dialer.Websocket.Closed_Reason {
[[Close reason event payload.
@since 1.19
]]
reason: Efl.Net.Dialer.Websocket.Close_Reason;
message: string;
}
@ -49,6 +58,23 @@ class Efl.Net.Dialer.Websocket (Efl.Loop_User, Efl.Net.Dialer) {
not a subclass and thus not all HTTP features are exposed as the
WebSocket has strict requirements that must be respected.
If the proxy is NULL (default), then the system proxy will be
used. On UNIX that's the environment variable $http_proxy (or
'$all_proxy') is used if the given address doesn't match
$no_proxy patterns. To disable proxy use an empty string. If
provided proxy must be one of the protocols:
- http://username:password\@proxyserver:port
- http://username\@proxyserver:port
- http://proxyserver:port
- http://proxyserver (default port 1080)
- socks5://username:password\@proxyserver:port (SOCKSv5)
- socks5h://username\@proxyserver:port (let socks server to resolve domain)
- socks5://proxyserver:port
- socks5://proxyserver (default port 1080)
- socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain)
- socks4://proxyserver:port (SOCKSv4)
@since 1.19
]]