Function: erc-open-socks-tls-stream
erc-open-socks-tls-stream is a byte-compiled function defined in
erc.el.gz.
Signature
(erc-open-socks-tls-stream NAME BUFFER HOST SERVICE &rest PARAMETERS)
Documentation
Connect to an IRC server via SOCKS proxy over TLS.
Perform the duties required of an erc-server-connect-function
implementer, and return a network process. Defer to the socks
and gnutls libraries to make the connection and handle TLS
negotiation. Expect SERVICE to be a TLS port number and
PARAMETERS to be a possibly empty plist containing items like a
:client-certificate pair. Pass NAME, BUFFER, and HOST directly
to open-network-stream. Beyond that, operate as described in
Info node (erc) SOCKS, and expect users to "wrap" this
function with let-bound credentials when necessary, as shown in
the example.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-open-socks-tls-stream (name buffer host service &rest parameters)
"Connect to an IRC server via SOCKS proxy over TLS.
Perform the duties required of an `erc-server-connect-function'
implementer, and return a network process. Defer to the `socks'
and `gnutls' libraries to make the connection and handle TLS
negotiation. Expect SERVICE to be a TLS port number and
PARAMETERS to be a possibly empty plist containing items like a
`:client-certificate' pair. Pass NAME, BUFFER, and HOST directly
to `open-network-stream'. Beyond that, operate as described in
Info node `(erc) SOCKS', and expect users to \"wrap\" this
function with `let'-bound credentials when necessary, as shown in
the example."
(require 'gnutls)
(require 'socks)
(let ((proc (socks-open-network-stream name buffer host service))
(cert-info (plist-get parameters :client-certificate)))
(gnutls-negotiate :process proc
:hostname host
:keylist (and cert-info (list cert-info)))))