Liking cljdoc? Tell your friends :D

etunnel


-mainclj

(-main & args)
source

close!clj

(close! t)
(close! t reason)

Closes a tunnel opened by connect!: sends bye (reason client closed, or the given reason) and releases the socket. The state map is immutable, so closing the same tunnel twice is a no-op (the reason of the first close wins).

Closes a tunnel opened by connect!: sends `bye` (reason `client closed`, or
the given reason) and releases the socket. The state map is immutable, so
closing the same tunnel twice is a no-op (the reason of the first close wins).
sourceraw docstring

close-reasonclj

(close-reason t)

Reason carried by the bye that closed the tunnel ("" while open).

Reason carried by the bye that closed the tunnel ("" while open).
sourceraw docstring

closed?clj

(closed? t)

True once close! ran (with any reason) or the socket is gone.

True once close! ran (with any reason) or the socket is gone.
sourceraw docstring

connect!clj

(connect! server
          local
          &
          {:keys [token subdomain resume routes edge-probe-interval
                  edge-probe-url]})

Connects to the etunnel server exposing the local service at local ("127.0.0.1:3000" or a port number). Blocks until the server's welcome (15s timeout) and returns the state map with :url, :hostname, :ws, :resume-token and :close! - a plain map, so (:url t) / (close! t), no deref. Edge probe (PROTOCOL.md 3a): :edge-probe-interval (ms; nil/0 = 60s default, negative disables) and :edge-probe-url (override base URL; probed under its own host - java.net.http forbids setting Host). The result is exposed via (edge-state t) / (:edge-state t) - an atom holding :unknown|:ok|:unreachable - and (close-reason t); two consecutive 'edge does not know this tunnel' answers close the tunnel with reason "edge lost tunnel".

Connects to the etunnel server exposing the local service at local
("127.0.0.1:3000" or a port number). Blocks until the server's welcome
(15s timeout) and returns the state map with :url, :hostname, :ws,
:resume-token and :close! - a plain map, so (:url t) / (close! t), no deref.
Edge probe (PROTOCOL.md 3a): :edge-probe-interval (ms; nil/0 = 60s default,
negative disables) and :edge-probe-url (override base URL; probed under its
own host - java.net.http forbids setting Host). The result is exposed via
(edge-state t) / (:edge-state t) - an atom holding :unknown|:ok|:unreachable -
and (close-reason t); two consecutive 'edge does not know this tunnel'
answers close the tunnel with reason "edge lost tunnel".
sourceraw docstring

default-edge-probe-interval-msclj

connect! with :edge-probe-interval nil/0 probes this often (ms).

connect! with :edge-probe-interval nil/0 probes this often (ms).
sourceraw docstring

edge-headerclj

Marks a genuine edge answer (200 or 404); anything without it is unreachable.

Marks a genuine edge answer (200 or 404); anything without it is unreachable.
sourceraw docstring

edge-health-pathclj

Probe path answered by the edge itself (literal mirror of the server's).

Probe path answered by the edge itself (literal mirror of the server's).
sourceraw docstring

edge-probe-timeout-msclj

Bounds one probe request (ms).

Bounds one probe request (ms).
sourceraw docstring

edge-stateclj

(edge-state t)

Result of the most recent edge probe for tunnel map t (PROTOCOL.md 3a): :unknown (no probe completed / probing disabled), :ok, or :unreachable. Also readable as @(:edge-state t).

Result of the most recent edge probe for tunnel map t (PROTOCOL.md 3a):
:unknown (no probe completed / probing disabled), :ok, or :unreachable.
Also readable as @(:edge-state t).
sourceraw docstring

etunnel-login!clj

(etunnel-login! server)
(etunnel-login! server open-browser timeout-secs)

CLI loopback login. Binds a random 127.0.0.1 port, opens the browser (prints the URL when headless), waits for the one-time code (10-minute budget), exchanges it. open-browser is an optional (fn [url]).

CLI loopback login. Binds a random 127.0.0.1 port, opens the browser
(prints the URL when headless), waits for the one-time code (10-minute
budget), exchanges it. open-browser is an optional (fn [url]).
sourceraw docstring

login-post!clj

(login-post! url body)

POST body (map) as JSON to url; returns the decoded JSON map.

POST body (map) as JSON to url; returns the decoded JSON map.
sourceraw docstring

maxpclj

source

versionclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close